23.02.2016, 09:09
It should be like this, but, RoadBlocksFBI will never destroy since the command is already for Rank 3.
pawn Код:
if(strcmp(cmd, "/rrb", true) == 0)
{
if(!IsPlayerConnected(playerid)) return 0;
if(PlayerInfo[playerid][pRank] < 3)
{
if(PlayerInfo[playerid][pFaction] != 255 && FactionInfo[PlayerInfo[playerid][pFaction]][fType] == 1)
{
for(new o = 0; o < MAX_OBJECTS; o++)
{
DestroyObject(RoadBlockObject[o]);
RoadBlocks = 0;
}
SendClientMessage(playerid, COLOR_WHITE, "All Road Blocks destroyed..");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Your rank is too low to set a Road Block!");
}
return 1;
}