SA-MP Forums Archive
/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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /stats (/showthread.php?tid=158665)



/stats - mariokumanovac - 10.07.2010

I have made 0 gamemode but my problem is how to ubacam / stats command to show me my score points and money you have in me.


Re: /stats - ViruZZzZ_ChiLLL - 10.07.2010

pawn Код:
new string[106];
format(string, sizeof(string), "Score : %d Money : %d", GetPlayerScore(playerid), GetPlayerMoney(playerid));
SendClientMessage(playerid, Colour, string);
You mean like that?


Re: /stats - Adil - 10.07.2010

This on 'OnPlayerCommandtext':
pawn Код:
new playername[MAX_PLAYER_NAME];
pawn Код:
if(strcmp(cmd, "/stats", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            SendClientMessage(playerid, 0xFFFFFFF,"___________________________________________");
            format(string, sizeof(string),"Money: %d", GetPlayerMoney(playerid));
            SendClientMessage(playerid,0xFFFFFFFF,string);
            format(string, sizeof(string),"Score: %d", GetPlayerScore(playerid));
            SendClientMessage(playerid, 0xFFFFFFF,"___________________________________________");
        }
        return 1;
   }



Re: /stats - mariokumanovac - 10.07.2010

how to type and name?


Re: /stats - Adil - 10.07.2010

pawn Код:
if(strcmp(cmd, "/stats", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            SendClientMessage(playerid, 0xFFFFFFF,"___________________________________________");
            GetPlayerName(playerid, playername, sizeof(playername));
            format(string, sizeof(string),"Name: %s", playername);
            SendClientMessage(playerid,0xFFFFFFFF,string);
            format(string, sizeof(string),"Money: %d", GetPlayerMoney(playerid));
            SendClientMessage(playerid,0xFFFFFFFF,string);
            format(string, sizeof(string),"Score: %d", GetPlayerScore(playerid));
            SendClientMessage(playerid, 0xFFFFFFF,"___________________________________________");
        }
        return 1;
   }