Help with command bug
#1

PHP код:
new bool:BlockCommands;
Block Command:
pawn Code:
if( !
strcmpcmdtext"/blockcommands"true ) )
{
    
BlockCommands true;
    
SendClientMessageplayerid, -1"You have blocked commands to all players." );
    
SendClientMessageplayerid, -1"Use {C0C0C0}/unblockcommands {FFFFFF}to unblock them." );
    return 
1;
}
Unblock Command:
pawn Code:
if( !
strcmpcmdtext"/unblockcommands"true ) )
{
    
BlockCommands false;
    
SendClientMessageplayerid, -1"You have unblocked commands to all players." );
    
SendClientMessageplayerid, -1"Use {C0C0C0}/blockcommands {FFFFFF}to block them." );
    return 
1;

Put at the top of the OnPlayerCommandText Callback:
pawn Code:
if( BlockCommands && !IsPlayerAdmin( playerid ) ) return SendClientMessage( playerid, -1, "You can't use commands because an Admin disabled them." );



when i disable the commands i can't unblock them to can work again it's giving me this "You can't use commands because an Admin disabled them." when i write /unblockcommands how we can fix it
Reply


Messages In This Thread
Help with command bug - by boyan96 - 26.02.2012, 17:24
Re: Help with command bug - by [XST]O_x - 26.02.2012, 18:07

Forum Jump:


Users browsing this thread: 1 Guest(s)