SA-MP Forums Archive
Disable all Commands Except... - 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: Disable all Commands Except... (/showthread.php?tid=359369)

Pages: 1 2


Re: Disable all Commands Except... - kbalor - 14.07.2012

Quote:
Originally Posted by Xtreme_playa
Посмотреть сообщение
You must have done something wrong, it always works. Check if you've made any typos again.
I think i just used ZCMD with Onplayercommantext that is not compatible with both.


Re: Disable all Commands Except... - Mark™ - 14.07.2012

Quote:
Originally Posted by kbalor
Посмотреть сообщение
I think i just used ZCMD with Onplayercommantext that is not compatible with both.
If you wish to use zcmd, then delete OnPlayerCommandText callback entirely.


Re: Disable all Commands Except... - kbalor - 14.07.2012

Quote:
Originally Posted by Andi_Evandy
Посмотреть сообщение
change
pawn Код:
OnPlayerCommandText(playerid,cmdtext[])
to:
pawn Код:
OnPlayerCommandReceived(playerid,cmdtext[])
tons of error. You want me to show? XD


Re: Disable all Commands Except... - kbalor - 14.07.2012

Quote:
Originally Posted by Xtreme_playa
Посмотреть сообщение
If you wish to use zcmd, then delete OnPlayerCommandText callback entirely.
then what will happen to this command?

Код:
{
     if(strcmp(cmdtext,"/t")==0 && cmdtext[2]=='\0')
     {
          if(gCommandsDisabled[playerid]==true)
          {
                //Text dialog blablab
                return 1:
          }

     }



Re: Disable all Commands Except... - kbalor - 14.07.2012

Anyone got a problem like this??

warning 203: symbol is never used: "zcmd_OnPlayerCommandText"


Re: Disable all Commands Except... - Roko_foko - 14.07.2012

Quote:
Originally Posted by kbalor
Посмотреть сообщение
then what will happen to this command?

Код:
{
     if(strcmp(cmdtext,"/t")==0 && cmdtext[2]=='\0')
     {
          if(gCommandsDisabled[playerid]==true)
          {
                //Text dialog blablab
                return 1:
          }

     }
I have never worked with ZCMD.
From previous posts I saw that you can't use OnPlayerCommandText at same time as ZCMD. Don't know if that is true.
Anyways, I think the command will look like this way in ZCMD :
pawn Код:
CMD:t(playerid, params[])
{
     if(gCommandsDisabled[playerid]==true)
     {
           //Text dialog blablab
           return 1:
     }
     //...
}