15.07.2015, 22:01
(
Последний раз редактировалось Fjclip99; 16.07.2015 в 11:56.
)
Hello!
So for some reason the code i made is not working...
So the code is to check if is player in range of a object... Every player can have 200 objects... And the coordinates are saved as
posX[playerid][object-number], posY...
So now if i want to check all the object positions i need a dual loop(one loop for all the players, other for all the objects)
Hope someone understands me
EDIT: This script is for a command so a player can create a object - and he mustn't be close to other objects of other players (and of course his objects)...
So for some reason the code i made is not working...
So the code is to check if is player in range of a object... Every player can have 200 objects... And the coordinates are saved as
posX[playerid][object-number], posY...
So now if i want to check all the object positions i need a dual loop(one loop for all the players, other for all the objects)
Код:
for(new pid = 0; pid < MAX_PLAYERS; pid++) { for(new id=0; id<201; id++) { if(IsPlayerInRangeOfPoint(playerid,3.0,posX[pid][id],posY[pid][id],posZ[pid][id])) { return SendClientMessage(playerid,COLOR_RED,"You are too close."); } //something here... } }
EDIT: This script is for a command so a player can create a object - and he mustn't be close to other objects of other players (and of course his objects)...