• 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 Script on login

Stewie

Family Guy # ;3
Joined
May 3, 2010
Messages
786
Reaction score
12
Location
TV
Hello,someone can fix this script,this don't working:

LUA:
function onLogin(cid)
	if isPlayer(target) then
				local frags = getPlayerPoints(cid)
				if(frags >= 10) then 
					doCreatureSetSkullType(cid, SKULL_YELLOW)
				elseif(frags >= 30) then 
					doCreatureSetSkullType(cid, SKULL_GREEN)
				elseif(frags >= 80) then 
					doCreatureSetSkullType(cid, SKULL_WHITE)
				elseif(frags >= 150) then 
					doCreatureSetSkullType(cid, SKULL_RED)
				elseif(frags >= 300) then 
					doCreatureSetSkullType(cid, SKULL_BLACK)
	end
      end
	return true
end

Regards,
Stewie.
 
ok,im fix this,now have other problem,why this only works first skulls,example players with more then 100 frags still with the yellow skull
 
:) here you go

LUA:
function onLogin(cid)
 local frags = getPlayerPoints(cid)
	if frags >= 10 and frags < 30 then
		doCreatureSetSkullType(cid, SKULL_YELLOW)
	elseif frags >= 30 and frags < 80 then 
		doCreatureSetSkullType(cid, SKULL_GREEN)
	elseif frags >= 80 and frags < 150 then
		doCreatureSetSkullType(cid, SKULL_WHITE)
	elseif frags >= 150 and frags < 300 then
		doCreatureSetSkullType(cid, SKULL_RED)
	elseif frags > 300 then
		doCreatureSetSkullType(cid, SKULL_BLACK)
	end
	return true
end
 
Back
Top