14.12.2009, 13:07
No idea what you mean by brake key but try this. Without any returns the EngineStatus is IF and ELSE. At least that's my guess based on what you said.
Код:
if (PRESSED(KEY_JUMP)) { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { if(EngineStatus[GetPlayerVehicleID(playerid)] == 0) { TogglePlayerControllable(playerid,1); EngineStatus[GetPlayerVehicleID(playerid)] = 1; PlayerActionMessage(playerid,15.0,"turns on the engine"); return 1; } else { TogglePlayerControllable(playerid,0); EngineStatus[GetPlayerVehicleID(playerid)] = 0; PlayerActionMessage(playerid,15.0,"turns off the engine"); return 1; } } }