02.01.2014, 05:32
Can We Set Health Of a Object...

#define HOLDING(%0) \
((newkeys & (%0)) == (%0))
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (HOLDING(KEY_FIRE))
{
if(GetPlayerWeapon(playerid) == 9)
{
IsPlayerInRangeOfPoint etc etc
}
}
return 1;
}
Use OnPlayerKeyStateChange and detect if the player is holding the KEY_FIRE and detect his weapon to be the chainsaw ID.
example: pawn Код:
|