[Pomoc] Komanda

Započeo ANDRIJAâ„¢, Septembar 04, 2012, 20:06:53 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: TDM BLK
Detaljan opis problema: Pokusao sam da napravim najjadnostvaniju komandu .. za /admini ali sta god napravim nece IG da radi.. mozel neko ko zna da lijepo radi napravi komandu samo da pise admini online nista vise i imas " 2 (DVA) " nivoa admina moolim vas i napisite difine plzz  :(
Dio skripte: //
Neke slike/video za lakse dobivanje pomoci(neobavezno):

Capetroon.

Koristi tražilicu naći češ.

Probaj ovo
if (strcmp(cmd, "/admins", true) == 0 || strcmp(cmd, "/admini", true) == 0)
{
        if(IsPlayerConnected(playerid))
    {
new count = 0; new ime[MAX_PLAYER_NAME];
SendClientMessage(playerid, SVETLOPLAVA, "Online admini");
for(new i; i< MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] < 1338)
{
GetPlayerName(i, ime, sizeof(ime));
format(string, sizeof(string), "{F81414}Admin: {FFFFFF}%s | {00C0FF}Level: {FFFFFF}%d", ime, PlayerInfo[i][pAdmin])
SendClientMessage(playerid, WHITE, string);
count++;
}
}
}
if(count == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, ""COL_RED"   Nijedan admin nije online!");
return 1;
}
}
return 1;
}


A ovo ?
if (strcmp(cmd, "/admins", true) == 0 || strcmp(cmd, "/admini", true) == 0)
{
        if(IsPlayerConnected(playerid))
    {
        SendClientMessage(playerid, COLOR_GREEN, "Online admini");
foreach (Player, i)
{
    if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] < 1338)
    {
    new admtext[256];
    if(PlayerInfo[i][pAdmin] == 1337) { admtext = "1337"; }
    else if(PlayerInfo[i][pAdmin] == 4) { admtext = "4"; }
else if(PlayerInfo[i][pAdmin] == 3) { admtext = "3"; }
else if(PlayerInfo[i][pAdmin] == 2) { admtext = "2"; }
else if(PlayerInfo[i][pAdmin] == 1) { admtext = "1"; }
else { admtext = "1"; }
GetPlayerName(i, sendername, sizeof(sendername));
if(AdminDuty[i] == 1)
{
    format(string, 256, "{F81414}Admin: {FFFFFF}%s | {00C0FF}Level: {FFFFFF}", sendername, admtext);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
else
{
format(string, 256, "{F81414}Admin: {FFFFFF}%s | {00C0FF}Level: {FFFFFF}%s ", sendername, admtext);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
}
}
return 1;
}


I jel oces u ZCMD ili kako ?

Vegas.

Probaj if (strcmp(cmd, "/admins", true) == 0 || strcmp(cmd, "/admini", true) == 0)
{
        if(IsPlayerConnected(playerid))
    {
new ime[MAX_PLAYER_NAME];
SendClientMessage(playerid, -1, "Online admini");
foreach (Player, i)
    {
if(PlayerInfo[i][pAdmin] >0)
{
GetPlayerName(i, ime, sizeof(ime));
format(string, sizeof(string), "{F81414}Admin: {FFFFFF}%s | {00C0FF}Level: {FFFFFF}%d", ime, PlayerInfo[i][pAdmin])
SendClientMessage(playerid, -1, string);
}
}
}
else
{
SendClientMessage(playerid, -1, "   Nijedan admin nije online!");
return 1;
}
return 1;
}


CMD:admins(playerid,params[])
{
new str[128];
SendClientMessage(playerid, -1, " _______ ADMINI _______");
for(new i = 0; i < MAX_PLAYERS; i++)
{
    if(IsPlayerConnected(i))
    {
        if(PlayerInfo[i][pAdmin] > 0)
{
    new ime[MAX_PLAYER_NAME]; GetPlayerName(i, ime, sizeof(ime));
    format(str,128, " - Admin %s, Level %d", ime, PlayerInfo[i][pAdmin]);
    SendClientMessage(playerid, -1, str);
}
}
}
return 1;
}


??? Zameni ovo pAdmin ako ti nije taj enum :D