How to make yourself so that people can choose their outfit, because now does this automatically? have a script of course, gives only what is most important:
Code:
maleOutfits = {128, 129, 130, 131, 132, 133, 134, 143, 144, 145, 146, 151, 152, 153, 154, 251, 268, 273, 278, 289, 325, 253, 254, 255,512,516,430,432,463,465,472,}
femaleOutfits = {136, 137, 138, 139, 140, 141, 142, 147, 148, 149, 150, 155, 156, 157, 158, 252, 269, 270, 279, 288, 324, 264,513,514,431,433,464,466,471,}
setGlobalStorageValue(101010, 1)
team = {
get = function(id)
if id == 0 then
return (TEAMS[1].COUNT() < TEAMS[2].COUNT()+math.random(0, 1) and 1 or 2)
else
return (TEAMS[1].COLOR[4] == getCreatureOutfit(id).lookFeet and 1 or 2)
end
end,
add = function(id, n)
if n == 0 then setGlobalStorageValue(101021, 0)
setGlobalStorageValue(101022, 0)
else
setGlobalStorageValue(101020+id, TEAMS[id].COUNT() + n)
end
return TRUE
end
}
team.add(0, 0)
event = {
login = function(cid)
if getPlayerGroupId(cid) <= 1 then
local teamid = team.get(0)
if teamid > 0 then
team.add(teamid, 1)
local NOW = getGlobalStorageValue(101010)
local color = TEAMS[teamid].COLOR doCreatureChangeOutfit(cid, {lookType = getPlayerSex(cid) == 1 and maleOutfits[math.random(#maleOutfits)] or femaleOutfits[math.random(#femaleOutfits)], lookHead = color[1], lookBody = color[2], lookLegs = color[3], lookFeet = color[4], lookAddons = math.random(3)})
doCreatureAddHealth(cid, getCreatureMaxHealth(cid), TRUE)
doCreatureAddMana(cid, getCreatureMaxMana(cid))
doPlayerSetTown(cid, TOWNS[NOW][2][teamid])
doTeleportThing(cid, getTownTemplePosition(TOWNS[NOW][2][teamid]), FALSE)
doSendMagicEffect(getCreaturePosition(cid), TEAMS[teamid].EFFECT)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Map: ".. TOWNS[NOW][1] .."\nTeam: ".. tostring(teamid) .." (".. TEAMS[1].COUNT() ..",".. TEAMS[2].COUNT() ..")\n \nChecking...\nIP: ".. doConvertIntegerToIp(getPlayerIp(cid)) .."\nMC Safe: ON\nMC Status: Clean")
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "[WAR OT]: WAR")
if getPlayerStorageValue(cid, 20000) == -1 then
setPlayerStorageValue(cid, 20000, os.time(t))
end
end
end
return TRUE
end,
combat = function(cid, target)
if cid == target or getCreatureOutfit(cid).lookFeet == getCreatureOutfit(target).lookFeet then
return FALSE
end
return TRUE
end,