Quote:
Originally Posted by xDeadlyBoy
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if((newkeys == KEY_SUBMISSION) && (IsPlayerInAnyVehicle(playerid))) { ToggleEngine(playerid); SendClientMessage(playerid,BLUE,"The engine is turned on"); } return 1; }
public OnPlayerStateChange(playerid, newstate, oldstate) { if(newstate == PLAYER_STATE_DRIVER) { ToggleEngine(playerid); SendClientMessage(playerid,GREEN,"Press 2 to turn the engine on"); } }
|
You helping him didn't fix it, it bugged it. The ToggleEngine should only be called once, and thats when the key is pressed not when they enter the vehicle as a driver...think next time.