How to disable/enable command
#1

Hello i want to know if there is disable/enable cmd in game, example like most of the admin use /givememinigun. I want to disable it using this /disablecmd "givememinugun' or /enablecmd "givememinigun just for temperorary, but not just givememinigun, even other cmd if can be enable or disable.
Reply
#2

pawn Код:
new minigundisable;

CMD:givememinigun(playerid, params[])
{
   if(minigundisable == 1) return SendClientMessage(playerid, 0xFF0000AA, "This Command is disabled");
   else if(minigundisable == 0)
   {
      //Type Your Things here, if its available...
   }
   return 1;
}

CMD:allowminigun(playerid, params[])
{
   if(minigundisable == 0)
   {
      SendClientMessage(playerid, 0xFF0000AA, "You've Disabled Admin, using /givememinigun Command");
      minigundisable = 1;
   }
   else if(minigundisable == 1)
   {
      SendClientMessage(playerid, 0xFF0000AA, "You've Enable Admin, using /givememinigun Command");
      minigundisable = 0;
   }
   return 1;
}
Reply
#3

Thank you so much rep+
Reply
#4

One more thing about that //Type Your Things here, if its available...
what example it is?
Reply
#5

type your command there give him weapon i mean do you have old /givememinigun command? type full there
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)