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
#2

You need to be connected to RCON. Use /rcon login password and try the command again.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)