SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 14/07/2012, 01:28 PM   #21
kbalor
High-roller
 
kbalor's Avatar
 
Join Date: May 2012
Location: Philippines
Posts: 1,229
Reputation: 54
Default Re: Disable all Commands Except...

Quote:
Originally Posted by Xtreme_playa View Post
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.
__________________
kbalor is offline   Reply With Quote
Old 14/07/2012, 01:33 PM   #22
Markô
High-roller
 
Markô's Avatar
 
Join Date: Apr 2011
Location: Ile-de-France
Posts: 1,801
Reputation: 431
Default Re: Disable all Commands Except...

Quote:
Originally Posted by kbalor View Post
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.
__________________
Markô is offline   Reply With Quote
Old 14/07/2012, 01:39 PM   #23
kbalor
High-roller
 
kbalor's Avatar
 
Join Date: May 2012
Location: Philippines
Posts: 1,229
Reputation: 54
Default Re: Disable all Commands Except...

Quote:
Originally Posted by Andi_Evandy View Post
change
pawn Code:
OnPlayerCommandText(playerid,cmdtext[])
to:
pawn Code:
OnPlayerCommandReceived(playerid,cmdtext[])
tons of error. You want me to show? XD
__________________
kbalor is offline   Reply With Quote
Old 14/07/2012, 01:42 PM   #24
kbalor
High-roller
 
kbalor's Avatar
 
Join Date: May 2012
Location: Philippines
Posts: 1,229
Reputation: 54
Default Re: Disable all Commands Except...

Quote:
Originally Posted by Xtreme_playa View Post
If you wish to use zcmd, then delete OnPlayerCommandText callback entirely.
then what will happen to this command?

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

     }
__________________
kbalor is offline   Reply With Quote
Old 14/07/2012, 02:21 PM   #25
kbalor
High-roller
 
kbalor's Avatar
 
Join Date: May 2012
Location: Philippines
Posts: 1,229
Reputation: 54
Default Re: Disable all Commands Except...

Anyone got a problem like this??

warning 203: symbol is never used: "zcmd_OnPlayerCommandText"
__________________
kbalor is offline   Reply With Quote
Old 14/07/2012, 10:00 PM   #26
Roko_foko
Gangsta
 
Join Date: Jul 2009
Location: Croatia, Split
Posts: 543
Reputation: 37
Default Re: Disable all Commands Except...

Quote:
Originally Posted by kbalor View Post
then what will happen to this command?

Code:
{
     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 Code:
CMD:t(playerid, params[])
{
     if(gCommandsDisabled[playerid]==true)
     {
           //Text dialog blablab
           return 1:
     }
     //...
}
Roko_foko is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to disable commands in jail? Sensitive Scripting Help 27 25/08/2011 12:46 PM
How to disable commands? Ernests Help Archive 2 30/04/2011 01:47 PM
Disable Commands CraZy_KiLLaH Help Archive 1 20/03/2011 07:38 PM
disable commands addysnow1 Help Archive 0 07/10/2009 09:13 PM
How do i enable and disable commands? Coolman12 Help Archive 9 18/04/2009 10:47 AM


All times are GMT. The time now is 11:31 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.