Posts: 2,593
Threads: 34
Joined: Dec 2007
pawn Код:
if(sscanf(params, "s[14]D(-1)", option,clanid))
then
pawn Код:
if(clanid < 0) return SendClientMessage(playerid, -1, "usage: /clan join <clan id>");
Posts: 2,593
Threads: 34
Joined: Dec 2007
pawn Код:
CMD:clan(playerid, params[])
{
if(isnull(params))
{
return 1; //Dialog is here
}
if (!strcmp(params, "join", true, 4))
{
if(!params[4] || !('0' <= params[5] <= '9')) return SendClientMessage(playerid, -1, "usage: /clan join <clan id>");
new clanid = strval(params[5]);
}
else if (!strcmp(params, "accept", true, 6))
{
new id;
if (!params[6] || sscanf(params[7], "u", id)) SendClientMessage(playerid, -1, "usage: /clan accept <id>");
else if (id == INVALID_PLAYER_ID) SendErrorMessage(playerid, "player not found");
else{
}
}
else return 0; // Invalid parameter
return 1;
}