06.01.2011, 20:16
Usa o result:
Exemplo:
/anm Fala Ae Viado Loko!
._.
Exemplo:
pawn Код:
if(strcmp(cmd, "/anm", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
GetPlayerName(playerid, pName, sizeof(pName));
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, COR_ERRO, "[ERRO] Uso correto: /anm [Texto]");
return 1;
}
format(string, sizeof(string), "|ATENЗГO| O Administrador %s, diz: %s", pName, result);
SendClientMessageToAll(COR_ADM,string);
}
else
{
SendClientMessage(playerid, COR_ERRO, "[ERRO] Vocк nгo й Administrador!");
return 1;
}
return 1;
}
._.