SA-MP Forums Archive
bugg help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: bugg help (/showthread.php?tid=380233)



bugg help - trapstar2020 - 24.09.2012

Код:
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(PRESSED(KEY_SPRINT))
    {
        if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            new engine, lights, alarm, doors, bonnet, boot, objective;
            GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
            if(engine == 1)
            {
                SetVehicleParamsEx(GetPlayerVehicleID(playerid), 0, lights, alarm, doors, bonnet, boot, objective);
                SendClientMessage(playerid, 0xFF0000FF, "You Have Turned Your Vehicle's Engine Off."); //This line is not necessary and is completely optional.
            }
            else
            {
                SetVehicleParamsEx(GetPlayerVehicleID(playerid), 1, lights, alarm, doors, bonnet, boot, objective);
                SendClientMessage(playerid, 0x00FF00FF, "You Have Turned Your Vehicle's Engine On."); //Once again, this line is completely optional.
            }
        }
    }
	return 1;
}
when i press up it toggles engine?!


Re: bugg help - Jarnu - 24.09.2012

What is your problem actually? .. can you explain a bit properly?


Re: bugg help - CaRa - 24.09.2012

With sprint key you turn off / on the engine of your car.

Doesn't work ?


Re: bugg help - trapstar2020 - 24.09.2012

nope i press sprint nothing happens when i press up to drive it togs the engine


Re: bugg help - GangsterLifeRP - 24.09.2012

It kinda aint the bug, You just need to fix the command and make a specific Command like /engine or /car engine


Re: bugg help - trapstar2020 - 24.09.2012

i made a command already jeeez dont worry i used a different key and its work