• 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!

only that voc can have that outfit

IMac

entrepreneur
Joined
May 31, 2009
Messages
2,482
Reaction score
16
Location
Pluto
how can i make it so only a voc gets an outfit for example

voc: orc warrior
outfit: orc warrior only orc warriors can wear
 
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? :D
 
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? :D

yes but i wanted it automatic that way i dont gotta make 15 of thm but thanks
 
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
 
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

ty i gtg now il try it after football tomorrow
 
Back
Top Bottom