• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Creaturescript onKill Question

Lava Titan

Developer
Joined
Jul 25, 2009
Messages
1,571
Solutions
3
Reaction score
98
Location
Portugal
Hey guys, I'm working on a script for a war server which will set skull to players with kill streak, the question I have is that I can't find the correct function to get player current frags..

Example of what I'm trying todo:

Code:
function onKill(cid, target, lastHit)

if player:getCurrentFrags == 5 then
    player:setSkull(SKULL_WHITE)
elseif player:getCurrentFrags == 10 then
    player:setSkull(SKULL_RED)
elseif player:getCurrentFrags == 15 then
    player:setSkull(SKULL_BLACK)
end

return true
end

"player:getCurrentFrags" is just to show what I'm trying todo, I'm totally aware this is not a function XD
 
Solution
Hey guys, I'm working on a script for a war server which will set skull to players with kill streak, the question I have is that I can't find the correct function to get player current frags..

Example of what I'm trying todo:

Code:
function onKill(cid, target, lastHit)

if player:getCurrentFrags == 5 then
    player:setSkull(SKULL_WHITE)
elseif player:getCurrentFrags == 10 then
    player:setSkull(SKULL_RED)
elseif player:getCurrentFrags == 15 then
    player:setSkull(SKULL_BLACK)
end

return true
end

"player:getCurrentFrags" is just to show what I'm trying todo, I'm totally aware this is not a function XD
Use a storage and increment it each onKill call (check if target is player)
Hey guys, I'm working on a script for a war server which will set skull to players with kill streak, the question I have is that I can't find the correct function to get player current frags..

Example of what I'm trying todo:

Code:
function onKill(cid, target, lastHit)

if player:getCurrentFrags == 5 then
    player:setSkull(SKULL_WHITE)
elseif player:getCurrentFrags == 10 then
    player:setSkull(SKULL_RED)
elseif player:getCurrentFrags == 15 then
    player:setSkull(SKULL_BLACK)
end

return true
end

"player:getCurrentFrags" is just to show what I'm trying todo, I'm totally aware this is not a function XD
Use a storage and increment it each onKill call (check if target is player)
 
Solution
Back
Top