#1

Hey there,

I've been trying to script some chatting channels and I wanted to make such thing as..
/irc join/leave/members etc
I mean by using one CMD "/irc" i'll be able to do everything so I don't have to make multipe cmds such as /ircjoin /ircleave /ircmembers instead of making one CMD which includes all of these.
P.S: i'm using zCMD as my commands proccesor.

Thanks.
Reply
#2

pawn Код:
CMD:irc(playerid, params[])
{
    new
        option[ 50 ];
    if( sscanf ( params, "s[50]", option ) ) return SendClientMessage( playerid, -1, #Syntax /irc join/leave/members );
    if( !strcmp( option,"Join" ) )
    {
        // If parameters are "Join" do you code
    }
    else if( !strcmp(option,"Leave" ) )
    {
        // If paramters are "Leave" do you code
    }
    else if( !strcmp( option,"Members" ) )
    {
        // If paramters are "Members" do you code
    }
    else
    {
        SendClientMessage( playerid, -1, #Unknown parameter );
    }
    return true;
}
Reply
#3

Thanks. +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)