zCMD - 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 (
/showthread.php?tid=290335)
zCMD -
moadi - 15.10.2011
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.
Re: zCMD -
SmiT - 15.10.2011
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;
}
Re: zCMD -
moadi - 15.10.2011
Thanks. +rep