[Snippet] Adding Player EXP
Here is how you can add player exp basically when you kill someone you will gain whatever set exp on kill.
Note this tutorial is for the ISS source if you have problems adding it to an older source post below.
Ok now open WarZ_Server.sln search for this code
Code:
targetPlr->killedBy = obj_ServerGravestone::KilledBy_Player;
Now below this add this code
Code:
obj_ServerPlayer * killerPlr = ((obj_ServerPlayer*)sourceObj);
gServerLogic.AddPlayerReward(killerPlr, RWD_PlayerKill);
Now once your done that search for this
Code:
enum EPlayerRewardID
Below superzombie exp add this
Code:
RWD_PlayerKill = 3,
now search for this
Code:
void CGameRewards::InitDefaultRewards()
once again under superzombie add this
Code:
SetReward(3, "PlayerKill", 0, 15, 0, 15);
Now compile and your good too go ps will give 15 exp to killer.
Re: [Snippet] Adding Player EXP
Re: [Snippet] Adding Player EXP
Re: [Snippet] Adding Player EXP
Re: [Snippet] Adding Player EXP
new exp by kill player
Thank you
Re: [Snippet] Adding Player EXP
Re: [Snippet] Adding Player EXP
Quote:
Error C2660: 'ServerGameLogic::AddPlayerReward' : function does not take 2 arguments
Well what happened?
Re: [Snippet] Adding Player EXP
Re: [Snippet] Adding Player EXP
FinalEnd, plz make a guide for exp by super_zombie
Re: [Snippet] Adding Player EXP
Quote:
Originally Posted by
Cryptopia
Well what happened?
Did you add it properly?, as it should have worked.
Re: [Snippet] Adding Player EXP
Quote:
Originally Posted by
javaz97
FinalEnd, plz make a guide for exp by super_zombie
???
http://forum.ragezone.com/f791/tutor...p-drop-965499/
Re: [Snippet] Adding Player EXP
Quote:
Originally Posted by
TheAlmightyLord
(Only InvasionMMO Source)
Re: [Snippet] Adding Player EXP
Quote:
Originally Posted by
skyone
(Only InvasionMMO Source)
http://forum.ragezone.com/f791/tutor...4/#post7980305
Re: [Snippet] Adding Player EXP
Quote:
gServerLogic.AddPlayerReward(killedByPlr, RWD_PlayerKill, 0);
The function addplayerreward has 3 things:
Quote:
void ServerGameLogic::AddPlayerReward(obj_ServerPlayer* plr, EPlayerRewardID rewardID,int HeroItemID)
The third one is the hero item id, but you can set it to 0.
Re: [Snippet] Adding Player EXP
Quote:
Originally Posted by
fredaikis
The function addplayerreward has 3 things:
The third one is the hero item id, but you can set it to 0.
guy show full code