multislow Posted March 5, 2014 Posted March 5, 2014 What Proplem In This Code addEventHandler('onClientGUIClick',guiroot, if getElementType ( player ) == "police" and getElementModel function ( ) if (source == 1 ) then setElementHealth(source,100) setElementDimension ( source, 1 ) outputChatBox ( "#FF0000You Are Spwan #00FF00To Dimension ", source(), 255, 255, 255, true ) outputChatBox ( "#FF0000 To Go Really World Go To Red Blip ", source(), 255, 255, 255, true ) end end ); and thanx
Moderators Citizen Posted March 5, 2014 Moderators Posted March 5, 2014 What Proplem In This Code addEventHandler('onClientGUIClick',guiroot, if getElementType ( player ) == "police" and getElementModel function ( ) if (source == 1 ) then setElementHealth(source,100) setElementDimension ( source, 1 ) outputChatBox ( "#FF0000You Are Spwan #00FF00To Dimension ", source(), 255, 255, 255, true ) outputChatBox ( "#FF0000 To Go Really World Go To Red Blip ", source(), 255, 255, 255, true ) end end ); and thanx Well pretty much everything: 1 - indent your code 2 - Do not use anonymous functions if you are still learning the basics. 3 - source isn't a number and not a function neither. 4 - we need to know what kind of gui element source is (button ? grid list ?) 5 - Also, be sure you did the following tutorials here: https://wiki.multitheftauto.com/wiki/Scr ... troduction and https://wiki.multitheftauto.com/wiki/Int ... ng_the_GUI
multislow Posted March 5, 2014 Author Posted March 5, 2014 What Proplem In This Code addEventHandler('onClientGUIClick',guiroot, if getElementType ( player ) == "police" and getElementModel function ( ) if (source == 1 ) then setElementHealth(source,100) setElementDimension ( source, 1 ) outputChatBox ( "#FF0000You Are Spwan #00FF00To Dimension ", source(), 255, 255, 255, true ) outputChatBox ( "#FF0000 To Go Really World Go To Red Blip ", source(), 255, 255, 255, true ) end end ); and thanx Well pretty much everything: 1 - indent your code 2 - Do not use anonymous functions if you are still learning the basics. 3 - source isn't a number and not a function neither. 4 - we need to know what kind of gui element source is (button ? grid list ?) 5 - Also, be sure you did the following tutorials here: https://wiki.multitheftauto.com/wiki/Scr ... troduction and https://wiki.multitheftauto.com/wiki/Int ... ng_the_GUI go to hell i want help for code .
Castillo Posted March 5, 2014 Posted March 5, 2014 You are being helped, but what you obviously want is someone to fix it for you. I got news, that's not gonna happen, so make sure to read what Citizen told you and try to fix your code.
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