25.06.2009, 15:00
Try this:
This way the player has to be in the specified vehicle AND have the trailer attached.
Compiles with no errors
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInVehicle(playerid,vehicleid) && IsTrailerAttachedToVehicle(vehicleid))
{
SendClientMessage(playerid, 0xAFAFAFAA, "Congratulations!");
GivePlayerMoney(playerid, 5000);
DisablePlayerCheckpoint(playerid);
}
else
{
SendClientMessage(playerid, 0xAFAFAFAA, "You need a trailer.");
DisablePlayerCheckpoint(playerid);
}
return 1;
}
Compiles with no errors
![Cool](images/smilies/cool.gif)