23.02.2016, 09:57
PHP код:
if(!IsPlayerConnected(playerid)) return 0;
PHP код:
if(PlayerInfo[playerid][pRank] < 3)
PHP код:
if(PlayerInfo[playerid][pRank] >= 3)
PHP код:
SendClientMessage(playerid, COLOR_GREY, "Your rank is too low to set a Road Block!");
And it could be written like this:
PHP код:
if(strcmp(cmd, "/rrb", true) == 0)
{
if(PlayerInfo[playerid][pRank] < 3) return SendClientMessage(playerid, COLOR_GREY, "Your rank is too low to set a Road Block!");
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..");
}
return 1;
}