• 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 Help with my script tfs 1.2

gohamvsgoku

Member
Joined
Aug 21, 2017
Messages
151
Reaction score
9
I have this script, that give outfit/addon for player with x storage.

on Creaturescripts

Lua:
function onLogin(player)
    if player:getStorageValue(5005) == 1 then
        player:addOutfitAddon(player:getSex() == PLAYERSEX_MALE and 131, 3 or 139, 3)
    end

    return true
end

the script work but...
my problem is the player needs relog to get the addon, have some way to do this without relog? some function diferent?
 
I think so, you are using a script to add player addon when he log in, thats why...

Try to put the line “player:addoutfit...” in the script where player receive the storage 5005, try to insert player addoutfit, just after player setstorevalue
 
function onLogin(player)
if player:getStorageValue(5005) == 1 then
player:addOutfitAddon(player:getSex() == PLAYERSEX_MALE and 131, 3 or 139, 3)
player:setStorageValue(5005)
end

return true
end
 
To do it you have to change the script that give this storage, show us this script, the script you have sent just check the storage

When it is and where it is? Is a movement, an action? An creaturescript?
 
Back
Top