Help Experience
#1

Hi , i don't need any Kind of script , but i'm just asking:

A lot of servers are using XP function , so 1 kill = 1 XP or what ever , can i use scores as XP or creating a new variable? Thanks.
Reply
#2

Quote:
Originally Posted by Saw®
Посмотреть сообщение
Hi , i don't need any Kind of script , but i'm just asking:

A lot of servers are using XP function , so 1 kill = 1 XP or what ever , can i use scores as XP or creating a new variable? Thanks.
Since you don't know much about scripting it would be easiest to use the Search function and download a experience system.
Reply
#3

No , i can create a variable like

new XP[MAX_PLAYERS];
Public onplayerdeath
XP[killerid] =++;

but , i only asking what's the best way ?
Reply
#4

Through a variable would be the best way yes, don't forget to save it with your register system though.

By the way its XP[killerid]++; if you want 1 experience to be added per kill
Reply
#5

Yea i save it on Public onplayerDisconnect , and yes, 1 kill=1XP

But one Other Question :

I made a class "Nemesis" witch we need 20,000 XP to join it , so it is not so hight for Players?

NB : i already have classes with 1000 XP......
Reply
#6

Well if 1 kill = 1 XP than it's gona be 20 000 kills = 20,000 XP and it's too high for players lol
Reply
#7

Cool ! Thank you [NWA]Hannes & nilanjay !!

EDIT : so i must add Bonus kill? like if he killed 2 zombies he will gets XP*2 if 3*3....
Reply
#8

Hmm yea sure but for that you need to create timers like if a player killed 2 zombies in 1 minute than he will get 3 xp
Reply
#9

Hmm... i try to avoid as possible as i can the timers , so i'm going to add a killstrike system , if he kill 2 players in a row he will win +3 score...
I need other ideas please
Reply
#10

to make the "kills-in-a-row = score to add", you need just 1 more variable per player:
pawn Код:
new Kills[MAX_PLAYERS];// your already existing XP-variable, should get saved...
new KillsInARow[MAX_PLAYERS];// this variable needs to get increased at each kill, and set to 0 @ death.
imagine you kill me the first time after logging in:
pawn Код:
KillsInARow[you]++; //its 1 now, since you got 1 kill after logging in. this 1 point for (1 yet) kill gets added to:
Kills[you]+=KillsInARow[you]; //adding that "temprary kill counter" to your real score
so you got 1 score. going further:
pawn Код:
KillsInARow[you]++; //its 2 now. 1+2=
Kills[you]+=KillsInARow[you];// 3 score
so w/o dying, youll earn 1+2+3+4+5+6+7+8+9+10=55 score. not too much, but not too less.
if you die, dont forget to
pawn Код:
KillsInARow[you]=0; //you died? start from beginning.
...if you dont increase the KillsInARow counter before adding it to the "final" score, youll earn 0 score for the first kill, and if you wonder "how much score a player gets when klilling 100 players w/o dying?", heres the solution:
pawn Код:
1+2+3+4+5+6+7+8+9+10 = 55
same as
(first + last) * (amount of numbers / 2)
equals
(1 + 10) * (10 / 2)
=
(11) * (5)
=
55
do that with 100 kills = (1+100)*(100/2) = 101*50 = 5050 score earned. well deserved i guess ^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)