UpInSmoke
Supreme Ruler
- Joined
- Nov 16, 2008
- Messages
- 303
- Reaction score
- 21
so im working on a system where you get points for killing players:
not getting any errors but it doesnt seem to work, actually just cause it wasnt working i went ahead and tried this:
that does work either... any ideas why..?
Code:
local storage = 28100
function onKill(cid, target, lastHit)
if lastHit == true then
if(isPlayer(target) == TRUE) then
if getPlayerIp(cid) == getPlayerIp(target) then
if getPlayerStorageValue(cid,storage) > 0 then
setPlayerStorageValue(cid,storage,(getPlayerStorageValue(cid,storage)-1))
doPlayerSendTextMessage(cid, 19, "You lose a pk point for killing a player of the same IP.")
end
else
doPlayerSendTextMessage(cid, 19, "You now have: "..getPlayerStorageValue(cid,storage).. " pk points.")
setPlayerStorageValue(cid,storage,(getPlayerStorageValue(cid,storage)+1))
end
end
end
return true
end
Code:
function onKill(cid, target, lastHit)
if isPlayer(target) then
doPlayerSendTextMessage(cid, 19, "test")
end
return true
end