15.11.2012, 21:48
Yeah it won't work like this, i tried it too. However thats how i done it..
something like that?
PHP код:
new Ccp[MAX_PLAYERS];
PHP код:
Ccp[playerid] = 1; // This will change the variable, so we can use it later on with OnPlayerEnterCheckpoint
SetPlayerCheckpoint(playerid, 1920.0251,-1788.2981,12.9542, 10.3839, 3.0); // This creates a checkpoint at the coцrdinates: "-269.1287,2610.6057,63.2069"
PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
if(Ccp[playerid] == 1) // This checks if our variable equals to 1, if so: it continues
{
DisablePlayerCheckpoint(playerid); // This makes sure that there will be a new checkpoint
SendClientMessage(playerid, 0xFFFFFFFF, "You delivered the goods, go to the Courier Agency to get some more jobs.");
GivePlayerCash(playerid, 4250);
return 1;
}
}