SA-MP Forums Archive
nos with LMB? and flipcar with 3? how to? - 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: nos with LMB? and flipcar with 3? how to? (/showthread.php?tid=299544)



nos with LMB? and flipcar with 3? how to? - niels44 - 26.11.2011

hey guys,
i want to make it that when i press LMB i get unlimited nos and when i press 3 the car getsd flipped but how to make it? i know its something with OnPlayerKeyStateChange but how to make this?
niels


Re: nos with LMB? and flipcar with 3? how to? - [MG]Dimi - 26.11.2011

You can't make Flip with 3 since it's not supported

For NOS:
PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if(
newkeys == KEY_FIRE)
    {
        if(!
IsPlayerInAnyVehicle(playerid)) return 1;
        
AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
    }
    return 
1;

Enjoy


Re: nos with LMB? and flipcar with 3? how to? - niels44 - 27.11.2011

hmm but can u make flip with 1 then?


Re: nos with LMB? and flipcar with 3? how to? - SmiT - 27.11.2011

See https://sampwiki.blast.hk/wiki/GetPlayerKeys for supported keys.


Re: nos with LMB? and flipcar with 3? how to? - Kostas' - 27.11.2011

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & ...) { // ... = Key. Sorry for this, but I think there isn't.
        if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 1;
        new
            zAngle,
            Vehicle = GetPlayerVehicleID(playerid);
        GetVehicleZAngle(Vehicle,zAngle);
        SetVehicleZAngle(Vehicle,zAngle);
    }
    return 1;
}



Re: nos with LMB? and flipcar with 3? how to? - niels44 - 29.11.2011

so this one is good or wut? kostas?