28.07.2011, 11:49
Title says it all, How to define Checkpoints like as in OnPlayerPickUpPickup (if(pickupid == cash)).
Because there's no such thing on the OnPlayerSpawn callback..
https://sampwiki.blast.hk/wiki/OnPlayerEnterCheckpoint
https://sampwiki.blast.hk/wiki/OnPlayerPickUpPickup
Because there's no such thing on the OnPlayerSpawn callback..
pawn Код:
public OnPlayerSpawn(playerid)
{
SetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 3.0);
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
CreateVehicle(520, 1982.6150, -221.0145, -0.2432, 82.2873, -1, -1, 60000);
DisablePlayerCheckpoint(playerid);
return 1;
}
pawn Код:
new cash;
public OnGameModeInit()
{
cash = CreatePickup(1274, 2, 0.0, 0.0, 9.0);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == cash) GivePlayerMoney(playerid,10000);
return 1;
}