/stats
#1

i haven't found any good lately, but can I request a script?
INI_Int("Password",PlayerInfo[playerid][pPassword]);
INI_Int("Money",PlayerInfo[playerid][pMoney]);
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
INI_Int("VIP",PlayerInfo[playerid][pVIP]);
INI_Int("Score",PlayerInfo[playerid][pScore]);
INI_Int("XP",PlayerInfo[playerid][pXP]);
INI_Int("Kills",PlayerInfo[playerid][pKills]);
INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
My variables, can you please make me a /stats with dialog? Thanks in advance...
Reply
#2

Код:
CMD:stats(playerid,params[])
{
	new coordsstring[128];
	format(coordsstring, sizeof(coordsstring),"____________________Stats____________________");
    SendClientMessage(playerid, COLOR_GREEN,coordsstring);
	format(coordsstring, sizeof(coordsstring), "Password:[%d] Money:[%d] Admin:[%d]",PlayerInfo[playerid][pPassword],PlayerInfo[playerid][pMoney],PlayerInfo[playerid][pAdmin]);
	SendClientMessage(playerid, COLOR_WHITE,coordsstring);
	format(coordsstring, sizeof(coordsstring), "VIP:[%s] Score:[%d] XP:[%d] Kills:[%d]",PlayerInfo[playerid][pVIP],PlayerInfo[playerid][pScore],PlayerInfo[playerid][pXP],PlayerInfo[playerid][pKills]);
	SendClientMessage(playerid, COLOR_WHITE,coordsstring);
	format(coordsstring, sizeof(coordsstring), "Deaths:[%d]",PlayerInfo[playerid][pDeaths]);
	SendClientMessage(playerid, COLOR_WHITE,coordsstring);
	SendClientMessage(playerid, COLOR_GREEN, "____________________End of Stats______________________________");
	return 1;
Try this it's a normal text you can change it to a Dialog if you want +rep me if i helped.
Reply
#3

Now I've edited your script.
pawn Код:
CMD:stats(playerid,params[])
{
    new coordsstring[128];
    format(coordsstring, sizeof(coordsstring),"_________________Stats____________________");
    SendClientMessage(playerid, -1,coordsstring);
    format(coordsstring, sizeof(coordsstring), "Kills: %d • Deaths: %d • XP: %d",PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths],PlayerInfo[playerid][pXP]);
    SendClientMessage(playerid, -1,coordsstring);
    format(coordsstring, sizeof(coordsstring), "Money: %d • VIP: %d • ADM: %d",PlayerInfo[playerid][pMoney],PlayerInfo[playerid][pVIP],PlayerInfo[playerid][pAdmin]);
    SendClientMessage(playerid, -1, "___________________________________________");
    return 1;
}
It does show only Kills, deaths, and XP. What do I need to do?
Reply
#4

Try that, remember if you add a line keep the pattern of the format and the sending together.
Код:
CMD:stats(playerid,params[])
{
    new coordsstring[128];
    format(coordsstring, sizeof(coordsstring),"_________________Stats____________________");
    SendClientMessage(playerid, -1,coordsstring);
    format(coordsstring, sizeof(coordsstring), "Kills: %d • Deaths: %d • XP: %d",PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths],PlayerInfo[playerid][pXP]);
    SendClientMessage(playerid, -1,coordsstring);
    format(coordsstring, sizeof(coordsstring), "Money: %d • VIP: %d • ADM: %d",PlayerInfo[playerid][pMoney],PlayerInfo[playerid][pVIP],PlayerInfo[playerid][pAdmin]);
    SendClientMessage(playerid, -1,coordsstring);
    format(coordsstring, sizeof(coordsstring),"_____________________________________");
    SendClientMessage(playerid, -1,coordsstring);
    return 1;
}
Reply
#5

Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)