09.10.2012, 12:34
well i have tried many debugs.
first 1
but this didnt even show the print.
Second debug
and that showed me that it looped the same object ID twice, Only if im near the first created object!
otherwise nothing
Edit: i will run more Debugs in a minute, as i have to do something else.
first 1
PHP код:
new Float:Ox, Float:Oy, Float:Oz;
new counter=0;
for(new i = 0; i < sizeof(DropObject); i++)
{
counter++;
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...!");
}
printf("Looped: %d",counter);
Second debug
PHP код:
new Float:Ox, Float:Oy, Float:Oz;
for(new i = 0; i < sizeof(DropObject); i++)
{
printf("%d",DropObject[playerid][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...!");
}
otherwise nothing
Edit: i will run more Debugs in a minute, as i have to do something else.