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=540848)
Stats -
YanLanger - 07.10.2014
Hello.
I need /stats command and i know this is not "Giving free codes" etc..
I tried to find but i couldn't anyways i need it as a tutorial or if someone finds a tutorial please PM or Comment.
Thank you.
Re: Stats -
Ryz - 07.10.2014
Which user saving system you using?
Re: Stats -
YanLanger - 07.10.2014
What do you mean?
I used that tutorial will it help ?
https://sampforum.blast.hk/showthread.php?tid=167937
Re: Stats -
Gogeta - 07.10.2014
Here
pawn Код:
CMD:stats(playerid,prams[])
{
new pName[MAX_PLAYER_NAME];
new string[128];
new score = PlayerInfo[playerid][pScore]
new adminlevel = PlayerInfo[playerid][pAdminLevel]
new money = PlayerInfo[playerid][pMoney]
GetPlayerName(playerid,pName,sizeof(pName));
format(string,sizeof(string),"Name:%s Score:%d Money:%d AdminLevel:%d.",pName,score,money,adminlevel);
SendClientMessage(playerid,-1,string);
}
Re: Stats -
YanLanger - 07.10.2014
Quote:
Originally Posted by YanLanger
i need it as a tutorial
|
:P please
Re: Stats -
Steel_ - 07.10.2014
Код:
CMD:stats(playerid, params[])
{
new string[200];
format(string, sizeof(string), "Name: %s | ID: %d | Score: %d | Money: %d |", GetPlayerName, GetPlayerID, GetPlayerScore, GetPlayerMoney);
SendClientMessage(playerid , -1, string);
return 1;
}
Re: Stats -
YanLanger - 07.10.2014
PHP код:
new cash = PlayerInfo[playerid][pCash];
Код:
warning 204: symbol is assigned a value that is never used: "cash"
Re: Stats -
Gogeta - 07.10.2014
Dude i wrote pMoney not pCash acording to that tutorial.
Re: Stats -
Steel_ - 07.10.2014
Quote:
Originally Posted by Gogeta
Dude i wrote pMoney not pCash acording to that tutorial.
|
Then change it to pCash
Re: Stats -
YanLanger - 07.10.2014
well it says like that in my GM
PHP код:
enum pInfo
{
pAdminLevel,
pCash,
pScore,
}
new PlayerInfo[MAX_PLAYERS][pInfo];