16.03.2019, 18:46
Ok.
So when you create object (landmine in your case), you have to put it's id into variable.
Example:
But that is just like IsPlayerInRangeOfPoint, because you cannot check if player is near an object by it's id.
So when you create object (landmine in your case), you have to put it's id into variable.
Example:
PHP код:
new oid[0] = CreateObject(objectid, Float:x, Float:y, Float:z, Float:rX, Float:rY, Float:rZ); // this is for example your code for landmine object
new Float:ox[1000],Float:oy[1000],Float:oz[1000];//declaring new variables to store coordinates
GetObjectPos(oid[0], ox[0], oy[0], oz[0]);//geting the coordinates and storing them into variables
stock IsPlayerNearObject(playerid, float:radius, float:ox, float:oy, float:oz)
return IsPlayerInRangeOfPoint(playerid, radius, ox, oy, oz);//getting the coordinates and checking if player is near

