[Ajuda] Admin em Dialog
#1

PHP код:
COMMAND:admins(playeridparams[])
{
    new 
string[256];
    new 
fstring[64];
    for(new 
i=0i<MAX_PLAYERSi++)
    {
        if(
PlayerInfo[playerid][pAdminLevel] <0)
        {
            new 
pname[MAX_PLAYER_NAME];
            
GetPlayerName(i,pnamesizeof(pname));
            
format(fstringsizeof(fstring),"%s (%i) - {FF0000}Level: %i{FFFFFF}\n",pname,i,level[i]);
            
strcat(stringfstringsizeof(string));
        }
    }
    
ShowPlayerDialog(playerid,2563,DIALOG_STYLE_MSGBOX,"Online Admins",string,"OK","");
    return 
1;

Код:
C:\Documents and Settings\Lucas8\Desktop\DM-4FUN\filterscripts\pAdmin.pwn(122) : warning 219: local variable "pname" shadows a variable at a preceding level
C:\Documents and Settings\Lucas8\Desktop\DM-4FUN\filterscripts\pAdmin.pwn(124) : error 017: undefined symbol "level"
C:\Documents and Settings\Lucas8\Desktop\DM-4FUN\filterscripts\pAdmin.pwn(124) : warning 215: expression has no effect
C:\Documents and Settings\Lucas8\Desktop\DM-4FUN\filterscripts\pAdmin.pwn(124) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Lucas8\Desktop\DM-4FUN\filterscripts\pAdmin.pwn(124) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Lucas8\Desktop\DM-4FUN\filterscripts\pAdmin.pwn(124) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#2

Tenta:
pawn Код:
COMMAND:admins(playerid, params[])
{
    new string[256];
    new fstring[64];
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][pAdminLevel] > 0)
        {
            GetPlayerName(i,pname, sizeof(pname));
            format(fstring, sizeof(fstring),"%s (%d) - {FF0000}Level: %d{FFFFFF}\n",pname,i,PlayerInfo[playerid][pAdminLevel]);
            strcat(string, fstring, sizeof(string));
        }
    }
    ShowPlayerDialog(playerid,2563,DIALOG_STYLE_MSGBOX,"Online Admins",string,"OK","");
    return 1;
}
Reply
#3

Que bonito....
Reply
#4

Valeu agora se poderem me ajudar nisso clique aqui

Fico muito grato!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)