SA-MP Forums Archive
adding nos - 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: adding nos (/showthread.php?tid=578865)



adding nos - sirvanec - 22.06.2015

How can i fix it to add nos by pressing lctrl and mouse left click.. i use this code but it's working with mouse left click not with lctrl..

Quote:

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_FIRE))
{
if (IsPlayerInAnyVehicle(playerid))
{
AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
}
}
return 1;
}




Re: adding nos - rappy93 - 22.06.2015

https://sampwiki.blast.hk/wiki/Keys

As you can see on this page, in KEY_FIRE's case LCTRL is used when the player is on foot and LALT is used when the player is in a vehicle ( your case ).

I guess you could try changing the controls in the settings menu of GTA SA ? That would only work for you though.