Need help with checkpoints causing crash.
#1

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
Reply
#2

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;
}
Reply


Forum Jump:


Users browsing this thread: