Minokon Posted June 3, 2011 Share Posted June 3, 2011 (edited) Welcome I have next question: How to create variables for one player? Like PVars in SA-MP, function which you can use to save some data for player. Thanks for help Edited August 21, 2011 by Guest Link to comment
Raimis_R Posted June 3, 2011 Share Posted June 3, 2011 I don't know but where no functions like SetPVarInt(playerid,"Name",Value); 100% because Pawn and LUA its so different. Where are functions and eventHandlers Link to comment
Minokon Posted June 3, 2011 Author Share Posted June 3, 2011 (edited) So I must use tables? Like: local pVehicle = { } pVehicle[thePlayer] = vehicle Other question: In client-side script I don't have to use tables? Only local pVehicle pVehicle = vehicle Edited August 21, 2011 by Guest Link to comment
Snoozy Posted June 3, 2011 Share Posted June 3, 2011 Use: setElementData(thePlayer,"Money",value) - for example getElementData(thePlayer,"Money") Link to comment
Minokon Posted June 3, 2011 Author Share Posted June 3, 2011 (edited) Thank you! So in client-side scripts I have to use: setElementData(getLocalPlayer(), "Money", value) And I can read this in server-side scripts? And other, maybe stupid question: saved data with that function is avaiable to read in all resources? P.S I'm sorry because I'm some green in Lua @DOWN This isn't problem I can't understand some words, and google translate can't help too. Here language is some simplier for me Sorry for problem, which I creating. Edited August 21, 2011 by Guest Link to comment
Aibo Posted June 3, 2011 Share Posted June 3, 2011 read about element data: https://wiki.multitheftauto.com/wiki/Element_data you should sometimes click the functions highlighted in the code here. Link to comment
Snoozy Posted June 3, 2011 Share Posted June 3, 2011 Yea it can be used both serverside and clientside 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