29.04.2014, 19:05
I've been doing on some farm job sys. and everything works but this function
it just wont work, it says im not near the object when im standing in it
Код:
if(FarmActive[playerid] == 1) { for(new id = 0; id < createdobjects[playerid]; id++) { new Float:Pos[3]; GetDynamicObjectPos(farmobject[playerid][id], Pos[0], Pos[1], Pos[2]); if(!IsPlayerInRangeOfPoint(playerid, 3.0, Pos[0], Pos[1], Pos[2])) return SCM(playerid, TOMATO, " (greska) You're not near-by the farm object !"); SetPlayerAttachedObject(playerid, 0, 2901, 1, -0.022000, -0.212999, -0.007000, 0.000000, -2.099999, -2.599998, 0.612999, 0.439000, 0.607999, 0, 0); SCM(playerid, YELLOW, " (info) Executed !"); DestroyDynamicObject(farmobject[playerid][id]); createdobjects[playerid] --; } }