06.11.2009, 00:34
If you want to find out what the server car id for it is,
Add the IDs to your script, under
Then use "RemovePlayerFromVehicle(playerid)
Should look like:
Sorry for poor indentations.
Код:
public OnPlayerStateChange(playerid, newstate, oldstate) { if(newstate == 2) // driver { new id; new str[256]; id = GetPlayerVehicleID(playerid); format(str, sizeof(str), "ID: %d", GetPlayerVehicleID(playerid)); SCM(playerid, COLOR_RED, str);
Код:
if(newstate == 2)
Should look like:
Код:
public OnPlayerStateChange(playerid, newstate, oldstate) { if(newstate == 2) // driver { new id; new str[256]; id = GetPlayerVehicleID(playerid); format(str, sizeof(str), "ID: %d", GetPlayerVehicleID(playerid)); SCM(playerid, COLOR_RED, str); if(id == //Vehicle ID Here) { if(!IsAHitman(playerid)) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, COLOR_RED, "You Do Not Have The Keys For This Vehicle!"); } } } return 1; }