This is funny,BUT I need help with it!!!
#4

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.
Reply


Messages In This Thread
This is funny,BUT I need help with it!!! - by Cjgogo - 26.04.2011, 08:24
Re: This is funny,BUT I need help with it!!! - by xDeadlyBoy - 26.04.2011, 08:29
Re: This is funny,BUT I need help with it!!! - by Cjgogo - 26.04.2011, 08:49
Re: This is funny,BUT I need help with it!!! - by Steven82 - 26.04.2011, 08:49
Re: This is funny,BUT I need help with it!!! - by xDeadlyBoy - 26.04.2011, 09:07

Forum Jump:


Users browsing this thread: 1 Guest(s)