SA-MP Forums Archive
How to disable/enable command - 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: How to disable/enable command (/showthread.php?tid=504905)



How to disable/enable command - Shazwan - 06.04.2014

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.


Re: How to disable/enable command - ReD_HunTeR - 06.04.2014

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;
}



Re: How to disable/enable command - Shazwan - 06.04.2014

Thank you so much rep+


Re: How to disable/enable command - Shazwan - 06.04.2014

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


Re: How to disable/enable command - ReD_HunTeR - 06.04.2014

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