OnPlayerKeyStateChange help
#1

i need to getkey when player move normally (W S A D) or (W & Holding Spacbar)

i find in wiki not found i want

My code
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
        if(HOLDING(KEY_SPRINT) && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) << not work
	{
	    CheckEnergy(playerid);
	}
        if(newkeys == KEY_SPRINT)
	{
	    if(!IsPlayerInAnyVehicle(playerid))
	    {
	        if(PSleep[playerid] != 1)
 	       {
	        	CheckEnergy(playerid);
	        }
	    }
	    if(IsPlayerInAnyVehicle(playerid))
	    {
	        if(PSleep[playerid] != 1)
		{
	        	CheckEnergyInVeh(playerid);
	        }
	    }
        }
}
Thx for all answer sry my english very bad
Reply


Messages In This Thread
OnPlayerKeyStateChange help - by edwardluciano - 03.11.2015, 14:53

Forum Jump:


Users browsing this thread: 3 Guest(s)