GhostXoP Posted June 28, 2012 Share Posted June 28, 2012 I have used Client where Source should be in some Scenario's, What is the difference? What are their values and what should each be used for? Link to comment
qaisjp Posted June 28, 2012 Share Posted June 28, 2012 It's just a name, you can call it "cakeface" if you want, refer to the wiki for their actual values. For example, onColShapeHit has a source value that is a marker (source values have variable name "source" that can be changed if re-declared) and first argument is the hit element so: addEventHandler("onColShapeHit", root, function( hitElement ) outputChatBox( "A " .. getElementType(hitElement) .. " hit a " .. getElementType(source) ) end ) To redeclare the source and call it "marker" (in most cases you wont need to do this): addEventHandler("onColShapeHit", root, function( hitElement ) local marker = source outputChatBox( "A " .. getElementType(hitElement) .. " hit a " .. getElementType(marker) ) end ) Nearly all the time source is predefined, and client is manually defined (client = x, source is created by MTA) It depends on what the wiki says and what you call the variables. Link to comment
-ffs-Sniper Posted June 28, 2012 Share Posted June 28, 2012 https://wiki.multitheftauto.com/wiki/AddEventHandler Here you can see what the meaning of each predefined variable is (for events only). 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