15.08.2013, 23:09
Gostava de saber como colocar no chat adm o lv de adm exemplo no chat queria que aparecesse: |ADMIN-CHAT| ADMIN LV 3 (Aqui й que queria por o lv do adm): Player_Tal:
Code do meu cmd de chat de admin:
Code do meu cmd de chat de admin:
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_GRAD2, "USO: (/a)dmin [admin chat]");
return 1;
}
if(strfind(nome, ADMPLAYER, true) == 0 || strfind(nome, ADMPLAYER2, true) == 0)
{
format(string, sizeof(string), "|Adm| %s: %s", ADMMASTER, result);
SendAdminMessage(YELLOW,string);
printf("|ADMIN-CHAT|%s: %s", sendername, result);
}
else
{
format(string, sizeof(string), "|ADMIN-CHAT|%s: %s", sendername, result);
SendAdminMessage(YELLOW,string);
printf("|ADMIN-CHAT| %s: %s", sendername, result);
}
}
}
return 1;
}