HunT Posted December 30, 2011 Share Posted December 30, 2011 Is Possible get the numbers from database for use in client function type GUI or Dx Example one label onMapStarting with name top 1,for this i need the element from db. getElementData or Trigg server? Tnx Link to comment
Castillo Posted December 30, 2011 Share Posted December 30, 2011 I don't get what do you mean. P.S: onMapStarting is a server-side event, GUI and DX is client-side. Link to comment
HunT Posted December 30, 2011 Author Share Posted December 30, 2011 I don't get what do you mean.P.S: onMapStarting is a server-side event, GUI and DX is client-side. Yep Castillo i Know This,my question is only how call the element from database to client function. Function onMapStarting server side for call the element + triggerClientEvent (.... ,".....", root, element from db) or directory getElementData in file client,but maybe getElementData is not good for call the elements from db Link to comment
JR10 Posted December 30, 2011 Share Posted December 30, 2011 What you're saying is not really apparent. If you mean getting an element, you can use getElementByID, but I don't recommend this, as you might have conflicts. So triggerServerEvent I think is the best way. Link to comment
HunT Posted December 31, 2011 Author Share Posted December 31, 2011 Tnx TheRock But is possible set the element client type GUIlabel with setElementData. Client : label = createLabel . . ..etc Server : point = getAccountData (example points) + setElementData . . .label . . .tostring point or 0 Edit: Happy New Year Link to comment
BinSlayer1 Posted December 31, 2011 Share Posted December 31, 2011 no https://wiki.multitheftauto.com/wiki/SetElementData "As such you should avoid passing data that is not able to be synced into this function (i.e. xmlnodes, acls, aclgroups etc.)" Passing GUI elements to setElementData is not able to be synced with the server since GUI elements do not exist in the server. 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