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)
+--- Thread: /stats (/showthread.php?tid=340091)



/stats - oscar7610 - 05.05.2012

Hi how can I make a simple /stats?

[kills] [deaths] [ratio] [money] [time played] [minutes]

I will rep +. Or a FS.


Re: /stats - Face9000 - 05.05.2012

We need to know more.

What is your account system?It's coded from scratch or you're editing some gamemode?

Also,what file saving it uses? Y_INY,DINI or MYSQL?


Re: /stats - [EuG]ZeRoGoD - 05.05.2012

Код:
CMD:stats(playerid,params[])
{
    new password = PlayerInfo[playerid][pPass];
    new money = PlayerInfo[playerid][pCash];
    new deaths = PlayerInfo[playerid][pDeaths];
    new kills = PlayerInfo[playerid][pKills];
    new score = PlayerInfo[playerid][pScore];
    new admin = PlayerInfo[playerid][pAdmin];
    new vip = PlayerInfo[playerid][pVIP];
    new killpoints = PlayerInfo[playerid][pKillPoints];
    new string[500];
    format(string,sizeof(string),"Password: %s | Money: %d | Deaths: %d | Kills: %d | Score: %d | Admin: %d | VIP: %d | Killpoints: %d",password,money,deaths,kills,score,admin,vip,killpoints);
    SendClientMessage(playerid,COLOR_WHITE,string);
    return 1;
}
try this


Re: /stats - Face9000 - 05.05.2012

Quote:
Originally Posted by [EuG]ZeRoGoD
Посмотреть сообщение
try this
Small tip,for the Money part,use %i instead of %d.


Re: /stats - [EuG]ZeRoGoD - 05.05.2012

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
Small tip,for the Money part,use %i instead of %d.
yeh my bad lol thanks but it wont work anyway because hes not useing zcmd =\
+he is useing lux admin so not exactly sure what he would need 2 do


Re: /stats - Face9000 - 05.05.2012

Quote:
Originally Posted by [EuG]ZeRoGoD
Посмотреть сообщение
yeh my bad lol thanks but it wont work anyway because hes not useing zcmd =\
+he is useing lux admin so not exactly sure what he would need 2 do
Yeah that's why i've asked more info to help him.


Re: /stats - oscar7610 - 05.05.2012

Someone got a good FS?


Re: /stats - Oscii - 06.05.2012

Ladmin has /stats and is quite advanced with that stuff.

I recomend you use Ladmin (LethalAdmin) FS




Re: /stats - Face9000 - 06.05.2012

Or create your own admin system,much better than this buggies admin systems.


Re: /stats - ReneG - 06.05.2012

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
Small tip,for the Money part,use %i instead of %d.
Ehhhm, what's wrong with %d? Both %i and %d output integers.