Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: dEaN on Nov 24, 2015, 07:11 AM

Title: Team stats ( kills )
Post by: dEaN on Nov 24, 2015, 07:11 AM
hey guys, i am  Confused about function
my mean how i make team kill, i mean cuban: 10 , sharks : 14................ , & how i save in DB (Teamkill)
Title: Re: Team stats ( kills )
Post by: jayant on Nov 24, 2015, 07:43 AM
If you know a little scripting,then these steps may help you -

1) Create a database that hold all the teams ( Cuban,haitian and others ).
2) Create a function that will detect which team's player just killed and then +1 to the team's kill.

The above is similar to saving stats of a player,you can now try yourself and ofcourse you can come and ask here for help.

Regards.
Title: Re: Team stats ( kills )
Post by: dEaN on Nov 24, 2015, 10:19 AM
can you explain me! jayant
Title: Re: Team stats ( kills )
Post by: KAKAN on Nov 24, 2015, 12:06 PM
He means to create a database holding the teams

Something like this:-
function onScriptLoad(){
jaja <- ConnectSQL("Noob.db");
QuerySQL(jaja,"CREATE TABLE IF NOT EXISTS( Team1 INT, Team2 INT, noob1 INT");
}

Now make a  array to hold the kills and deaths.
Update the table when someone leaves, or wherever you want.

The system is ready :)

Hint:- See FAS, and then construct a similar thing like that(fas).
Title: Re: Team stats ( kills )
Post by: Thijn on Nov 24, 2015, 05:21 PM
If you actually give a name to the table in the example @KAKAN gave that should give you an idea.
Title: Re: Team stats ( kills )
Post by: dEaN on Nov 24, 2015, 05:26 PM
successful! Thank you very Mutch to all of you!
Spaical thanks kusanagi!
-Topic locked-