03.11.2014, 17:52
pawn Код:
#include <a_samp>
new YourJobName[256];
public OnPlayerEnterCheckpoint(playerid)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == YOUR VEHICLE ID) // Will enter in checkpoint with this Car ID !
{
if(YourJobName[playerid] == 1) // First checkpoint
{
YourJobName[playerid] = 2; // When he enter in this checkpoint will show another one
SetPlayerCheckpoint(playerid,-488.9691,-1454.4095,13.6985,10); // Checkpoint position
return 1;
}
if(YourJobName[playerid] == 2) // Third
{
YourJobName[playerid] = 3; // When he enter in this checkpoint will show another one
SetPlayerCheckpoint(playerid,-491.1559,-1590.0781,6.0986,10); // Checkpoint position
return 1;
}
if(YourJobName[playerid] == 3) // Third
{
YourJobName[playerid] = 4; // When he enter in this checkpoint will show another one
SetPlayerCheckpoint(playerid,-517.1489,-1494.8715,10.6554,10); // Checkpoint position
return 1;
}
if(YourJobName[playerid] == 4) // Fourth
{
YourJobName[playerid] = 5; // When he enter in this checkpoint will show another one
SetPlayerCheckpoint(playerid,-537.1957,-1495.2427,9.5398,10); // Checkpoint position
return 1;
}
if(YourJobName[playerid] == 5) // Fifth
{
YourJobName[playerid] = 6; // When he enter in this checkpoint will show another one
SetPlayerCheckpoint(playerid,-538.4468,-1594.6807,7.9598,10); // Checkpoint position
return 1;
}
if(YourJobName[playerid] == 6) // Six
{
YourJobName[playerid] = 7; // When he enter in this checkpoint will show another one
SetPlayerCheckpoint(playerid,-562.2611,-1505.3055,8.7389,10); // Checkpoint position
return 1;
}
if(YourJobName[playerid] == 7) // Last
{
YourJobName[playerid] = 0; // He finished, so he got money and disable all checkpoints
DisablePlayerCheckpoint(playerid); // Disable checkpoints
GivePlayerMoney(playerid,Money); // Give him money
}
}
return 1;
}
- And that "i" red it's a pick-up . Pick-up id: 1239 !
- More details see at below links :
http://weedarr.wikidot.com/pickups
https://sampwiki.blast.hk/wiki/OnPlayerPickUpPickup