22.07.2014, 14:41
i have made a system for money bag,it drops the money object near the player pos with random coordinates like +1 x and +2 y or.,,but how can i save the object pos as ObjCoords[a][0] ObjCoords[a][1] ObjCoords[a][2]
code:
code:
pawn Код:
new f = 100+1;
new rpos[2];
for(new a = 0; a < sizeof(ObjCoords); a++)
{
if(ObjCoords[a][0] == 0.0)
{
f = a;
break;
}
}
GetPlayerPos(playerid, ObjCoords[f][0], ObjCoords[f][1], ObjCoords[f][2]);
rpos[0] = random(4), rpos[1] = random(4);
object = CreateDynamicObject(1212,ObjCoords[f][0]+ rpos[0],ObjCoords[f][1]+ rpos[1],ObjCoords[f][2]-1,180.0,180.0,120.0, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), -1, 100.0);
GetDynamicObjectPos(object[f], ObjCoords[f][0], ObjCoords[f][1], ObjCoords[f][2]);
}