[Pomoc] Problem s IsPlayerInRangeOfPoint

Započeo Matteo, Oktobar 21, 2010, 20:55:02 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Dobra dan. Imam jedan problemcic s time kako da s jednom komandom mogu doc do vise cp-a (kada dodem do prvog da mi izbaci drugi i tako dalje), evo komande kojom dodem do prvog cp-a:

if (strcmp("/vozibeton", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, -2410.4307,-585.9673,132.6484))//cp1
{
SetPlayerCheckpoint(playerid, -2642.3608,1363.2247,6.4370, 8.0);//
GameTextForPlayer(playerid, "kada dodes do cp-a upisi /vratimjesalicu", 5000, 3);
}
return 1;
}

Koliko sam ja razumi ova komanda b tribala bit za neki posao.
evo pogledaj kako sam ja to napravio.

Ovo ubaci di su ti koamnde.
if (strcmp("/vozibeton", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pJob] != id posla)
{
DisablePlayerCheckpoint(playerid); //unistava predhodni cp
           SetPlayerCheckpoint(playerid, X,Y,Z,Radius);
CP[playerid] = 200; //ovaj broj 200 je id CP dakle to je kad igrac stane na ovaj 1 cp da ga autoatski salje na ostale
}
return 1;
}


zatim ovo ubaci u          public OnPlayerEnterCheckpoint(playerid)
//---------------------CP-----------------
else if(CP[playerid] == 200) { CP[playerid] = 201; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, X,Y,Z,RADIUS); }
else if(CP[playerid] == 201) { CP[playerid] = 202; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, X,Y,Z,RADIUS); }
else if(CP[playerid] == 202) { CP[playerid] = 203; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, X,Y,Z,RADIUS); }
else if(CP[playerid] == 203) { CP[playerid] = 204; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, X,Y,Z,RADIUS); }
else if(CP[playerid] == 204) { CP[playerid] = 205; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, X,Y,Z,RADIUS); }
else if(CP[playerid] == 205) { CP[playerid] = 206; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, X,Y,Z,RADIUS); }
else if(CP[playerid] == 206) { CP[playerid] = 207; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, X,Y,Z,RADIUS); }
else if(CP[playerid] == 207) { CP[playerid] = 208; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, X,Y,Z,RADIUS); }
else if(CP[playerid] == 208) { CP[playerid] = 209; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, X,Y,Z,RADIUS); }
else if(CP[playerid] == 209)//Kraj cp
   {
DisablePlayerCheckpoint(playerid);
CP[playerid] = 0;
}


UKOLIKO NESTO NISI RAZUMIO NEKI KOD ILI BILO STA PITAJ VAMO.
i to je to,nadam se da sam pomogao
Poslednja Izmena: Oktobar 22, 2010, 22:04:40 POSLE PODNE od Ante_Dracar aka Lopa