/stats (DIALOG)
#6

Quote:
Originally Posted by AwokenNeoX
Посмотреть сообщение
Thank you but I got this little Error Message

Код:
C:\Users\Kerem\ii\SERVER\LuxAdmin.pwn(1502) : warning 235: public function lacks forward declaration (symbol "ShowStats")
C:\Users\Kerem\ii\SERVER\LuxAdmin.pwn(1505) : error 017: undefined symbol "GetPlayerNameEx"
C:\Users\Kerem\ii\SERVER\LuxAdmin.pwn(1507) : error 017: undefined symbol "player1"
C:\Users\Kerem\ii\SERVER\LuxAdmin.pwn(1528) : error 004: function "ShowPlayerStats" is not implemented
C:\Users\Kerem\ii\SERVER\LuxAdmin.pwn(1514) : warning 204: symbol is assigned a value that is never used: "string"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
Oops sorry, change to this xD :

PHP код:
#define DIALOG_STATS 9999 
forward ShowPlayerStats(playerid, targetid); 
public 
ShowPlayerStats(playerid, targetid) 
{ 
    new 
string[512], tmp[512], h, m, s; 
    
format(tmp, sizeof(tmp), "|-  %s's Statistics -|\n\n", PlayerName2(targetid)); 
    
strcat(string, tmp); 
    
format(tmp, sizeof(tmp), "Kills: [%d]\nDeaths: [%d]\nRatio: [%0.2f]\nMoney: [$%d]\nTime: [%d] hrs [%d] mins [%d] secs", AccInfo[targetid][Kills], AccInfo[targetid][Deaths], Float:AccInfo[targetid][Kills]/Float:pDeaths,GetPlayerMoney(targetid), h, m, s); 
    
strcat(string, tmp); 
    
ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, "- Stats -", string, "OK", ""); 
    return 
1; 
} 
dcmd_stats(playerid, params[]) 
{ 
    new 
player1; 
    if(!
strlen(params)) player1 = playerid; 
    else 
player1 = strval(params); 
    if(
IsPlayerConnected(player1)) 
    { 
        if(
AccInfo[player1][Deaths] == 0)  
        {     
            
AccInfo[player1][Deaths]++; 
        } 
        else 
        { 
            
ShowPlayerStats(playerid, player1); 
        } 
    } 
    else 
    { 
        
SendClientMessage(playerid, COLOR_MESSAGE_RED, "* Sorry, Player Not Connected!"); 
    } 
    return 
1; 
} 
Reply


Messages In This Thread
/stats (DIALOG) - by AwokenNeoX - 05.02.2017, 22:07
Re: /stats (DIALOG) - by Juonis - 05.02.2017, 22:26
Re: /stats (DIALOG) - by AwokenNeoX - 05.02.2017, 22:49
Re: /stats (DIALOG) - by haikalbintang - 06.02.2017, 00:57
Re: /stats (DIALOG) - by AwokenNeoX - 06.02.2017, 12:13
Re: /stats (DIALOG) - by haikalbintang - 06.02.2017, 14:05

Forum Jump:


Users browsing this thread: 1 Guest(s)