/stats
#1

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.
Reply
#2

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

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;
   }
Reply
#4

how to type and name?
Reply
#5

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;
   }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)