BorderLine Posted March 30, 2012 Share Posted March 30, 2012 Hi everyone. Well im trying to make a buy skin with a gui. But my skin dont change. This is my code client addEventHandler("onClientGUIClick",getRootElement(), function (player) if (source == buyleon) then money = getPlayerMoney (source) if (money >= 500000) then player = getLocalPlayer() playSound ( "sounds/shop/thx.mp3", false ) triggerServerEvent ("leon",getLocalPlayer(),leon) else playSound ( "sounds/shop/nocash.mp3", false ) end end end) server function leon () setElementModel ( source, 25,true ) takePlayerMoney(source,500000) end addEvent("leon",true) addEventHandler("leon",getRootElement(),leon) The skin dont change and dont take money. If someone know what is my problem. Debug dont show erros Link to comment
Cadu12 Posted March 30, 2012 Share Posted March 30, 2012 addEventHandler("onClientGUIClick",getRootElement(), function (player) if (source == buyleon) then money = getPlayerMoney (getLocalPlayer()) if (money >= 500000) then playSound ( "sounds/shop/thx.mp3", false ) triggerServerEvent ("leon",getLocalPlayer()) else playSound ( "sounds/shop/nocash.mp3", false ) end end end) function leon () setElementModel ( source, 25,true ) takePlayerMoney(source,500000) end addEvent("leon",true) addEventHandler("leon",getRootElement(),leon) Edit: Updated code. Link to comment
yMassai Posted March 30, 2012 Share Posted March 30, 2012 u go put for download this script? Link to comment
Cadu12 Posted March 30, 2012 Share Posted March 30, 2012 What do you mean? Do you mean that I am going upload your script? If so, then I dont. PS: Code is update, copy the code again. Link to comment
BorderLine Posted March 30, 2012 Author Share Posted March 30, 2012 thanks for your help cadu its working Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now