19.06.2012, 14:48
bom galera to em dъvida como passo esse comando para sscanf alguem me da um help.
pawn Код:
CMD:so(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmd);
while ((idx < length) && (cmd[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmd[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: (/so)cio [socio chat]");
return true;
}
format(string, sizeof(string), "*Socio %s: %s", sendername, result);
if (PlayerInfo[playerid][pSocio] >= 1)
{
SendSocioMessage(COLOR_YELLOW, string);
}
printf("Socio %s: %s", sendername, result);
}
return true;
}