02.04.2011, 15:10
Is it possible to create a function like : "IsPlayerAtObject(playerid,objectid)"
armyof2 and nero ty guys , coole i know that but i meant to check if the player is
near an object |
new
Float: oX,
Float: oY,
Float: oZ;
GetObjectPos(objectid, oX, oY, oZ);
if(IsPlayerInRangeOfPoint(playerid, 5.0, oX, oY, oZ))
{
//Player is in 5.0 range of the object
}
stock IsPlayerNearObject(playerid, objectid)
{
new Float:X, Float:Y, Float:Z;
GetObjectPos(objectid, X, Y, Z);
if(IsPlayerInRangeOfPoint(playerid, 10.0, X, Y, Z)) return 1;
return 0;
}
//
if(IsPlayerNearObject(playerid, 61)) print("Player Is Near Object!");