SA-MP Forums Archive
/stats command - 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 command (/showthread.php?tid=275758)



/stats command - vent - 11.08.2011

Hi, another question. How to make an stats system which will take the information from dini?
Another question. How to make an aJail system too with a reason?


Re: /stats command - Kingunit - 11.08.2011

What kind of things you want in your stats?


Re: /stats command - vent - 11.08.2011

Name, money, age, (havent figured out the age system, yet.) Admin level, etc.


Re: /stats command - Kingunit - 11.08.2011

They are saved in DINI or INI?


Re: /stats command - vent - 11.08.2011

The files save .ini

Code:
Name=Sander_Koksaja
Password=*******
LastInt=0
AdminLevel=5
LastX=268.765045
LastY=1883.209960
LastZ=-30.093750
Cash=67612
That is the inside of %s.ini


Re: /stats command - Snipa - 11.08.2011

dini_Get them into vars, and then format() it and place the vars accordingly, like:


pawn Code:
GetPlayerName(playerid, name, 24);
format(string, sizeof string, "Stats: [%s] Level: %d | Score: %d | Cash: %d |",name,Level[playerid],GetPlayerScore(playerid), GetPlayerMoney(playerid));
SendClientMessage(playerid, -1, string);



Re: /stats command - vent - 11.08.2011

Im sorry, but i dont know how to place any vars or something. Can you do the all command? It uses zcmd.


Re: /stats command - Snipa - 11.08.2011

Make a new var like:

pawn Code:
new variable;
Then,
pawn Code:
variable = dini_Get(formattedfilehere,"Level");
EDIT: Oh, erm.

pawn Code:
CMD:stats(playerid, params[])
{
    new file[36], Level, name[24], string[42];
    GetPlayerName(playerid, name, 24);
    format(file, sizeof file, "/Users/%s.ini",name);
    Level = dini_Get(file, "Level");
    format(string, sizeof string, "[%s] Admin Level: %d",name,level);
    SendClientMessage(playerid, blue, string);
    return 1;
}



Re: /stats command - vent - 11.08.2011

Hmm, where should i place the
PHP Code:
variable dini_Get(formattedfilehere,"Level"); 



Re: /stats command - grand.Theft.Otto - 11.08.2011

Place it in your stats command ?


Re: /stats command - vent - 11.08.2011

Nevermind, can you guys help me to make the /ajail (playerid/name) (time) (reason) command?


Re: /stats command - Grim_ - 11.08.2011

That's not really helping you with it, but creating it for you. If you want the script made for you, reply in the Script Requests thread. Otherwise, show us what you have made so far in the command.

There are also multiple administration scripts in the Filterscripts section of this forum that contain that command. Not to mention, countless threads asking the same question as yours as well. Try doing some searching either via the search engine on this forum (which to be honest, isn't that great) or ******.