Hello,
the following script is my first script so something is wrong.
Please currect it and explain my misstake!
PHP:function onUse(cid, item, frompos, item2, topos) local I = 1 if item.uid = 1945 and (getPlayerSex(cid) == 1) then setPlayerStorageValue(cid,4000) if getPlayerStorageValue(cid,4000) then doPlayerAddOutfit(cid,maleOutfit[I],3) setPlayerStorageValue(cid,4000,1) elseif item.uid = 1945 and (getPlayerSex(cid) == 2) then setPlayerStorageValue(cid,4000) if getPlayerStorageValue(cid,4000) then doPlayerAddOutfit (cid,femaleOutfit[I],3) setPlayerStorageValue(cid,4000,1) else doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Already have all Addons") end end end end
thanks![]()
Edit: I relly dont understand how to give a storage value...
PHP:
if item.uid = 1945 and (getPlayerSex(cid) == 1) then
setPlayerStorageValue(cid,4000)
if getPlayerStorageValue(cid,4000) then
Scripting is logik so I thought:
If a item have the id 1945 and the player have sex = male then give the player the storage value 4000. If a player with the storage value of 4000 will do it then he will get all male addons and the storage value will be set down to 1.
Last edited: