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

Skull system script tfs 1.2

weverton

New Member
Joined
May 30, 2009
Messages
104
Reaction score
2
Help!!!
Skull system creaturescript script in tfs 1.2?
"x" Storage = get skull "x"
I have for tfs 0.4 :s
Thx
 
Post your script...it is easier to adapt to 1.2
Code:
function onLogin(cid)
    local frags = math.max(0, getPlayerStorageValue(cid, 20233))
                local frags = math.max(0, getPlayerStorageValue(cid, 20233))
                        if frags >= 200 and frags < 300 then
                        doCreatureSetSkullType(cid, SKULL_YELLOW)
                    elseif frags >= 301 and frags < 450 then
                        doCreatureSetSkullType(cid, SKULL_GREEN)
                    elseif frags >= 451 and frags < 650 then
                        doCreatureSetSkullType(cid, SKULL_WHITE)
                    elseif frags >= 651 and frags < 1050 then
                        doCreatureSetSkullType(cid, SKULL_RED)
                    elseif frags > 1051 then
                        doCreatureSetSkullType(cid, SKULL_BLACK)
                end
    return true
end
hello untrax
I tried to put player:
but it did not work
thanks
 
@weverton
Code:
function onLogin(player)
                local frags = math.max(0, player:getStorageValue(20233))
                        if frags >= 200 and frags < 300 then
                        player:setSkull(SKULL_YELLOW)
                    elseif frags >= 301 and frags < 450 then
                        player:setSkull(SKULL_GREEN)
                    elseif frags >= 451 and frags < 650 then
                        player:setSkull(SKULL_WHITE)
                    elseif frags >= 651 and frags < 1050 then
                        player:setSkull(SKULL_RED)
                    elseif frags > 1051 then
                        player:setSkull(SKULL_BLACK)
                end
    return true
end
 
You can use any storage, it can be changed though
Yes, but it still needs to be changed in a onKill script because if you just change the storage number in the login script nothing will happen.

Because this script checks the value of storage and adds a skull for each value.
 
Back
Top