Displaying 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Displaying Stats. (
/showthread.php?tid=244655)
Displaying Stats. -
TheYoungCapone - 28.03.2011
Well i followed the tutorial by medal of honor team
HERES THERE TUTORIAL
And now i need help making a command that displays peoples stats for example /stats [id]
just the stats that are in the tutorial kill,deaths,money,score,skin.
Re: Displaying Stats. -
mprofitt - 28.03.2011
dcmd(playerid, params[])
{
**YOUR CODE HERE**
}
Re: Displaying Stats. -
TheYoungCapone - 28.03.2011
Quote:
Originally Posted by mprofitt
dcmd(playerid, params[])
{
**YOUR CODE HERE**
}
|
I need help with the code itself can you give me an example? And im not using dcmd just using strcmp
Re: Displaying Stats. -
-Rebel Son- - 28.03.2011
Well my friend, Im not used to strcmp, if you were on ZCMD i can give you the command.
Re: Displaying Stats. -
TheYoungCapone - 28.03.2011
Quote:
Originally Posted by -Rebel Son-
Well my friend, Im not used to strcmp, if you were on ZCMD i can give you the command.
|
ok then thats fine ZCMD it is. Ill switch to ZCMD now.
Re: Displaying Stats. -
TheYoungCapone - 28.03.2011
~bump need this please D;
Re: Displaying Stats. -
-Rebel Son- - 28.03.2011
Код:
CMD:mystats(playerid, params[])
{
if(IsInZone[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, SERVER_BOT SERVER_ZONE);
new string[7][256];
new Stats[900];
if(GetPVarInt(playerid, "Logged") == 1)
{
new Float:health; GetPlayerHealth(playerid, health);
new Float:armour; GetPlayerArmour(playerid, armour);
format(string[0], 128, "Name: %s\nHealth: %.0f\nArmour: %.0f\nMoney: %i\nScore: %i\nKills: %i\nDeaths: %i\nLevel: %i\n", GetName(playerid), health, armour, GetPlayerMoney(playerid), GetPlayerScore(playerid), GetPVarInt(playerid, "Kills"), GetPVarInt(playerid, "Deaths"), GetPVarInt(playerid, "Level"));
format(string[1], 128, "Zones entered: %i\n Times muted: %i\n",GetPVarInt(playerid, "Zones"), GetPVarInt(playerid, "Muted"));
format(Stats, sizeof Stats, "\n%s\n%s",string[0],string[1]);// Note, Just add a new format.
ShowPlayerDialog(playerid, DIALOG_VIEWSTATS, DIALOG_STYLE_MSGBOX, "Account Management",Stats, "Ok", "Cancel");
}
return 1;
}
edit it