Help in 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)
+--- Thread: Help in stats command. (
/showthread.php?tid=363281)
Help in stats command. -
Champ - 27.07.2012
Hello All. I have a stats system but i does not shows other stats. i want to make it that the command show other stats like. /stats [id] and /stats for himself. need help quickly.
thank you
Re: Help in stats command. -
vexer1234 - 27.07.2012
Well, If you can elaborate, I can help you. Or just add me on skype: rohan.rulzz
I'll help you.
Re: Help in stats command. -
Devilxz97 - 27.07.2012
give me all your variables
example
pawn Код:
enum pInfo
{
blabla,
lololol
}
new PlayerInfo[MAX_PLAYERS][pInfo];
Re: Help in stats command. -
Devilxz97 - 27.07.2012
this is for mystats , show your stats;
pawn Код:
CMD:mystats(playerid, params[])
{
new string[256], sendername[MAX_PLAYER_NAME];
new
admin,
kills,
deaths;
admin = PlayerInfo[playerid][pAdmin]; // i dont know your variables , change this to your variables
kills = PlayerInfo[playerid][pKills];
deaths = PlayerInfo[playerid][pDeaths];
format(string,sizeof(string), "PlayerName:( %s ) Admin Level:[ %d ] Kills:[ %d ] Deaths:[ %d ]",sendername,admin,kills,deaths);
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX , "MyStats", string, "Okay", "");
return 1;
}
this is for checking other player stats;
pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#define DIALOG_STATS 1997
#define red 0xFF0000AA
CMD:stats(playerid, params[])
{
new str[256];
new pid;
new
admin = PlayerInfo[playerid][pAdmin],
kills = PlayerInfo[playerid][pKills],
deaths = PlayerInfo[playerid][pDeaths];
if(sscanf(params,"u",pid)) return SendClientMessage(playerid,red,"[USAGE]:/stats [PlayerID/PartOfName]");
format(str, sizeof(str), "AdminLevel:[ %d ] Kills:[ %d ] Deaths:[ %d ]", admin,kills,deaths);
ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX , "PlayerStats", string, "Close", "");
return 1;
}
Re: Help in stats command. -
DiegoRider - 12.07.2013
update stats in game ?