SA-MP Forums Archive
/stats - little weird problem - 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 - little weird problem (/showthread.php?tid=634503)



/stats - little weird problem - RxErT - 20.05.2017

Hello, i made a stats command but it's going wrongly please i may need some of your help!


PHP код:
CMD:stats(playeridparams[])
{
    new 
bstring[460];
    new 
name[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnamesizeof(name));
    
strcat(bstring"{009f07}•{ff0000}Team: {009f07}%d\n •{FF0000}V.I.P Level: {009f07}%d\n •{FF0000}Admin Level: {009f07}%d\n ");
    
strcat(bstring"•{FF0000}Helper Level: {009f07}%d\n •{FF0000}Skin: {009f07}%d\n•{FF0000}Cookies: {009f07}%d\n•{FF0000}Icecreams: {009f07}%d\n");
    
strcat(bstring"•{FF0000}Cakes: {009f07}%d\n •{FF0000}Kills: {009f07}%d\n •{FF0000}Deaths: {009f07}%d\n •{FF0000}Score: {009f07}%d\n •{FF0000}Cash: {009f07}%d\n");
    
format(bstringsizeof(bstring), bstringGPT(playerid),PlayerInfo[playerid][pVIP],PlayerInfo[playerid][pAdmin],PlayerInfo[playerid][pHelper],GetPlayerSkin(playerid),PlayerInfo[playerid][pCookie],PlayerInfo[playerid][pCake],PlayerInfo[playerid][pIcecream],PlayerInfo[playerid][pCake],PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths],PlayerInfo[playerid][pScore],PlayerInfo[playerid][pCash]);
    
ShowPlayerDialog(playeridDIALOG_STATSDIALOG_STYLE_LIST"{00ff00}Your Stats:"bstring"Ok""");
    return 
1;

The Problem is that it isn't showing right values of Score and kills and deaths and cash!


Re: /stats - little weird problem - Fairuz - 20.05.2017

PHP код:
CMD:stats(playeridparams[]) 

    new 
bstring[460]; 
    new 
name[MAX_PLAYER_NAME]; 
    
GetPlayerName(playeridnamesizeof(name)); 
    
strcat(bstring"{009f07}•{ff0000}Team: {009f07}%d\n •{FF0000}V.I.P Level: {009f07}%d\n •{FF0000}Admin Level: {009f07}%d\n "); 
    
strcat(bstring"•{FF0000}Helper Level: {009f07}%d\n •{FF0000}Skin: {009f07}%d\n•{FF0000}Cookies: {009f07}%d\n•{FF0000}Icecreams: {009f07}%d\n"); 
    
strcat(bstring"•{FF0000}Cakes: {009f07}%d\n •{FF0000}Kills: {009f07}%d\n •{FF0000}Deaths: {009f07}%d\n •{FF0000}Score: {009f07}%d\n •{FF0000}Cash: {009f07}%d\n"); 
    
format(bstringsizeof(bstring), bstringGPT(playerid),PlayerInfo[playerid][pVIP],PlayerInfo[playerid][pAdmin],PlayerInfo[playerid][pHelper],GetPlayerSkin(playerid),PlayerInfo[playerid][pCookie],PlayerInfo[playerid][pIceCream],PlayerInfo[playerid][pCake],PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths],PlayerInfo[playerid][pScore],PlayerInfo[playerid][pCash]); 
    
ShowPlayerDialog(playeridDIALOG_STATSDIALOG_STYLE_LIST"{00ff00}Your Stats:"bstring"Ok"""); 
    return 
1