/rrb (remove road blocks)
#4

PHP код:
if(!IsPlayerConnected(playerid)) return 0
This can be deleted as you need to be connected to execute a command anyway.

PHP код:
if(PlayerInfo[playerid][pRank] < 3
Shouldn't this be
PHP код:
if(PlayerInfo[playerid][pRank] >= 3
This would mean your rank needs to be at 3 or higher to execute this command.

PHP код:
SendClientMessage(playeridCOLOR_GREY"Your rank is too low to set a Road Block!"); 
The command is used to destroy roadblocks, but your message indicates that you would create a roadblock, it's confusing.

And it could be written like this:
PHP код:
if(strcmp(cmd"/rrb"true) == 0)
{
    if(
PlayerInfo[playerid][pRank] < 3) return SendClientMessage(playeridCOLOR_GREY"Your rank is too low to set a Road Block!");
    if(
PlayerInfo[playerid][pFaction] != 255 && FactionInfo[PlayerInfo[playerid][pFaction]][fType] == 1)
    {
        for(new 
0MAX_OBJECTSo++)
        {
            
DestroyObject(RoadBlockObject[o]);
            
RoadBlocks 0;
        }
        
SendClientMessage(playeridCOLOR_WHITE"All Road Blocks destroyed..");
    }
        
    return 
1;

Reply


Messages In This Thread
/rrb (remove road blocks) - by CSLangdale - 22.02.2016, 20:45
Re: /rrb (remove road blocks) - by CSLangdale - 23.02.2016, 07:22
Re: /rrb (remove road blocks) - by ]Rafaellos[ - 23.02.2016, 09:09
Re: /rrb (remove road blocks) - by AmigaBlizzard - 23.02.2016, 09:57
Re: /rrb (remove road blocks) - by ]Rafaellos[ - 23.02.2016, 10:44
Re: /rrb (remove road blocks) - by CSLangdale - 23.02.2016, 14:31
Re: /rrb (remove road blocks) - by Pottus - 23.02.2016, 16:47
Re: /rrb (remove road blocks) - by SamJust - 23.02.2016, 19:03
Re: /rrb (remove road blocks) - by CSLangdale - 23.02.2016, 19:32
Re: /rrb (remove road blocks) - by CSLangdale - 23.02.2016, 19:34

Forum Jump:


Users browsing this thread: 1 Guest(s)