SA-MP Forums Archive
[/STATS] Help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [/STATS] Help (/showthread.php?tid=596196)



[/STATS] Help - Elegy - 14.12.2015

help me
PHP Code:
#if defined USE_STATS
CMD:stats(playerid,params[]) {
    new 
string[128], pDeathsplayer1hms;
    if(
isnull(params)) player1 playerid;
    else 
player1 strval(params);
    if(
IsPlayerConnected(player1)) {
        
TotalGameTime(player1hms);
         if(
PlayerInfo[player1][Deaths] == 0pDeaths 1; else pDeaths PlayerInfo[player1][Deaths];
        
format(stringsizeof(string), "%s :  Level:%d | VIP:%d | Kills:%d | Deaths:%d | Ratio:%0.2f | Money:$%d | Bank:$%d | Time:%dhrs%dmins%dsecs | ",PlayerName2(player1),PlayerInfo[player1][Level],PlayerInfo[player1][Vip], PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths],Float:PlayerInfo[player1][Kills]/Float:pDeaths,GetPlayerMoney(player1),PlayerInfo[player1][bank], hms);
        
ShowPlayerDialog(playerid,6969,DIALOG_STYLE_MSGBOX,"Stats",string,"Ok","");
        return 
SendClientMessage(playeridgreenstring);
    } else return 
SendClientMessage(playeridred"Player Not Connected!");
}
#endif 
i want like this,
not like this

help me to change the code


Re: [/STATS] Help - Elegy - 14.12.2015

not like this


Re: [/STATS] Help - Elegy - 14.12.2015

Bump,I Really Need Help.Help Me Please


Re: [/STATS] Help - Ritzy2K - 14.12.2015

Use \n (its line break).


Re: [/STATS] Help - Elegy - 14.12.2015

How,teach me please.


Re: [/STATS] Help - Devon007 - 14.12.2015

Show Your Dialog 6969


Re: [/STATS] Help - Elegy - 14.12.2015

like this?

PHP Code:
#if defined USE_STATS
CMD:stats(playerid,params[]) {
    new 
string[128], pDeathsplayer1hms;
    if(
isnull(params)) player1 playerid;
    else 
player1 strval(params);

    if(
IsPlayerConnected(player1)) {
        
TotalGameTime(player1hms);
         if(
PlayerInfo[player1][Deaths] == 0pDeaths 1; else pDeaths PlayerInfo[player1][Deaths];
        
format(stringsizeof(string), "%s :  Level:%d\nVIP:%d\nKills:%d\nDeaths:%d\nRatio:%0.2f\nMoney:$%d\nBank:$%d\nTime:%dhrs%dmins%dsecs | ",PlayerName2(player1),PlayerInfo[player1][Level],PlayerInfo[player1][Vip], PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths],Float:PlayerInfo[player1][Kills]/Float:pDeaths,GetPlayerMoney(player1),PlayerInfo[player1][bank], hms);
        
ShowPlayerDialog(playerid,6969,DIALOG_STYLE_MSGBOX,"Stats",string,"Ok","");
        return 
SendClientMessage(playeridgreenstring);
    } else return 
SendClientMessage(playeridred"Player Not Connected!");
}
#endif/ 



Re: [/STATS] Help - Elegy - 14.12.2015

Close this topic please