03.11.2015, 14:53
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
Thx for all answer sry my english very bad
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); } } } }