10.03.2013, 15:27
Como eu faзo?
if (strcmp(cmd, "/admins", true) == 0) { SendClientMessage(playerid, COR_ADMIN, "Admins Online:"); for(new i = 0; i <= MAX_PLAYERS; i++) { if(IsPlayerConnected(i) == 1 && PlayerInfo[i][pAdmin] > 0) { if(admhide[i] == 0) { GetPlayerName(i, sendername, sizeof(sendername)); new lolz[20]; if(PlayerInfo[i][pAdmin] == 1) { lolz = "1"; } if(PlayerInfo[i][pAdmin] == 2) { lolz = "2"; } if(PlayerInfo[i][pAdmin] == 3) { lolz = "3"; } if(PlayerInfo[i][pAdmin] == 4) { lolz = "4"; } if(PlayerInfo[i][pAdmin] >= 5 && PlayerInfo[i][pAdmin] <= 1340) { lolz = "MASTER"; } if(PlayerInfo[i][pAdmin] >= 1341 && PlayerInfo[i][pAdmin] <= 3000) { lolz = "SUB-DONO"; } if(PlayerInfo[i][pAdmin] >= 3001) { lolz = "DONO"; } if(away[i] == 0) { if(admtrampando[i] == 1) { format(string, 128, "Admin: %s Nivel:[%s] \n", sendername, lolz); SendClientMessage(playerid,COLOR_GRAD1,string); } else { format(string, 128, "Admin: %s Nivel:[%s][JOGANDO]\n", sendername, lolz); SendClientMessage(playerid,COLOR_GRAD1,string); } } else { format(string, 128, "Admin: %s Nivel:[%s][AFK]\n", sendername, lolz); SendClientMessage(playerid,COLOR_GRAD1,string); strcat(gstring,string); } } } } return true; }
if(strcmp(cmd, "/admins", true) == 0)
{
SendClientMessage(playerid, COR_ADMIN, "Admins Online:");
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1 && PlayerInfo[i][pAdmin] > 0)
{
if(admhide[i] == 0)
{
GetPlayerName(i, sendername, sizeof(sendername));
new lolz[20];
if(PlayerInfo[i][pAdmin] == 1)
{
lolz = "1";
}
if(PlayerInfo[i][pAdmin] == 2)
{
lolz = "2";
}
if(PlayerInfo[i][pAdmin] == 3)
{
lolz = "3";
}
if(PlayerInfo[i][pAdmin] == 4)
{
lolz = "4";
}
if(PlayerInfo[i][pAdmin] >= 5 && PlayerInfo[i][pAdmin] <= 1340)
{
lolz = "MASTER";
}
if(PlayerInfo[i][pAdmin] >= 1341 && PlayerInfo[i][pAdmin] <= 3000)
{
lolz = "SUB-DONO";
}
if(away[i] == 0)
{
if(admtrampando[i] == 1)
{
format(string, 128, "Admin: %s Nivel:[%s] \n", sendername, lolz);
SendClientMessage(playerid,COLOR_GRAD1,string);
}
else
{
format(string, 128, "Admin: %s Nivel:[%s][JOGANDO]\n", sendername, lolz);
SendClientMessage(playerid,COLOR_GRAD1,string);
}
}
else
{
format(string, 128, "Admin: %s Nivel:[%s][AFK]\n", sendername, lolz);
SendClientMessage(playerid,COLOR_GRAD1,string);
strcat(gstring,string);
}
}
}
}
return true;
}
Tгo facil
pawn Код:
|
if (strcmp(cmd, "/admins", true) == 0)
{
SendClientMessage(playerid, COR_ADMIN, "Admins Online:");
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1 && PlayerInfo[i][pAdmin] > 0)
{
if(admhide[i] == 0)
{
GetPlayerName(i, sendername, sizeof(sendername));
new lolz[20];
if(PlayerInfo[i][pAdmin] == 1)
{
lolz = "1";
}
if(PlayerInfo[i][pAdmin] == 2)
{
lolz = "2";
}
if(PlayerInfo[i][pAdmin] == 3)
{
lolz = "3";
}
if(PlayerInfo[i][pAdmin] == 4)
{
lolz = "4";
}
if(PlayerInfo[i][pAdmin] >= 5 && PlayerInfo[i][pAdmin] <= 1340)
{
lolz = "MASTER";
}
if(PlayerInfo[i][pAdmin] >= 1341 && PlayerInfo[i][pAdmin] <= 3000)
{
lolz = "SUB-DONO";
}
if(away[i] == 0)
{
if(PlayerInfo[i][pAdmin] == 3001)
{
SendClientMessage(playerid,-1,"");
}
if(admtrampando[i] == 1)
{
format(string, 128, "Admin: %s Nivel:[%s] \n", sendername, lolz);
SendClientMessage(playerid,COLOR_GRAD1,string);
}
else
{
format(string, 128, "Admin: %s Nivel:[%s][JOGANDO]\n", sendername, lolz);
SendClientMessage(playerid,COLOR_GRAD1,string);
}
}
else
{
format(string, 128, "Admin: %s Nivel:[%s][AFK]\n", sendername, lolz);
SendClientMessage(playerid,COLOR_GRAD1,string);
strcat(gstring,string);
}
}
}
}
return true;
}
if (strcmp(cmd, "/admins", true) == 0)
{
SendClientMessage(playerid, COR_ADMIN, "Admins Online:");
for(new i = 0; i <= MAX_PLAYERS; i++) {
if(IsPlayerConnected(i) == 1 && PlayerInfo[i][pAdmin] > 0) {
if(admhide[i] == 0) {
GetPlayerName(i, sendername, sizeof(sendername));
new lolz[20];
switch(PlayerInfo[i][pAdmin]) {
case 1: lolz = "1";
case 2: lolz = "2";
case 3: lolz = "3";
case 4: lolz = "4";
case 5: lolz = "MASTER";
case 1340: lolz = "MASTER";
case 1341: lolz = "SUB-DONO";
case 3000: lolz = "SUB-DONO";
}
if(away[i] == 0) {
if(PlayerInfo[i][pAdmin] == 3001)
SendClientMessage(playerid,COLOR_GRAD1,#);
else
{
format(string, 128, "Admin: %s Nivel:[%s] %s\n", sendername, lolz, Trampando[i] ? (#) : ("[JOGO]"));
SendClientMessage(playerid,COLOR_GRAD1,string);
}
}
else
{
format(string, 128, "Admin: %s Nivel:[%s] [AFK]\n", sendername, lolz);
SendClientMessage(playerid,COLOR_GRAD1,string);
strcat(gstring,string);
}
}
}
}
return true;
}
if(PlayerInfo[i][pAdmin] == 3001)
{
SendClientMessage(playerid,-1,"");
}