15.12.2014, 04:56
Here you go man.
This isn't actually "locking" them, but disabling them for use. If you wanted to lock them and only allow cops to unlock it that's a pretty simple function just use GetVehicleParamsEx and SetVehicleParamsEx but players will be able to drive the vehicle if it's unlocked.
Код:
stock IsACopCar(vehicleid) { switch(GetVehicleModel(vehicleid)) { case 523,427,528,596,598,597,599,601,497,430: return 1; } return 0; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(IsACopCar(vehicleid) && !ispassenger) { if(Groups[Player[playerid][Group]][CommandTypes] == 1) { SendClientMessage(playerid, -1, "You are not a cop!"); ClearAnimations(playerid); } } }