09.08.2014, 23:52
(
Последний раз редактировалось Juvanii; 10.08.2014 в 00:51.
)
Please somebody tell me why this problem happens, i've been so long trying to fix that!
I made a command to remove the closest roadblock but it only works on the first roadblock that i created and the other ones it send the client message: There is no roadblock close enough to you.
Here are a samples for the commands:
I made a command to remove the closest roadblock but it only works on the first roadblock that i created and the other ones it send the client message: There is no roadblock close enough to you.
Here are a samples for the commands:
pawn Код:
CMD:rb(playerid, params[]) // creating roadblock command!
{
CreateRoadblock(978,x,y,z,a); //it's just an example so no need for the whole command!
return 1;
}
CMD:rrb(playerid, params[]) // removing closest roadblock command
{
for(new i = 0; i < sizeof(RBInfo); i++)
{
if(!IsPlayerInRangeOfPoint(playerid, 5.0, RBInfo[i][rX], RBInfo[i][rY], RBInfo[i][rZ])) return SendClientMessage(playerid, COLOR_WHITE, "{FF0000}Error: {FFFFFF}There is no roadblock close enough to you.");
DeleteClosestRoadblock(playerid);
return 1;
}
return 1;
}