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


Forum Jump:


Users browsing this thread: 1 Guest(s)