23.02.2011, 14:02
Fiz um /av Bem legal todo seu:
Espero Ter Ajudado
pawn Код:
if(strcmp(cmd, "/avisar", true) == 0 || strcmp(cmd, "/av", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerAdmin(playerid))//Tem que estar logado da RCON :D
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й um Admin!");
return 1;
}
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, "{02EDE}USE: {02EDED}(/av)isar [TEXTO]");
return 1;
}
SendClientMessageToAll(COLOR_DBLUE, "{02EDED}|_____________{FF0037}Aviso Do Admin{02EDED}_____________|");
format(string, sizeof(string), "{046DB3}***{FF0037}Admin: {{02EDED}%s {FF00BF}ID:[{02EDED}%d]: {02EDED}%s", sendername, playerid, result);
SendClientMessageToAll(0x33FF00FF, string);
}
return 1;
}