MAB Posted June 25, 2015 Share Posted June 25, 2015 Hi i am making a fisher job and i will use setElementData and getElementData but idk how to use these two functions. what i want to use them for is the set the Data of the player as a fisher when he start the job then i will make some functions using getElementData ... checking if he is a fisher or not to make these functions... i just want to know how to use setElementData so can someone please tell me how the arguments works? and what are the arguments for? *NOTE: if you speak Arabic then put me the reply in Arabic....if you aren't then no problem Link to comment
Walid Posted June 25, 2015 Share Posted June 25, 2015 Hi i am making a fisher job and i will use setElementData and getElementData but idk how to use these two functions.what i want to use them for is the set the Data of the player as a fisher when he start the job then i will make some functions using getElementData ... checking if he is a fisher or not to make these functions... i just want to know how to use setElementData so can someone please tell me how the arguments works? and what are the arguments for? *NOTE: if you speak Arabic then put me the reply in Arabic....if you aren't then no problem all what you need is here wiki. setElementData getElementData Link to comment
MAB Posted June 25, 2015 Author Share Posted June 25, 2015 Hi i am making a fisher job and i will use setElementData and getElementData but idk how to use these two functions.what i want to use them for is the set the Data of the player as a fisher when he start the job then i will make some functions using getElementData ... checking if he is a fisher or not to make these functions... i just want to know how to use setElementData so can someone please tell me how the arguments works? and what are the arguments for? *NOTE: if you speak Arabic then put me the reply in Arabic....if you aren't then no problem all what you need is here wiki. setElementData getElementData walid.... if i understood what is written in the wiki why would i have come here?! Link to comment
tuaos Posted June 25, 2015 Share Posted June 25, 2015 (edited) setElementData ( source, "fisherman", true) --Use it on function for accepting job This will set the player data as fisherman, source is the player so make sure to change it according to your function argument for player Element. -- use it for checking if ( getElementData( source, "fisherman" ) == true ) then Same for source, define it accordingly... Edited June 26, 2015 by Guest Link to comment
The Don Posted June 25, 2015 Share Posted June 25, 2015 small example i hope you get the idea addCommandHandler ('data', function () setElementData ( localPlayer , "DataCheck",true ) end ) addCommandHandler('data2', function () if getElementData ( localPlayer , "DataCheck") == true then outputChatBox('Data Checked') else outputChatBox('Data not checked') end end ) and check the wiki 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