putted 2 hotkeys - one is working and other no! help?
#1

guys i made two hotkeys on OnPlayerKeyStateChange or idk what it is called

pawno code -


public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
if (PRESSED(KEY_FIRE))
{
if (IsPlayerInAnyVehicle(playerid))
{
AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
}
if (PRESSED(KEY_CROUCH))
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
GivePlayerWeapon(playerid, 46, 500);
}
}
return 1;

no error while compiling but keycrouch one isn't working help?
Reply


Messages In This Thread
putted 2 hotkeys - one is working and other no! help? - by SilverKiller - 11.11.2012, 07:44
Re: putted 2 hotkeys - one is working and other no! help? - by KomplettMaster - 24.12.2012, 23:11
Re: putted 2 hotkeys - one is working and other no! help? - by SuperViper - 25.12.2012, 01:38

Forum Jump:


Users browsing this thread: 1 Guest(s)