problems with checkpoints
#1

i want to make same but i stuck with checpoints's everything left is easy , and i need help
1 - i assing make
Код:
destx= 125.154;
(tag mismatch) and also desty desz
2- heres code
Код:
truckcp[0][playerid]= SetPlayerRaceCheckpoint(playerid,2,2812.7935,970.6848,10.7500,0.0,0.0,0.0,2);
return 1;
this is on dialog response to make first cp and assing it to truckcp[0]= setplayercheckpoint
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;
}
so results is i type /trucker vhoose dialog it creates truckcp1 i get to it mesage reports tome
Код:
i entered into cp1
i entered into cp2
at same time and everything disspears
======================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);
	}
and result
when i enter 1cp i get message
Код:
i entered into cp1
it sets other cp thats cool but when i enter secon cp it makes flooooood of
Код:
i enteredinto cp1
thats insane
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)