16.03.2014, 04:10
Hmm no, because i can't see how Barricade[] is defined, perhaps you can count how many objects were deleted, by checking if the object is valid, like this:
Not tested yet, hope it works.
pawn Код:
new x = 0;
for(new i; i<MAX_BARRICADES; i++)
{
if(IsValidDynamicObject(Barricade[i]))
{
DestroyDynamicObject(Barricade[i]);
x++;
}
}
if(x > 0)
{
foreach(Player, x)
{
if(IsACop(x))
{
SendClientMessage(x, TEAM_BLUE_COLOR, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "There is no barricade to destroy!");
}