Scorpvm 101
Active Member
Hi guys,
Someone knows how is the script when a person kills another, to give you a prize.
I have one example but dont function.
I use REV_0.4
Someone knows how is the script when a person kills another, to give you a prize.
I have one example but dont function.
I use REV_0.4
PHP:
function onKill(cid, target, lastHit)
local reward = {
item = 2152, --ITEM ID!(EDIT HERE)
count = 1 -- How many?(EDIT HERE)
}
if(isPlayer(cid) and isPlayer(target)) then
if getPlayerIp(cid) ~= getPlayerIp(target) then
doPlayerAddItem(cid, reward.item, reward.count)
else
doPlayerAddExperience(cid, -1000000)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You have been punished for killing a player of the same IP.")
end
end
return TRUE
end