21.02.2010, 15:42
i want to make same but i stuck with checpoints's everything left is easy , and i need help
1 - i assing make
(tag mismatch) and also desty desz
2- heres code
this is on dialog response to make first cp and assing it to truckcp[0]= setplayercheckpoint
and heres on playerernterracecp
so results is i type /trucker vhoose dialog it creates truckcp1 i get to it mesage reports tome
at same time and everything disspears
======================edit
now i changed my code
and result
when i enter 1cp i get message
it sets other cp thats cool but when i enter secon cp it makes flooooood of
thats insane
1 - i assing make
Код:
destx= 125.154;
2- heres code
Код:
truckcp[0][playerid]= SetPlayerRaceCheckpoint(playerid,2,2812.7935,970.6848,10.7500,0.0,0.0,0.0,2); return 1;
and heres on playerernterracecp
Код:
public OnPlayerEnterRaceCheckpoint(playerid) { if(truckcp[0][playerid]==1) { SendClientMessage(playerid,GREEN,"i enterred into cp1"); truckcp[1][playerid]=SetPlayerRaceCheckpoint(playerid,2,2101.7437,940.7814,10.5474,0.0,0.0,0.0,2); truckcp[0][playerid]=-1; } if(truckcp[1][playerid]==1) { SendClientMessage(playerid,GREEN,"i enterred into cp2"); truckcp[1][playerid]=-1; DisablePlayerRaceCheckpoint(playerid); } return 1; }
Код:
i entered into cp1 i entered into cp2
======================edit
now i changed my code
Код:
if(IsPlayerInCheckpoint(playerid)==truckcp[0][playerid]) { SendClientMessage(playerid,GREEN,"i enterred into cp1"); truckcp[1][playerid]=SetPlayerCheckpoint(playerid,2101.7437,940.7814,10.5474,4); } if(IsPlayerInCheckpoint(playerid)==truckcp[1][playerid]) { SendClientMessage(playerid,GREEN,"i enterred into cp2"); DisablePlayerCheckpoint(playerid); }
when i enter 1cp i get message
Код:
i entered into cp1
Код:
i enteredinto cp1