zcmd + global if OnPlayerCommandReceived
#1

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.
Reply
#2

For your purpose I think y_commands + y_groups would be better, not to mention easier.
Reply
#3

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. ^^
Reply
#4

Well, I guess you could just use strfind to check the cmdtext:

pawn Код:
if( strfind( cmdtext, "commandhere" ) != -1 || strfind( cmdtext, "othercommand" ) != -1 )
    return ALSIDHDJIOASD;
Reply
#5

Oh true! Stupid me. Thank you for remind. ^.^ Rep++.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)