• 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!

Lua Skull And Frags!

Big Gunz

Active Member
Joined
Nov 17, 2011
Messages
1,064
Reaction score
32
Location
United States
Hey guys! im triying to use the skull system that when you get x frags u get a skull but the problem is I dont know what to do so when you attack a player u dont get white.. and when you attack ur self u dont get yellow! can somebody please! Tell me how to fix that? :\ and also how can I remove all the frags in my ot?

Thanks Guys I appreciate Ur Help :)
 
LUA:
--[[
   Script by Cronox
   ----------------
SKULL_YELLOW = 1
SKULL_GREEN = 2
SKULL_WHITE = 3
SKULL_RED = 4
SKULL_BLACK = 5
note: Edit cronox >= 1  <-- How much Frags get skull
]]--

local cronox = getPlayerFrags(cid)
function onKill(cid, target, lastHit)
		if cronox >= 1 then
			doCreatureSetSkullType(cid, 1)
		elseif cronox >= 2 then
			doCreatureSetSkullType(cid, 2)
		elseif cronox >= 3 then
			doCreatureSetSkullType(cid, 3)
		elseif cronox >= 4 then
			doCreatureSetSkullType(cid, 4)
		elseif cronox >= 5 then
			doCreatureSetSkullType(cid, 5)
		end
	return true
end
 
Last edited:
LUA:
local player = {
	{frags = 1, skull = 1}, -- Yellow Skull
	{frags = 2, skull = 2}, -- Green Skull
	{frags = 3, skull = 3}, -- White Skull
	{frags = 4, skull = 4}, -- Red Skull
	{frags = 5, skull = 5}  -- Black Skull
}
 
 function onKill(cid, target, lastHit)
	for _,v in pairs(player) do
		if(isPlayer(cid) and isPlayer(target)) then
			if(getPlayerFrags(cid) >= v.frags) then
				doCreatureSetSkullType(cid, v.skull)
			end
		end
	end
	return true
end
 
Last edited:
acubens and can you please explain to me how this works? thanks both of you. I already have the mod to get the skulls but the problem is can you attack a player you get white.. and can you attack ur self u get yellow skull.. thats the problem :\
 
Back
Top