PDA

View Full Version : zCMD


moadi
15/10/2011, 01:02 PM
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.

SmiT
15/10/2011, 01:06 PM
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;
}

moadi
15/10/2011, 01:11 PM
Thanks. +rep