05.01.2011, 17:13
Ou assim...
pawn Code:
if (strcmp("/FnA", cmdtext, true, 10) == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "DIGITE /FnA [texto]");
return 1;
}
GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"[FnA] - %s: %s"sendername,result);
SendClientMessageToAll(Azul,string);
return 1;
}