How to do this?
#1

I have this code wich is also workign eprfectly in-game,but there's only 1 problem:

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
       ToggleEngine(playerid);
       SendClientMessage(playerid,GREEN,"Press 2 to turn the engine on");
    }
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if((newkeys == KEY_SUBMISSION) && (IsPlayerInAnyVehicle(playerid)))
    {
        ToggleEngine(playerid);
        SendClientMessage(playerid,BLUE,"The engine is turned on");
    }
    return 1;
}
I want so if the engine is on when I press 1 again to send the emssage engine is turned off,not again on.
Reply
#2

well?
Reply
#3

0 REPLIES < 16 VIEWS
Reply
#4

post the "ToggleEngine" stock
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)