quando eu digito /admins aparem os admins, soh que soh 1 , nao importa se tem 5 online , soh mostra o que tem o maior id online.......
se nao entenderam..... ex: tem 2 admins lv 5 on,ai eu digito /admins e aparece o id maior sempre ://////
acho que deve ser algo bugado no count++; que deve estar se confundindo e pegando o id,mas se o admin for lv 5 , aparece lv 5 la, nao sei oq eh realmente, se puderem me ajudar...
se nao entenderam..... ex: tem 2 admins lv 5 on,ai eu digito /admins e aparece o id maior sempre ://////
pawn Code:
CMD:admins(playerid,params[])
{
ShowPlayerDialog(playerid, 0xE, DIALOG_STYLE_MSGBOX,"~ Admins ~", "", "Ok",#);
new count=0;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)){
if(pAdmin[i]){
new str[256];
new pname[24];
new name[32];
GetPlayerName(i, pname, MAX_PLAYER_NAME);
format(str, sizeof(str), "contas/%s.ini", name);
if(!DOF2_FileExists(str)) DOF2_CreateFile(str); {
if(pAdmin[i] > 0)
{
new string [100];
if(pAdmin[i] == 1) AdminNivel = "[ADM Level 1]";
if(pAdmin[i] == 2) AdminNivel = "[ADM Level 2]";
if(pAdmin[i] == 3) AdminNivel = "[ADM Level 3]";
if(pAdmin[i] == 4) AdminNivel = "[ADM Level 4]";
if(pAdmin[i] == 5) AdminNivel = "[Dono Scripter do server]";
format(string,sizeof(string),"%s (%d) :: {FFFFFF} %s",pname,i,AdminNivel);
ShowPlayerDialog(playerid, 0xF, DIALOG_STYLE_MSGBOX,"~ Admins ~", string, "Ok",#);
count++;
}
}
}
}
if(count == 0)
{
ShowPlayerDialog(playerid, 0xF, DIALOG_STYLE_MSGBOX,"~ Admins ~", "(ERRO) {0000FF}Não há administradores online no momento", "Ok",#);
}
}
return 1;
}
{
ShowPlayerDialog(playerid, 0xE, DIALOG_STYLE_MSGBOX,"~ Admins ~", "", "Ok",#);
new count=0;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)){
if(pAdmin[i]){
new str[256];
new pname[24];
new name[32];
GetPlayerName(i, pname, MAX_PLAYER_NAME);
format(str, sizeof(str), "contas/%s.ini", name);
if(!DOF2_FileExists(str)) DOF2_CreateFile(str); {
if(pAdmin[i] > 0)
{
new string [100];
if(pAdmin[i] == 1) AdminNivel = "[ADM Level 1]";
if(pAdmin[i] == 2) AdminNivel = "[ADM Level 2]";
if(pAdmin[i] == 3) AdminNivel = "[ADM Level 3]";
if(pAdmin[i] == 4) AdminNivel = "[ADM Level 4]";
if(pAdmin[i] == 5) AdminNivel = "[Dono Scripter do server]";
format(string,sizeof(string),"%s (%d) :: {FFFFFF} %s",pname,i,AdminNivel);
ShowPlayerDialog(playerid, 0xF, DIALOG_STYLE_MSGBOX,"~ Admins ~", string, "Ok",#);
count++;
}
}
}
}
if(count == 0)
{
ShowPlayerDialog(playerid, 0xF, DIALOG_STYLE_MSGBOX,"~ Admins ~", "(ERRO) {0000FF}Não há administradores online no momento", "Ok",#);
}
}
return 1;
}
acho que deve ser algo bugado no count++; que deve estar se confundindo e pegando o id,mas se o admin for lv 5 , aparece lv 5 la, nao sei oq eh realmente, se puderem me ajudar...
Aucun commentaire:
Enregistrer un commentaire