• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Reward on frag question.

Dangnoob

Member
Joined
Jun 8, 2008
Messages
105
Solutions
2
Reaction score
12
Here is my current script.
Code:
function onKill(cid, target, lastHit)
if isPlayer(cid) and isPlayer(target) and getPlayerLevel(cid) < 500 then
    local expForUp = getPlayerExperience(target) / 20
    doPlayerAddExp(cid, expForUp)
end
return true
end

As you can see, it gives experience to the player that killed the player. Works and all is well. My question would be now how would I go about dividing that now by all the killers and spread it evenly. For example.

local expForUp = ( getPlayerExperience(target) / 20) / (killers)

And, if its possible, which i dont think it is.. But is there a way to make it "in the same life". If the player attacks a player, dies, and then logs back in, he obviously shouldnt get the experience. Im just not even sure if that is possible through code.

Thanks in advance if anybody can help me.

Nevermind. I got it all figured out.
 
Last edited by a moderator:
Back
Top