Hey Graalians,
I'm doing a custom GUI profiles and I'm having problems.
So I'm just asking what are the player variable for kills and deaths because player.deaths and player.kills don't work.
Thanks for your answers,
Joe.
Hey Graalians,
I'm doing a custom GUI profiles and I'm having problems.
So I'm just asking what are the player variable for kills and deaths because player.deaths and player.kills don't work.
Thanks for your answers,
Joe.
Post the code you are using or used to determine playerkills and playerdeaths don't work (those are the default variable names).
Also: http://wiki.graal.net/index.php/Serv...file_Variables
That is for the default profile gui however.
Last edited by Torankusu; 04-07-2014 at 05:34 PM.
Using the default variables is bad practice... How about you create your own? :O
-Johnaudi
I can do it but I'm always thinking what to use, database? database npc, clientr variables, or file storage, I never know what to use for what Can you help me with the choice?
Yes. Clientr. Variables.
Example:
Kills.
When a player kills another, simply do something like:
player.clientr.kills += 1;
//depending on how you set it up, you will need to reference the player object specifically.
Note: it will have to be done serverside since it is a clientr flag.
Clientr flags can be READ on the clientside, but can only be CHANGED serverside.
With a custom combat system, it is even possible to differentiate between spar wins, melee kills, magic kills, etc...
clientr.kills_melee
clientr.kills_magic
clientr.spar_wins
clientr.spar_losses
Okay thanks you much.
And how delete the old one?
Can you elaborate with what you mean by "the old one"?
Are you talking about the default stats (playerkills and playerdeaths)?
If so, you can remove them from the Default Profile as such:
from the website I previously linked you to:Profile Variables
profilevars=comma seperated list of profile variables
Selects what is to be displayed in a Player's profile. The default variables are: playerkills, playerdeaths, playerfullhearts, playerrating, playerap, playerrupees, playerswordpower, canspin, largely modelled after Old GScript. Custom string variables can be added in the format `name=stringname'. If name is not specified, stringname is used.
http://wiki.graal.net/index.php/Serv...file_Variables
you would want something like:
profilevars=playerfullhearts,playerrating,playerap ,playerrupees
would show in the default profile:
MaxPower: #
Rating: ####/###
Alignment: ##
Gralat: ##
To expand on what I had showed you earlier with the clientr.flags to store kills, etc, you could even do something like:
profilevars=playerfullhearts,playerrating,playerap ,playerrupees,Melee Kills:=clientr.kills_melee,Magic Kills:=clientr.kills_magic
would show in the default profile:
MaxPower: #
Rating: ####/###
Alignment: ##
Gralat: ##
Melee Kills: ##
Magic Kills: ##
Last edited by Torankusu; 04-07-2014 at 08:03 PM.
Well thanks you about your answers, but how I remove the basics system like old hp system?
*I would like to remove this basics system because I made mine but the Basics System are still in and I have no clue how to remove them