SA-MP Forums Archive
Help with stats. - 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: Help with stats. (/showthread.php?tid=571353)



Help with stats. - NoDi522 - 18.04.2015

I need an example how could I make my IC stats to load "country" where the player is from in my way country is called "zemlja" as you can see.

Here is the code:

PHP код:
                        case 1:
                        {
                            new 
statut[256],poruka[265],nearporuka[256],ime[MAX_PLAYER_NAME];
                            new 
novac GetPlayerMoney(playerid);
                            new 
spol PlayerInfo[playerid][pSpol];
                            new 
godine PlayerInfo[playerid][pGodine];
                            new 
zemlja PlayerInfo[playerid][pZemlja];
                            {
                                
GetPlayerName(playerid,ime,sizeof(ime));
                                
format(poruka,sizeof(poruka),"{FFFFFF} %s'"COLOR_CYAN" IC{FFFFFF} Stats",ime);
                                
strcat(statut,poruka);
                                
format(poruka,sizeof(poruka),"\n\n{FFFFFF}- Novac:"COLOR_SIVA" $%d\n{FFFFFF}- Spol:"COLOR_SIVA" %s\n{FFFFFF}- Godine:"COLOR_SIVA" %d\n{FFFFFF}- Zemlja:"COLOR_SIVA" %s",novac,spol,godine,zemlja);
                                
strcat(statut,poruka);
                                
ShowPlayerDialog(playerid,DIALOG_STATS,DIALOG_STYLE_MSGBOX,"Osobna kartica",statut,"Povratak","");
                                
format(nearporuka,sizeof(nearporuka),"** %s otvara svoju osobnu karticu",ime);
                                
SendNearMessage(playerid,0xED58DEFF,nearporuka);
                            }
                        } 
This works but when i chose IC everything with numbers shows and words in this case "zemlja" doesn't. I tried to use strcmp but i've got some errors.