zcmd + global if OnPlayerCommandReceived - 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: zcmd + global if OnPlayerCommandReceived (
/showthread.php?tid=418062)
zcmd + global if OnPlayerCommandReceived -
IgrexolonO - 23.02.2013
Hi. I've got bunch of commands. I won't start every simple command with "SendClientMessage - you're not an admin!".
I would like to make global if in OnPlayerCommandReceived.
Should I do something like this..:
Код:
if(CallRemoteFunction("adminspec", "", false) || CallRemoteFunction("adminspawn", "", false)) return SendClientMessage(playerid,0,"You're not an admin"), 1;
or what?
Regards.
Re: zcmd + global if OnPlayerCommandReceived -
LarzI - 23.02.2013
For your purpose I think y_commands + y_groups would be better, not to mention easier.
Re: zcmd + global if OnPlayerCommandReceived -
IgrexolonO - 23.02.2013
Well. I was going to use ******' script, but as far as he packed too many shits into it, I won't use it. So please help me with global if. ^^
Re: zcmd + global if OnPlayerCommandReceived -
LarzI - 23.02.2013
Well, I guess you could just use strfind to check the cmdtext:
pawn Код:
if( strfind( cmdtext, "commandhere" ) != -1 || strfind( cmdtext, "othercommand" ) != -1 )
return ALSIDHDJIOASD;
Re: zcmd + global if OnPlayerCommandReceived -
IgrexolonO - 23.02.2013
Oh true! Stupid me. Thank you for remind. ^.^ Rep++.