11.07.2012, 20:26
EDIT: Can someone add. if a player tries to enter in a locked vehicle a GameTextForPlayer will appear "Vehicle Locked"
I go 1 error. warning 203: symbol is never used: "lock"
Код:
new EnteredVehicle[MAX_PLAYERS], engine, lights, alarm, doors, bonnet, boot, objective; public OnPlayerStateChange(playerid, newstate, oldstate) { if(newstate == PLAYER_STATE_DRIVER) { EnteredVehicle[playerid] = GetPlayerVehicleID(playerid); } } CMD:lock(playerid, params[]) { GetVehicleParamsEx(EnteredVehicle[playerid], engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(EnteredVehicle[playerid], engine, lights, alarm, 1, bonnet, boot, objective); SendClientMessage(playerid, COLOR_GREEN, "Vehicle Locked!"); return 1; }