Need help with checkpoints causing crash. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need help with checkpoints causing crash. (
/showthread.php?tid=82701)
Need help with checkpoints causing crash. -
Bofhead - 20.06.2009
Hi i have managed, with the help of some of you, to set up checkpoints for trucking missions. I have tried to code it so that you can only enter the check point when you have got a trailer. But when ever i enter checkpoint, with or without tralier, the server crashes. Here is my code.
Код:
public OnPlayerEnterCheckpoint(playerid)
{
if (IsTrailerAttachedToVehicle(515) == true)
{
SendClientMessage(playerid, 0xAFAFAFAA, " Congratulations!");
}
else {
SendClientMessage(playerid, 0xAFAFAFAA, "you need a trailer");
}
return 1;
}
Thanks in advance,
Josh
Re: Need help with checkpoints causing crash. -
pen_theGun - 20.06.2009
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
new vehicleid=GetPlayerVehicleID( playerid );
if ( IsTrailerAttachedToVehicle(vehicleid) ) {
SendClientMessage( playerid, 0xAFAFAFAA, " Congratulations!" );
}
else {
SendClientMessage( playerid, 0xAFAFAFAA, "You need a trailer." );
}
return 1;
}