16.02.2015, 17:34
I've looked around in several places and cannot find a resolution, could someone please advise.
#define HOLDING(%0) ((newkeys & (%0)) == (%0))
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT && HOLDING(KEY_SPRINT ))
{
SetPlayerVelocity(playerid, 0.0, 0.0, 0.0); // Forces the player to stop
}
return 1;
}