how to use strcat here?
#1

How can i use strcat here?
PHP код:
        format(stringsizeof(string),"{FF0000}General Statistics\n\n{00FFFF}Player Name:{00FF00} %s\n{00FFFF}Score:{00FF00} %i\n{00FFFF}Money :{00FF00} %i\n{00FFFF}Skin:{00FF00} %i\n{00FFFF}Wanted level:{00FF00} %i\n{00FFFF}Ping:{00FF00} %i\n\n{FF0000}Record Statistics\n\n{00FFFF}Kills:{00FF00} %i\n{00FFFF}Deaths:{00FF00} %i\n{00FFFF}K/D ratio:{00FF00} %i\n{00FFFF}Players robbed:{00FF00} %i\n{00FFFF}Stores robbed:{00FF00} %i\n{00FFFF}Players Raped:{00FF00} %i" ,name,GetPlayerScore(playerid),GetPlayerMoney(playerid),GetPlayerSkin(playerid),GetPlayerWantedLevel(playerid),GetPlayerPing(playerid),playerData[playerid][playerKills],playerData[playerid][playerDeaths],ratio,playerData[playerid][playerRobberies],playerData[playerid][streetRobberies],playerData[playerid][streetRapes]);
        
ShowPlayerDialog(playerid,123,DIALOG_STYLE_MSGBOX,"{FFFF00} Statistics",string,"Close"""); 
Reply
#2

https://sampwiki.blast.hk/wiki/Strcat
Reply
#3

An example :
PHP код:
new str[128], totalstr[128];
format(strsizeof(str),"Cash : %d",GetPlayerMoney(playerid));
strcat(totalstrstr);
ShowPlayerDialog(playerid,1232,DIALOG_STYLE_MSGBOX,"Your Stats",totalstr,"OK",""); 
Reply
#4

Quote:
Originally Posted by Sh4d0w2
Посмотреть сообщение
An example :
PHP код:
new str[128], totalstr[128];
format(strsizeof(str),"Cash : %d",GetPlayerMoney(playerid));
strcat(totalstrstr);
ShowPlayerDialog(playerid,1232,DIALOG_STYLE_MSGBOX,"Your Stats",totalstr,"OK",""); 
PHP код:
format(strsizeof(str),"Cash : %d",GetPlayerMoney(playerid));
strcat(totalstrstr); 
how do i continue adding other things?
Reply
#5

Copy paste it :
PHP код:
new str[128], totalstr[128];
format(strsizeof(str),"Cash : %d",GetPlayerMoney(playerid));
strcat(totalstrstr);
format(strsizeof(str),"Scores : %d",GetPlayerScore(playerid));
strcat(totalstrstr);
ShowPlayerDialog(playerid,1232,DIALOG_STYLE_MSGBOX,"Your Stats",totalstr,"OK",""); 
Reply
#6

~delete~
Reply
#7

I just edited my post before....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)