/stats command
#6

Quote:
pawn Code:
format(string1, sizeof string1, "{44A1D0}Level: {FFFFFF}[%d] {44A1D0}Money: {FFFFFF}[$%d] {44A1D0}AdminLevel: {FFFFFF}[$%d] {44A1D0}VIP: {FFFFFF}[$%d] {44A1D0}VW: {FFFFFF}[$%d] {44A1D0}Int: {FFFFFF}[$%d]", level,money,admin,vip,vw,interior);
You really don't need to create new variables. You could do it as well like this:

Code:
format(string,sizeof(string),"[Adminlevel: %d || Kills: %d ]",Player[playerid][Adminlevel],Player[playerid][Kills]);
So that means: You assign a Variable, in our case the normal player variable, to a sign inside a string.

( Player[playerid][Adminlevel] = %d )

So that sign in the string will be replaced with the Adminlevel the player has.

Note:
%s = String [ex.: Player Motto]
%d // %i = Integer [ex.: Admin Level / Score]
%f = Float [ex.: Player Health]


And in his example, the dialoge is just there to make it look nicer. You can also output it to the player in form of a simple chat message (With SendClientMessage)
Reply


Messages In This Thread
/stats command - by Azzeto - 13.10.2011, 18:14
Re: /stats command - by MonkZemun - 13.10.2011, 18:19
Re: /stats command - by Azzeto - 13.10.2011, 18:21
Re: /stats command - by MonkZemun - 13.10.2011, 18:28
Re: /stats command - by Azzeto - 13.10.2011, 18:30
Re: /stats command - by Giovanni - 13.10.2011, 18:32
Re: /stats command - by Azzeto - 13.10.2011, 18:36
Re: /stats command - by Azzeto - 13.10.2011, 18:54
Re: /stats command - by SmiT - 13.10.2011, 19:14
Re: /stats command - by Kush - 13.10.2011, 19:29
Re: /stats command - by Azzeto - 13.10.2011, 19:40
Re: /stats command - by Pillhead2007 - 24.03.2013, 16:49
Re: /stats command - by ButlerSmcs - 29.07.2017, 10:11
Re: /stats command - by Fratello - 29.07.2017, 11:18

Forum Jump:


Users browsing this thread: 4 Guest(s)