20.07.2010, 02:33
I'm trying to make a clan system, but there's a problem with the way I'm setting parameters.
What happens is, what ever I type after the /clan command, it takes it as the "create" one, disregarding any other thing.
What happens is, what ever I type after the /clan command, it takes it as the "create" one, disregarding any other thing.
pawn Код:
CMD:clan(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
// Non sscanf stuff, new's
if(sscanf(params, "s", clanrelated)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /clan [parameter]") && SendClientMessage(playerid, COLOR_WHITE, "PARAMETERS: create, show, hide, invite, acceptinvite");
if(sscanf(clanrelated, "create"))
{
// Stuff
}
else if(sscanf(clanrelated, "show"))
{
// Stuff
}
else if(sscanf(clanrelated, "hide"))
{
// Stuff
}
else if(sscanf(clanrelated, "invite"))
{
// Stuff
}
else if(sscanf(clanrelated, "acceptinvite"))
{
// Stuff
}
}
return 1;
}