Creating commands and using what?
#1

Hello all, actually i implemented a login and register system all works fine with dialogs.
I made a make admin script and works fine.
Here
PHP код:
if (strcmp("/makemeadmin"cmdtexttrue10) == 0//strcmp(
    
{
        if(
IsPlayerAdmin(playerid)==1)
        {
         new 
string[40];
        new 
alvl;
        
alvl=1337;
        
PlayerInfo[playerid][pAdmin]=alvl;
        
format(string,sizeof(string),"you have set your admin level to %i",alvl);
        
SendClientMessage(playerid,WHITE,string);
        return 
1;
        }
        else 
SendClientMessage(playerid,RED,"You are not BBFN"); return 1;
    } 
But i'm not sure if this structure => (strcmp("/makemeadmin", cmdtext, true, 10) == 0)
Is a good one to use for future commands.
I saw examples of zcmd or ycmd smth like that
Can you guys explain further and give me good tutorial links about a good commanding systems?
Thanks alot.
Reply
#2

There's several command processors available, as you said, like zcmd and y_commands.
They're faster to process commands than using Strcmp under OnPlayerText, you should definitely use them.
Reply
#3

Ok thank you for the advice, +REP.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)