Help with command bug - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with command bug (
/showthread.php?tid=321349)
Help with command bug -
boyan96 - 26.02.2012
PHP код:
new bool:BlockCommands;
Block Command:
pawn Code:
if( !strcmp( cmdtext, "/blockcommands", true ) )
{
BlockCommands = true;
SendClientMessage( playerid, -1, "You have blocked commands to all players." );
SendClientMessage( playerid, -1, "Use {C0C0C0}/unblockcommands {FFFFFF}to unblock them." );
return 1;
}
Unblock Command:
pawn Code:
if( !strcmp( cmdtext, "/unblockcommands", true ) )
{
BlockCommands = false;
SendClientMessage( playerid, -1, "You have unblocked commands to all players." );
SendClientMessage( playerid, -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
Re: Help with command bug -
[XST]O_x - 26.02.2012
You need to be connected to RCON. Use /rcon login password and try the command again.