I am trying to make so the player can't change outfit via a GlobalEvent script:
But It seems to not work. I don't get any errors in console ;(
That I want to do is, if the player get a storagevalue and if the player tries to change outfit, it changes back to another outfit.
Thanks
LUA:
local outfit = {lookType = 6, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}
function onThink(interval, lastExecution, thinkInterval)
if isPlayer(cid) then
if getPlayerStorageValue(cid, 11113) == 1 then
doCreatureChangeOutfit(cid, outfit, -1)
end
return true
end
return true
end
XML:
<globalevent name="ChangeOutfitBack" interval="1" script="changingoutfitback.lua"/>
But It seems to not work. I don't get any errors in console ;(
That I want to do is, if the player get a storagevalue and if the player tries to change outfit, it changes back to another outfit.
Thanks