09.10.2012, 12:17
(
Последний раз редактировалось park4bmx; 09.10.2012 в 12:50.
)
ok so i create 3 objects into 1 variable with 3 arrays
How the objects are created
This loops through them all and if near any of them does the function/
problem: when Check to see what object the player is closes to, only the first created object works WHY ?
is like the loop runs only 1 time :X
SOVLED
How the objects are created
PHP код:
new ID = 0;
while(ID < sizeof (DropObject) && DropObject[playerid][ID])
{
ID++;
}
if(ID == sizeof(DropObject))
{
//arrays are full!
return 0;
}
DropObject[playerid][ID] = CreateObject(1685,pX,pY,pZ+82,0.00000000,0.00000000,90.00000000);
PHP код:
new Float:Ox, Float:Oy, Float:Oz;
for(new i = 0; i < sizeof(DropObject); i++)
{
GetObjectPos(DropObject[playerid][i], Ox, Oy, Oz);
if(IsPlayerInRangeOfPoint(playerid, 4.0, Ox, Oy, Oz))
{
DropObject[playerid][i] =0;
}else return SendClientMessage(playerid,COLOR_RED,"Not Near...!");
}
is like the loop runs only 1 time :X
SOVLED