14.01.2012, 18:07
Hello, how I make a Gang Command using Sscanf? I tried this (but don't work correctly):
Help me please and sorry from my bad English
pawn Код:
YCMD:gang(playerid, params[], pHELPS)
{
new gParams[10];
if(sscanf(params, "s[10]", gParams))
{
SendClientMessage(playerid, 0xFFFFFFFF, "USE: /gang [create/invite]");
return 1;
}
if(!strcmp(params, "create", true))
{
new gName[20];
if(sscanf(gParams, "s[20]", gName))
{
SendClientMessage(playerid, 0xFFFFFFFF, "USE: /gang create [Name]");
return 1;
}
SendPlayerMessage(playerid, 0xFFFFFFFF, "Created: %s", gName); // debug
return 1;
}
return 1;
}