03.05.2011, 15:10
I got the following problem: I want to make job cars and if someone enter this car who not in this job Him throws from car and SendClientMessage"You are not working this job", or if player works this job but he doesn't wear an uniform Him throws from car and SendClientMessage"You should wear an uniform". There is my code:
Please correct my code or write your own code.
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(vehicleid == GD1,GD2,GD3,GD4,GD5,GD6,GD7){ if(isPlayerDarbe(playerid,1)){ SetPlayerScore(playerid,200); } else { SendClientMessage(playerid,0x999900AA,"You doesn't work this job!"); RemovePlayerFromVehicle(playerid); } } if(vehicleid == GD1,GD2,GD3,GD4,GD5,GD6,GD7){ if(GetPlayerSkin(playerid)!=28){ SetPlayerScore(playerid,200); } else { SendClientMessage(playerid,0x999900AA,"You should wear an uniform!"); RemovePlayerFromVehicle(playerid); } } return 1; }