01.07.2015, 12:22
Anyone could say me how can I detect if a player is on fire? My server got an event where players cross fire they use anim to avoid buring and dying , so amy way to detect fire?
new FireObject;
FireObject = CreateObject(...);
if(IsPlayerNearObject(playerid, FireObject , PUT YOUR RANGE HERE))
{
//Here put anything you want to do
return 1;
}
stock IsPlayerNearObject(playerid, objectid, Float:range)
{
new Float:X, Float:Y, Float:Z;
GetDynamicObjectPos(objectid, X, Y, Z);
return (IsPlayerInRangeOfPoint(playerid, range, X, Y, Z));
}
forward OnPlayerBurning(playerid, status);