29.07.2013, 14:11
im having a problem with this /quitjob command, even if i am not in one of these vehicles:
it still ejects me and re spawns my car?
pawn Код:
PizzaBike[0] || Trashmaster[0] || Sweeper[0] || Housetruck[0] || FedexC[0] || ComTruck[0] || Trucks[0])
pawn Код:
if(strcmp(cmd, "/quitjob", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pJob] > 0)
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_WHITE, "[Phone] Boss Says : Alright man, was nice to work with you , hope to see you later");
PlayerInfo[playerid][pJob] = 0;
PlayerInfo[playerid][pPRoute] = 0;
PlayerInfo[playerid][pTRoute] = 0;
PlayerInfo[playerid][pvLoaded] = 0;
}
new playerstate = GetPlayerState(playerid);
if (playerstate == PLAYER_STATE_DRIVER)
{
if(GetPlayerVehicleID(playerid) >= PizzaBike[0] || Trashmaster[0] || Sweeper[0] || Housetruck[0] || FedexC[0] || ComTruck[0] || Trucks[0])
{
RemovePlayerFromVehicle(playerid);
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
}
}
}
return 1;
}