Help please.
#1

Hello!

How to make CMD: stats, what shows player score and how much money does he have on hand.
If somebody would please help me?
Reply
#2

To get money :

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

Quote:
Originally Posted by Kukkurloom
Посмотреть сообщение
Hello!

How to make CMD: stats, what shows player score and how much money does he have on hand.
If somebody would please help me?
If you already have the register system you can make a stats command.
pawn Код:
CMD:stats(playerid, params[])
{
    if(YOUR_LOGGED_IN_VAR == 0) return SendClientMessage(playerid, -1 , "You are not logged in");
    new money = PlayerInfo[playerid][pCash]; // CHANGE THESE ALL TO YOUR OWN VARS....
    new deaths = PlayerInfo[playerid][pDeaths];// CHANGE THESE ALL TO YOUR OWN VARS....
    new kills = PlayerInfo[playerid][pKills];// CHANGE THESE ALL TO YOUR OWN VARS....
    new score = PlayerInfo[playerid][pScore];// CHANGE THESE ALL TO YOUR OWN VARS....
    new admin = PlayerInfo[playerid][pAdmin];// CHANGE THESE ALL TO YOUR OWN VARS....
    new vip = PlayerInfo[playerid][pVIP];// CHANGE THESE ALL TO YOUR OWN VARS....
    new killpoints = PlayerInfo[playerid][pKillPoints];// CHANGE THESE ALL TO YOUR OWN VARS....
    new string[128];
    format(string,sizeof(string),"Money: %d | Deaths: %d | Kills: %d | Score: %d | Admin: %d | VIP: %d | Killpoints: %d",money,deaths,kills,score,admin,vip,killpoints);
    SendClientMessage(playerid,COLOR_WHITE,string);
    // you have to change these to your OWN vars, it is just an example!!!
    return 1;
}
or live stats:-

pawn Код:
CMD:stats(playerid, params[])
{
   new string[100];
   format(string, sizeof(string), "Money: $%i | Kills: %d | Deaths: %d", GetPlayerMoney(playerid), Kills, Deaths); // kills and deaths much be there
   SendClientMessage(playerid, 0xFFFFFFAA, string);
   return 1;
}
-FalconX
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)