Command Block - 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: Command Block (
/showthread.php?tid=551347)
Command Block -
Rog - 18.12.2014
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+
Re: Command Block -
SequenceCuz - 18.12.2014
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?
Re: Command Block -
Rog - 18.12.2014
yea thats the thing i want both commands! for stop player abusing that command
Re: Command Block -
SequenceCuz - 18.12.2014
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(playerid, param[])
{
for(new s = 1; s <= your amountifvariable; s++) // <<< 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
Re: Command Block -
MSam - 06.09.2018
Show one player block cmd not all.... please i want it
https://sampforum.blast.hk/showthread.php?tid=658445
Re: Command Block -
v1k1nG - 07.09.2018
Use zcmd publics with a global variable.
Re: Command Block -
CaptainBoi - 07.09.2018
ScriptzNull Command Blocker By BulletRaja
Re: Command Block -
iLearner - 07.09.2018
Quote:
Originally Posted by SequenceCuz
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(playerid, param[])
{
for(new s = 1; s <= your amountifvariable; s++) // <<< 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!
Re: Command Block -
MSam - 08.09.2018
Hey iLearner i know you very well dont u know /blockcmd? i want