help stats!

Started by wilber32, Nov 17, 2015, 02:34 AM

Previous topic - Next topic

wilber32

I want to have a system of statistics will not know create D: Hotdogcat He told me I have to do it myself but much is not fuck with server

KAKAN

What you mean?
You mean you need a command which will show your stats? Hell, No
We can't make for you. We can help you!

In your words:-
We all are noobs and can't script.
oh no

hotdogcat

Steeps for creating stats system:

1)Add kills and deaths into the class, example

class PlayerInfo
{
kills=0;
deaths=0;
}

2)Increase kills and deaths when a player is being killed, example


function onPlayerKill( killer, player, reason, bodypart )
{
db_account[killer.Name].Kills++; //increase killers kills
db_account[player.Name].Deaths++; //increase deaths of killed player
}

3)Save player data when he leaves the server, example

function onPlayerPart( player,  reason )
{
SavePlayerData();
}

function SavePlayerData(player)
{
//put your query here to save player data
}

Edit: i'm not sure if you have already kills and deaths table, if you don't have create one


Credits to Bart.

wilber32

Kakán help is if you want I will not put a gun so you give me the system

KAKAN

What u mean, plz say it more clearly.
If you want a system, you can FAS, means Fuziee Account's System.
That system is pretty good
oh no

wilber32