12.08.2013, 06:25
Try it maybe it helps you.
Код:
#define SNIPER 0 #define PILOT 1 #define SOLDIER 2 public OnPlayerRequestClass(playerid,classid) { if(classid == x || classid == x) { gPlayerClass[playerid] = SOLDIER; } return 1; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(GetVehicleModel(vehicleid) == 432 && gPlayerClass[playerid] == SOLDIER) SendClientMessage(playerid, COLOR_BRIGHTRED, "Ok,enjoy your car!"); else { SendClientMessage(playerid, COLOR_BRIGHTRED, "You need to be soldier to able drive rhino tank"); RemovePlayerFromVehicle(playerid); return 1; } return 1; }