local fragStorage = 1234 -- storage id for killer players (storage if para o jogador matador)
local skulls = { -- skulls ids
[1]={frags = 10}, -- id 1 for yellow skull
[2]={frags = 25}, -- id 2 for green skull
[3]={frags = 50}, -- id 3 for white skull
[4]={frags = 100} -- id 4 for red skull
}
function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)
if isPlayer(mostDamageKiller) == true then
setPlayerStorageValue(mostDamageKiller, fragStorage, getPlayerStorageValue(mostDamageKiller, fragStorage)+1)
for i = 1, table.maxn(skulls) do
if getPlayerStorageValue(mostDamageKiller, fragStorage) >= skulls[i].frags then
doCreatureSetSkullType(mostDamageKiller, skulls[i])
end
end
end
return true
end