BorderLine Posted March 30, 2012 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 Actual Nick: [XGN]BorderLine Actual Clan: XLatino Actual Status: Staff, Mod Level 1 (BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline
Cadu12 Posted March 30, 2012 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. Ingame nick: Cadu12
yMassai Posted March 30, 2012 Posted March 30, 2012 u go put for download this script? Community Profile MTA:SA = Click Here
Cadu12 Posted March 30, 2012 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. Ingame nick: Cadu12
BorderLine Posted March 30, 2012 Author Posted March 30, 2012 thanks for your help cadu its working Actual Nick: [XGN]BorderLine Actual Clan: XLatino Actual Status: Staff, Mod Level 1 (BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline
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