03.07.2011, 20:10
eae galera, tipo eu queria que no /a que й o chat de admin, que quando o admin digitasse aparecese o level de admin de cada player admin que fala algo ex: "1|ADMINCHAT|:E assim " ai aparecese o level de adm, no meu server o nivel de adm vai de 1 ate 8000 se puderem me ajudar ae valeus
cmd /a:
cmd /a:
pawn Код:
if(strcmp(cmd, "/admin", true) == 0 || strcmp(cmd, "/a", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new nome[24];
GetPlayerName(playerid, nome, sizeof nome);
if(PlayerInfo[playerid][pAdmin] >= 1 || strfind(nome, ADMPLAYER, true) == 0 || strfind(nome, ADMPLAYER2, true) == 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_RED, "USO: (/a)dmin [admin chat]");
return 1;
}
if(strfind(nome, ADMPLAYER, true) == 0 || strfind(nome, ADMPLAYER2, true) == 0)
{
format(string, sizeof(string), "|ADMIN| %s: %s", ADMMASTER, result);
SendAdminMessage(GOLDENROD1,string);
printf("|ADMIN-CHAT|%s: %s", sendername, result);
}
else
{
format(string, sizeof(string), "|ADMIN-CHAT| %s: %s", sendername, result);
SendAdminMessage(GOLDENROD1,string);
printf("|ADMIN-CHAT| %s: %s", sendername, result);
}
}
}
return 1;
}