Displaying Stats.
#1

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.
Reply
#2

dcmd(playerid, params[])
{
**YOUR CODE HERE**
}
Reply
#3

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
Reply
#4

Well my friend, Im not used to strcmp, if you were on ZCMD i can give you the command.
Reply
#5

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.
Reply
#6

~bump need this please D;
Reply
#7

Код:
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)