<outfit id="X" premium="yes" quest="2001">
<list gender="0" lookType="X" name="Orc"/>
<list gender="1" lookType="X" name="Orc"/>
</outfit>
function onLogin(cid)
if (getPlayerStorageValue(cid, 2001) ~= 1) then
if getPlayerVocation(cid) == 1 then
doPlayerAddOutfit(cid, X, 0)
setPlayerStorageValue(cid, 2001, 1)
end
return TRUE
end
PHP:<outfit id="X" premium="yes" quest="2001"> <list gender="0" lookType="X" name="Orc"/> <list gender="1" lookType="X" name="Orc"/> </outfit>
LUA:function onLogin(cid) if (getPlayerStorageValue(cid, 2001) ~= 1) then if getPlayerVocation(cid) == 1 then doPlayerAddOutfit(cid, X, 0) setPlayerStorageValue(cid, 2001, 1) end return TRUE end
Like this?![]()
bump
Do it yourself using elseif's, not hard at all.
function onLogin(cid)
if (getPlayerStorageValue(cid, 2001) ~= 1) then
if getPlayerVocation(cid) == 1 then
doPlayerAddOutfit(cid, X, 0)
setPlayerStorageValue(cid, 2001, 1)
end
return TRUE
end
if (getPlayerStorageValue(cid, 2001) ~= 1) then
if (getPlayerStorageValue(cid, 2001) ~= 1) then
-- your code --
elseif (getPlayerStorageValue(cid, 2002) ~= 1) then
-- your code --
end
Maybe you should at least consider to attempt to give a shot at pretending to try.
Heres what was posted earlier;
Code:function onLogin(cid) if (getPlayerStorageValue(cid, 2001) ~= 1) then if getPlayerVocation(cid) == 1 then doPlayerAddOutfit(cid, X, 0) setPlayerStorageValue(cid, 2001, 1) end return TRUE end
Works fine, but you want all 4 vocations in one script, correct? Then you need to check for each storage value (should be vocation but what ever...) soo;
Code:if (getPlayerStorageValue(cid, 2001) ~= 1) then
Checks for 2001, if it is 2001, then it does everything up until the first end. To add another one;
Code:if (getPlayerStorageValue(cid, 2001) ~= 1) then -- your code -- elseif (getPlayerStorageValue(cid, 2002) ~= 1) then -- your code -- end
No extra 'ends' are needed for elseif's, so it is an extremely easy edit to make. Try it, if theres errors with the script you try yourself I'll try to fix them, but I'm not doing it for you