26.01.2011, 18:57
To detect an opened parachute i could use GetPlayerWeaponState ? Also which state would that be ? Or Animations ?
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); if(newkeys == KEY_FIRE && GetPlayerWeapon(playerid) == WEAPON_PARACHUTE && z > /* (MINIMUM HEIGHT)*/) { OnPlayerOpenParachute(playerid); } return 1; } public OnPlayerOpenParachute(playerid) { [...] }
stock IsPlayerUsingParachute(playerid)
{
new index = GetPlayerAnimationIndex(playerid)
return (index >= 963 && index <= 979);
}