Level, exp, kills, deaths -
Dainyzxz - 04.03.2010
hey i wanna to something like this levels system :
when i write /stats
1. "Nick" Information:
2. Level: 45
3. Kills: 597 | Deaths: 374 | Ratio: 1.596256
4. Exp: 28937 | Exp to next level: 15795
5. Bank balance: 6190000
6. Gang: Grove street Families(id: 162)
NOT SAY "use search" i tryed it million times, but nothing found that is can be useful. So maybe somebody's is having like this script and can share with me, or just write something code. P.s( i have register/login system with dini, dutils, dudb)
Re: Level, exp, kills, deaths -
[HiC]TheKiller - 04.03.2010
Quote:
Originally Posted by Seif_
Don't copy other servers. Come up with your own ideas.
|
+1 =].
Also, find the gamemode GTO. What I am saying is SEARCH.
Re: Level, exp, kills, deaths -
Lejo - 04.03.2010
Quote:
Originally Posted by Seif_
Don't copy other servers. Come up with your own ideas.
|
I agree. You should be original rather than taking copying off of other servers.
Re: Level, exp, kills, deaths -
Finn - 04.03.2010
Don't think having
/stats is copying, like 90% of SAMP servers got that command.
It's different if the command is exactly how it is in the screenshot.
How do you save the account's data (password, name etc.)? Take a look at it and think how you can save the kills & deaths by using
OnPlayerDeath callback.
And yes, by searching you could find tons of scripts with this kind of shit in 'em.
Re: Level, exp, kills, deaths -
Dainyzxz - 05.03.2010
Quote:
Originally Posted by Seif_
Don't copy other servers. Come up with your own ideas.
|
i am not not going to copy that, i just need information/lesson how get player kills, deaths, how give exp to get level up
Re: Level, exp, kills, deaths -
LVFDM - 05.03.2010
Not really hard, Just create a few variables like so
new XP[MAX_PLAYERS];
When ever you want to +1 or -1 it, just XP[playerid]++; or XP[playerid]--;
It's easy, just
search & learn.
Re: Level, exp, kills, deaths -
bajskorv123 - 05.03.2010
pawn Код:
enum Data
{
Kills,
Deaths,
};
new pInfo[MAX_PLAYERS][Data];
public OnPlayerConnect(playerid)
{
pInfo[playerid][Kills] = 0;
pInfo[playerid][Deaths] = 0;
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
pInfo[killerid][Kills]++;
pInfo[playerid][Deaths]++;
return 1;
}
Heres a example of usage:
pawn Код:
format(str, sizeof(str), "Kills: %s | Deaths: %s", pInfo[playerid][Kills], pInfo[playerid][Deaths]);
With an output that will say: "Kills: 64 | Deaths: 23" (Without the " 's. Numbers will be the amount of kills and deaths that you have at the moment, these numbers are random)
Also if you do not use a save system for these stats, it will reset evry time you connect and just show the kills you have after your connect.
Re: Level, exp, kills, deaths -
Lejo - 05.03.2010
Quote:
Originally Posted by LVFDM
Not really hard, Just create a few variables like so
new XP[MAX_PLAYERS];
When ever you want to +1 or -1 it, just XP[playerid]++; or XP[playerid]--;
It's easy, just search & learn.
|
"Search and learn.."
It's sort of over whelming when you just look at other filterscripts to try and learn, etc. That's why I don't agree with what you just said.
Re: Level, exp, kills, deaths -
LVFDM - 05.03.2010
Quote:
Originally Posted by Shakur_
Quote:
Originally Posted by LVFDM
Not really hard, Just create a few variables like so
new XP[MAX_PLAYERS];
When ever you want to +1 or -1 it, just XP[playerid]++; or XP[playerid]--;
It's easy, just search & learn.
|
"Search and learn.."
It's sort of over whelming when you just look at other filterscripts to try and learn, etc. That's why I don't agree with what you just said.
|
I didn't mean Filterscripts I meant code examples, but I do agree with what you said, also the wiki is a good option.
Re: Level, exp, kills, deaths -
V1ceC1ty - 05.03.2010
He's asking for help why is everyone being mean, im sure this board is for help on scripting not just to post "SEARCH".