PDA

View Full Version : nos with LMB? and flipcar with 3? how to?


niels44
26/11/2011, 02:07 PM
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

[MG]Dimi
26/11/2011, 02:18 PM
You can't make Flip with 3 since it's not supported

For NOS:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_FIRE)
{
if(!IsPlayerInAnyVehicle(playerid)) return 1;
AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
}
return 1;
}

Enjoy

niels44
27/11/2011, 01:48 PM
hmm but can u make flip with 1 then?

SmiT
27/11/2011, 01:51 PM
See http://wiki.sa-mp.com/wiki/GetPlayerKeys for supported keys.

Kostas'
27/11/2011, 01:55 PM
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;
}

niels44
29/11/2011, 03:04 PM
so this one is good or wut? kostas?