[POMOC] Online Admins

Započeo Dobrica, April 23, 2017, 15:03:44 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Edit
Detaljan opis problema: Radio sam komandu, za online / offline admine, meni samo prikaze online. tj nece da prikaze OFFline.
Dio skripte: Dole
Neke slike/video za lakse dobivanje pomoci(neobavezno):


CMD:admins(playerid,params[])
{
    if(pi_logged[playerid] == true)
{
new string[124];
new string_admin[1000];
strdel(string_admin,0,sizeof(string_admin));

for(new admin_id = 1; admin_id < MAX_ADMINS; admin_id++)
{
new adms_files[50];
format(adms_files,sizeof(adms_files),FILE_ADMIN,admin_id);
if(fexist(adms_files))
{
if(ADMIN_INFO[admin_id][a_level] > 0)
{
if(IsPlayerConnected(p_player_on_off(ADMIN_INFO[admin_id][a_ime])))
{
format(string,sizeof(string),"{FFFFFF}Ime AXS\t{FFFFFF}Level AXS\t{FFFFFF}Status AXS\n\
{FFFFFF}%s\t{FFFFFF}%d\t{118A0C}Online\n",ADMIN_INFO[admin_id][a_ime],ADMIN_INFO[admin_id][a_level]);
strcat(string_admin,string);
}
else if(!IsPlayerConnected(ADMIN_INFO[admin_id][a_ime]))
{
format(string,sizeof(string),"{FFFFFF}Ime AXS\t{FFFFFF}Level AXS\t{FFFFFF}Status AXS\n\
{FFFFFF}%s\t{FFFFFF}%d\t{F5052D}Offline\n",ADMIN_INFO[admin_id][a_ime],ADMIN_INFO[admin_id][a_level]);
strcat(string_admin,string);
}
}
}
}
if(strlen(string_admin) == 0) return SEM(playerid,"Lista axs-a je trenutno prazna!");
SPD(playerid,DIALOG_NONE_NONE,DIALOG_STYLE_TABLIST_HEADERS,MOD_NAME,string_admin,"Izlaz", "");
}
return true;
}

Izvinjavam se za dupli post.


**********

Tacnije izbacuje mi za admina KOJI JE OFFLINE da je ONLINE,a OFFLINE mi ne izbacuje!  :'(

To moras da radis pod OnDialogResponse.
@MEDO
• Website: www.vasic.dev
Web Development & Cyber Security

Sta bre moram da radim pod on dialog response?
Molim te zaobidji temu i nemoj se proseravati.-

Slusaj, moras da napravis dve opcije, jednu za Online i drugu za Offline admine. O tome ti pricam za ondialogresponse. :)
• Website: www.vasic.dev
Web Development & Cyber Security

else if(!IsPlayerConnected(ADMIN_INFO[admin_id][a_ime]))

U IsPlayerConnected ide uvijek ID a ne String.
To bih rijesio ovako

IsPlayerConnectedEx(name[]) {
new getname[MAX_PLAYER_NAME];
foreach(new i : Players) {
GetPlayerName(i, getname, MAX_PLAYER_NAME);
if (!strcmp(name, getname)) return 1;
}
return 0;
}
////////////////////
else if(!IsPlayerConnectedEx(ADMIN_INFO[admin_id][a_ime])) ...