ShowPlayerDialog help
#8

Quote:
Originally Posted by tommzy09
Посмотреть сообщение
i see what you mean, how would i go about showing them all the stats i listed without making multiple dialogs?
ok so try this.



PHP код:
CMD:stats(playerid,params[])
{
       new 
id;
     new 
PlayerName[MAX_PLAYER_NAME];
     
GetPlayerName(playeridPlayerNamesizeof(PlayerName));
     new 
string[1028], tmp[50];
     
sscanf(params"u"id);
     if (
isnull(params))
     {
        
format(stringsizeof(string), "_Statistics for '%s'_"PlayerName);
        
SendClientMessage(playeridLIMEstring);
        
format(tmpsizeof(tmp), "General Stats\n");
        
strcat(stringtmp);
                
format(tmpsizeof(tmp), "Money: %d\n"GetPlayerCash(playerid));
        
strcat(stringtmp);
               
format(tmpsizeof(tmp), "Score: $%d\n"GetPlayerScore(playerid));
        
strcat(stringtmp);
                
format(tmpsizeof(tmp), "Total Kills: %d\n"pInfo[playerid][pKills]);
        
strcat(stringtmp);
               
format(tmpsizeof(tmp), "Total Deaths: %d\n"pInfo[playerid][pDeaths]);
        
strcat(stringtmp);
               
format(tmpsizeof(tmp), "Moneybags Found: %0.2f\n"pInfo[playerid][pMoneyBags]);
        
strcat(stringtmp);
               
format(tmpsizeof(tmp), "Total Times Farted: %s\n"pInfo[playerid][pFarts]);
        
strcat(stringtmp);
                
format(tmpsizeof(tmp),, "Spontaneous Combustions: %s\n"pInfo[playerid][pFartExp]);
        
strcat(stringtmp);
                .... continue
                new 
name[128];
                
format(namesizeof(name), "{FF6666}Player Stats for %s"PlayerName);
        
ShowPlayerDialog(playeridSTATS_DIALOGDIALOG_STYLE_MSGBOXnamestring"Okay","");
     } 
continue what i was doin, hopefully it works, im still new to scripting ^_^
Reply


Messages In This Thread
ShowPlayerDialog help - by tommzy09 - 26.05.2015, 01:06
Re: ShowPlayerDialog help - by LMaxCo - 26.05.2015, 01:41
Re: ShowPlayerDialog help - by LMaxCo - 26.05.2015, 01:45
Re: ShowPlayerDialog help - by tommzy09 - 26.05.2015, 02:09
Re: ShowPlayerDialog help - by Trucido - 26.05.2015, 02:14
Re: ShowPlayerDialog help - by LMaxCo - 26.05.2015, 02:16
Re: ShowPlayerDialog help - by tommzy09 - 26.05.2015, 02:17
Re: ShowPlayerDialog help - by Trucido - 26.05.2015, 02:33
Re: ShowPlayerDialog help - by tommzy09 - 26.05.2015, 02:41

Forum Jump:


Users browsing this thread: 2 Guest(s)