• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved Set outfit to group ID.

tivep91

New Member
Joined
Jul 1, 2012
Messages
39
Reaction score
2
Hi all,

I am writing here because I'm wondering how to make a script, which sets up an outfit for the group.

example:

GOD (group id 6) - sets him straight away outfit 332

If possible, please provide a script with the config.

Thanks for reading,

Regards,
tivep91.
 
Code:
 if getPlayerAccess(cid) >= 6 then
doCreatureChangeOutfit(cid, 332)
elseif getPlayerAccess >= 5 then
doCreatureChangeOutfit(cid, outfit)
elseif getPlayerAccess >= 4 then
doCreatureChangeOutfit(cid, outfit)
it works something like this.
 
Last edited:
Code:
if getPlayerAcess(cid) == 6 then
doSetCreatureOutfit(cid, 322, -1)-- -1 = unlimted
return true
end

add it in login.lua

or table way
Code:
local x = {
[6] = {outfit = 322, time = 500},
[5] = {outfit = 321, time = 5000}
}
for i,v in pairs(x) do
if getPlayerAcess(cid) == x then
doSetCreatureOutfit(cid, v.outfit, time)
end
return true
end
 
Last edited:
I made this script, but it isn't working.
staffOutfits.lua
PHP:
local outfitBH =
    {
        lookType = 75,
        lookHead = 48,
        lookBody = 68,
        lookLegs = 79,
        lookFeet = 130,
        lookAddons = 0
    }
  
local outfitTR =
    {
        lookType = 75,
        lookHead = 148,
        lookBody = 112,
        lookLegs = 154,
        lookFeet = 10,
        lookAddons = 0
    }
  
local outfitCM =
    {
        lookType = 75,
        lookHead = 130,
        lookBody = 80,
        lookLegs = 30,
        lookFeet = 48,
        lookAddons = 0
    }
  
local outfitGM =
    {
        lookType = 0,
        lookHead = 0,
        lookBody = 0,
        lookLegs = 0,
        lookFeet = 0,
        lookAddons = 0
    }
function onLogin(cid)
    if isPlayerSupportMember(cid) == true then -- new function in our engine (manually added)
        elseif getPlayerGroupId == 2 then
            doSetCreatureOutfit(cid, config.outfitBH, -1)
            elseif getPlayerGroupId == 3 then
                doSetCreatureOutfit(cid, config.outfitTR, -1)
                elseif getPlayerGroupId == 5 then
                    doSetCreatureOutfit(cid, config.outfitCM, -1)
                        elseif getPlayerGroupId == 6 then
                            doSetCreatureOutfit(cid, config.outfitGM, -1)
    end
end

Added to login.lua:
registerCreatureEvent(cid, "StaffOutfits")
 
Add this to your login.lua, below function onLogin(cid)
Code:
local t = {
   [2] = {lookType = 75, lookHead = 48, lookBody = 68, lookLegs = 79, lookFeet = 130, lookAddons = 0},
   [3] = {lookType = 75, lookHead = 148, lookBody = 112, lookLegs = 154, lookFeet = 10, lookAddons = 0},
   [5] = {lookType = 75, lookHead = 130, lookBody = 80, lookLegs = 30, lookFeet = 48, lookAddons = 0},
   [6] = {lookType = 0, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0}
}

local v = t[getPlayerGroupId(cid)]
if isPlayerSupportMember(cid) == true then
    if v then
        doSetCreatureOutfit(cid, v, -1)
    end
end
 
Back
Top