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

Lua Citizen Addons

Dexftw

Total Boss
Joined
Jan 30, 2011
Messages
317
Reaction score
8
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
             if item.itemid == 1378 and getPlayerSex(cid) == 0 then
			 doPlayerSendTextMessage(cid,21,"Congratulations, you've achieved the second oriental addon!!")
			 doPlayerAddOutfit(cid,136, 3)
		elseif getPlayerSex(cid) == 1 then
		doPlayerAddOutfit(cid,128, 3)
		else
		
		      doPlayerSendCancel(cid,"You don't have the required level to use this.")
		
end
return TRUE
end

my current script, I want it to add outfit to not just male, or female but both. So females and males can get the addons
 
No wonder noone was answering the script was just fine, i had Item ~ in actions.xml instead of itemid =) I DID IT ON MY OWN! lol
 
Code:
function onUse(cid, item, frompos, item2, topos)

         if item.itemid == 1378 then
             if (getPlayerStorageValue(cid,[COLOR="red"]12005[/COLOR]) == -1) then
                doPlayerSendTextMessage(cid,21,"Congratulations, you've achieved the second oriental addon!!")
                doPlayerAddOutfitId(cid,[COLOR="red"]11[/COLOR],3)
                setPlayerStorageValue(cid,[COLOR="red"]12005[/COLOR],1)
        else
                doPlayerSendCancel(cid,25,"You Already got the Oriental addons.")
end
end
end

Use storages, u should use it cuz if one player already got it, he cans use it all times he want and could crash serv.
Also check the id of outfit in ur outfits.xml in xml folder :)
I hope it works for u. works for me
 
Back
Top