25.07.2013, 19:11
Hey.
I have a small issue with OnPlayerStateChange.
I check if the player is the Driver, then under this code I add another code for checking if the player is in a Job car to (not)remove them from the vehicle.
The first block works but all the code under it won't work!
Here it is:
Thanks.
I have a small issue with OnPlayerStateChange.
I check if the player is the Driver, then under this code I add another code for checking if the player is in a Job car to (not)remove them from the vehicle.
The first block works but all the code under it won't work!
Here it is:
Код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { if(BusCar(GetPlayerVehicleID(playerid))) // This works { if(PlayerInfo[playerid][pJob] == 1) { SendClientMessage(playerid,-1,"{1589FF} Welcome Bus Driver."); } else SendClientMessage(playerid,COLOR_GREY,"This vehicle is LOCKED!"); RemovePlayerFromVehicle(playerid); } if(MechanicCar(GetPlayerVehicleID(playerid))) // All the code under this don't work whatever I put under here { if(PlayerInfo[playerid][pJob] == 2) { SendClientMessage(playerid,-1,"{1589FF} Welcome Mechanic."); } else SendClientMessage(playerid,COLOR_GREY,"This vehicle is LOCKED!"); RemovePlayerFromVehicle(playerid); } }