• 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 problem with script

straher

???
Joined
Mar 23, 2010
Messages
255
Reaction score
3
This script should set players skulls depending on how many frags they get (storage) but well... it doesn't no problems printed in console when reloading creaturescripts.

Lua:
function onKill(cid, target, lastHit)
	if cid ~= target and isPlayer(target) then
if(getPlayerStorageValue(cid, 20233) > 1) and getCreatureStorage(cid, 6001) == -1 then
		setPlayerStorageValue(cid, 6001, 1)
		doCreatureSetSkullType(cid, 1) 

	elseif(getPlayerStorageValue(cid, 20233) > 20) and getCreatureStorage(cid, 6002) == -1 then
		setPlayerStorageValue(cid, 6002, 1)
		doCreatureSetSkullType(cid, 2) -- 3 is red

	elseif(getPlayerStorageValue(cid, 20233) > 50) and getCreatureStorage(cid, 6003) == -1 then
		setPlayerStorageValue(cid, 6003, 1)
		doCreatureSetSkullType(cid, 3) -- 5 is black
 
	elseif(getPlayerStorageValue(cid, 20233) > 100) and getCreatureStorage(cid, 6005) == -1 then
		setPlayerStorageValue(cid, 6005, 1)
doCreatureSetSkullType(cid, 4)

	elseif(getPlayerStorageValue(cid, 20233) > 150) and getCreatureStorage(cid, 6006) == -1 then
		setPlayerStorageValue(cid, 6006, 1)
	doCreatureSetSkullType(cid, 5)
end
end
	return true
end
 
Back
Top