calum69
New Member
this is the script im using to recieve a reward for a kill and punish people using mc.
but how do i make the item 2152 auto stack in the players backpack? and make all people who deal damage to the person recieve 100gp instead of "lastHit"
but how do i make the item 2152 auto stack in the players backpack? and make all people who deal damage to the person recieve 100gp instead of "lastHit"
Code:
function onKill(cid, target, lastHit)
local reward = {
item = 2152, --ITEM ID!
count = 1 -- How many?
}
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
Last edited: