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

C++ Skulls

beliar34

Member
Joined
Feb 28, 2012
Messages
307
Solutions
7
Reaction score
11
Sup, why this script dont work on tfs 0.4 3777 rev (no errors in console)
Code:
local storage = 20233
function onKill(cid, target, flags, damage)
if isPlayer(target) then
if getPlayerIp(cid) ~= getPlayerIp(target) then
local frags = math.max(0, getPlayerStorageValue(cid, storage))
doCreatureSetStorage(cid, storage, frags+1)
if(frags >= 5000) then
doCreatureSetGuildEmblem(cid, EMBLEM_RED)
elseif(frags >= 1500) then
doCreatureSetGuildEmblem(cid, EMBLEM_BLUE)
elseif(frags >= 250) then
doCreatureSetGuildEmblem(cid, EMBLEM_GREEN)
end

Can i set skulss ?
which funciton ?
doPlayerSetSkullEnd(cid, 0, SKULL_RED)
doPlayerSetRedSkullTicks(cid, x)
?
 
Solution
Lua:
function onLogin(cid)
    local cfg = {
        [1] = {6001, 1},
        [2] = {6002, 20},
        [3] = {6003, 50},
        [4] = {6004, 100},
        [5] = {6005, 150}
    }
      
    for s, d in ipairs(cfg) do
        if(getPlayerStorageValue(cid, 20233) > d[2]) then
            doCreatureSetSkullType(cid, s)
        end
    end
    return true
end
and delete some "skull" in player.cpp
Lua:
function onLogin(cid)
    local cfg = {
        [1] = {6001, 1},
        [2] = {6002, 20},
        [3] = {6003, 50},
        [4] = {6004, 100},
        [5] = {6005, 150}
    }
      
    for s, d in ipairs(cfg) do
        if(getPlayerStorageValue(cid, 20233) > d[2]) then
            doCreatureSetSkullType(cid, s)
        end
    end
    return true
end
and delete some "skull" in player.cpp
 
Solution
Back
Top