Jump to content
  • 0

Sistem coins la /stats


diedeath

Question

6 answers to this question

Recommended Posts

la comanda stats este scris

dcmd_astats(playerid,params[]) {

new string[128], pDeaths, player1, h, m, s;

if(!strlen(params)) player1 = playerid;

else player1 = strval(params);

if(IsPlayerConnected(player1)) {

    TotalGameTime(player1, h, m, s);

if(PlayerInfo[player1][Deaths] == 0) pDeaths = 1; else pDeaths = PlayerInfo[player1][Deaths];

format(string, sizeof(string), "| %s's Stats:  Kills: %d | Deaths: %d | Ratio: %0.2f | Money: $%d | Time: %d hrs %d mins %d secs | Rank %d",PlayerName2(player1), PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths], Float:PlayerInfo[player1][Kills]/Float:pDeaths,FS_GetPlayerMoney(player1), h, m, s);

return SendClientMessage(playerid, green, string);

} else return SendClientMessage(playerid, red, "Player Not Connected!");

}

akum cum sa bag si coins?

Link to comment
Share on other sites

dcmd_astats(playerid,params[]) {
   new string[128], pDeaths, player1, h, m, s;
   if(!strlen(params)) player1 = playerid;
   else player1 = strval(params);

   if(IsPlayerConnected(player1)) {
       TotalGameTime(player1, h, m, s);
       if(PlayerInfo[player1][Deaths] == 0) pDeaths = 1; else pDeaths = PlayerInfo[player1][Deaths];
       format(string, sizeof(string), "| %s's Stats:  Kills: %d | Deaths: %d | Ratio: %0.2f | Money: $%d | Time: %d hrs %d mins %d secs | Rank %d | Coins: %d",PlayerName2(player1), PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths], Float:PlayerInfo[player1][Kills]/Float:pDeaths,FS_GetPlayerMoney(player1), h, m, s,VARIABILA_COINS[ playerid ]);
      return SendClientMessage(playerid, green, string);
   } else return SendClientMessage(playerid, red, "Player Not Connected!");
}

Schimba VARIABILA_COINS in variabila care retine coinsurile jucatorilor. Daca nu apare mesajul, taie-l in mai multe parti, fa 2 randuri de mesaj. Daca gandeai, reuseai fara sa intrebi aici, inainte sa intrebati, uitati-va cum sunt facute celelalte chestii de la ce vreti.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.