If you exit a vehicle, it cancels the job. (need help)
#13

Quote:
Originally Posted by Marricio
View Post
This can be more efficient
pawn Code:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_ONFOOT && oldstate == PLAYER_STATE_DRIVER)
    {
        if(simplejobrunning[playerid] == 1) // this will check the value to 'playerid'
        {
            simplejobrunning[playerid] = 0; // this will change the value to 'playerid'
            SendClientMessage(playerid, COLOR_RED, "You're job was canceled due to exiting the Vehicle");
            DisablePlayerCheckpoint(playerid); // this will dissapear/disable the current player cp
            return 1;
        }
    }
    return 1;
}
Compiled
I compiled it as well, but it doesn't work in-game.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)