14.02.2014, 13:01
After showing how you create the object changes everything. GetObjectPos will fail and you should use the functions of the streamer plugin.
pawn Код:
// global:
new box1;
// To the place you create the object:
box1 = CreateDynamicObject(2358,2245.6762700,-1183.1665000,1028.8868400,0.0000000,0.0000000,0.0000000,.interiorid = 15);
pawn Код:
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));
}