Launo112 Posted October 16, 2010 Share Posted October 16, 2010 Hi, my english is very bad, but i try to explain what i need. When player presses to the button called "save" then it's gonna take automatically $2500, how can i do that? At the moment it's such GUIEditor_Button[11] = guiCreateButton(144,60,41,16,"Save",false,GUIEditor_Tab[6]) GUIEditor_Button[12] = guiCreateButton(145,133,41,16,"Save",false,GUIEditor_Tab[6]) I know my english sucks... Link to comment
dzek (varez) Posted October 16, 2010 Share Posted October 16, 2010 we are not fullfilling requests here, remember that. you need to learn a lot about scripting i think, because only thing you have is the generated gui i see.. you will need: addEventHandler onClientGUIClick triggerServerEvent and on server side: addEvent addEventHandler takePlayerMoney use wiki - https://wiki.multitheftauto.com/ - and its search feature to know more. there is example within every page. also check scripting tutorial if you are new to lua: https://wiki.multitheftauto.com/wiki/Scr ... troduction And i have seen many users with much worse English than yours Link to comment
Launo112 Posted October 17, 2010 Author Share Posted October 17, 2010 Actually i have them all, but only thing what is missing is "takePlayerMoney". Link to comment
TAPL Posted October 17, 2010 Share Posted October 17, 2010 you need server-side like this addEvent("onsave", true) addEventHandler("onsave", getRootElement(), function() if ( getPlayerMoney (source) >= 2500 ) then takePlayerMoney(source, 2500) outputChatBox(............................", getRootElement(),0,255,0) else outputChatBox ("You not have enough Money!", source, 255, 0, 0, false) end end ) Link to comment
dzek (varez) Posted October 17, 2010 Share Posted October 17, 2010 Actually i have them all, but only thing what is missing is "takePlayerMoney". if this is true i think he solved this already, maybe stop bumping this, as there is no need to do that .. ? 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