Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- this a global table within the script
- local killTable = {}
- local timer = 30 -- time in seconds
- function populate(cid, target, seconds)
- locla ip = getPlayerIp(target)
- if not killTable[cid] == ip then
- killTable[cid] = ip
- addEvent(
- function(cid)
- killTable[cid] = 0
- end,
- seconds * 1000,
- cid
- )
- return true
- end
- return false
- end
- -- 2nd script
- function onKill(cid, target, lastHit)
- if cid ~= target and isPlayer(target) then
- if getPlayerIp(cid) == getPlayerIp(target) then
- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You will be punished for killing a player of the same IP and will not recieve the reward.')
- else
- if populate(cid, target, timer) then
- doPlayerAddItem(cid, 2159, 1)
- end
- end
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement