Command Block
#1

is there any code to block a command like
CMD: blockcmd
/blockcmd [command name]
if u r having it plz gimme i want to add it in my server Rep+
Reply
#2

What you mean /blockcmd [commandname] or /blockcmd [playerid] [commandname]


I mean u want it to block cmd for specific player or block for global likes this

if "/blockcmd help" so people won't able to use /help ?

or for specific player

if "/blockcmd yourfriendid help" so your friend won't able to use /help?
Reply
#3

yea thats the thing i want both commands! for stop player abusing that command
Reply
#4

it easy to you if you are not much newbie here

so create a variable like

new pblockcommand[MAX_PLAYERS][amountofvariable i mean how many command should it handle][strings = 256]

So if u want to create u need to create a command that you said above and use strcmp or strfind to check first u need to loop it till the amount of that variable so if it match the cmdname so u return 1/; to the usage command like


PHP Code:
CMD:imcool(playeridparam[])
{
   for(new 
1<= your amountifvariables++) // <<< loopcheck
   

    if(!
strcmp(pblockcommand[playerid][s], "imcool",true))// <<<< check for cmdname value in variable
    
{
                 
sendclientmessage(playerid,"you unable to use this command")
                 return 
1;
         }
   }
    
//cotinue if it not be block

i'm not sure that u will understanding me but now if u don't understand pm me i could teach u
Reply
#5

Show one player block cmd not all.... please i want it
https://sampforum.blast.hk/showthread.php?tid=658445
Reply
#6

Use zcmd publics with a global variable.
Reply
#7

ScriptzNull Command Blocker By BulletRaja
Reply
#8

Quote:
Originally Posted by SequenceCuz
View Post
it easy to you if you are not much newbie here

so create a variable like

new pblockcommand[MAX_PLAYERS][amountofvariable i mean how many command should it handle][strings = 256]

So if u want to create u need to create a command that you said above and use strcmp or strfind to check first u need to loop it till the amount of that variable so if it match the cmdname so u return 1/; to the usage command like


PHP Code:
CMD:imcool(playeridparam[])
{
   for(new 
1<= your amountifvariables++) // <<< loopcheck
   

    if(!
strcmp(pblockcommand[playerid][s], "imcool",true))// <<<< check for cmdname value in variable
    
{
                 
sendclientmessage(playerid,"you unable to use this command")
                 return 
1;
         }
   }
    
//cotinue if it not be block

i'm not sure that u will understanding me but now if u don't understand pm me i could teach u
Do you even know what the hell you're telling him… gosh! if you yourself are not sure about something just dont bother!
Reply
#9

Hey iLearner i know you very well dont u know /blockcmd? i want
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)