dzek (varez) Posted January 21, 2010 Share Posted January 21, 2010 ok, im getting crazy with all those events to script simple mission i need a lot of events, it was easier to script main.scm nvm function startMission() triggerServerEvent('startMission', getLocalPlayer()) -- this creates vehicle, and puts player into it -- and also do setElementData (thePlayer, "missionVehicle", createdVehicle) -- now i want to read element data, and set an client exit vehicle event -- but i cannot, becouse of lag, between sending data end addEventHandler ( "onClientGUIClick", myBtn, startMission, false ) so, should i create next freaking event, for waiting data to sync? or theres another way.. maybe i dont know something yet? Link to comment
dzek (varez) Posted January 21, 2010 Author Share Posted January 21, 2010 ok, im getting crazy with all those events to script simple mission i need a lot of events, it was easier to script main.scm nvm function startMission() triggerServerEvent('startMission', getLocalPlayer()) -- this creates vehicle, and puts player into it -- and also do setElementData (thePlayer, "missionVehicle", createdVehicle) -- now i want to read element data, and set an client exit vehicle event -- but i cannot, becouse of lag, between sending data end addEventHandler ( "onClientGUIClick", myBtn, startMission, false ) so, should i create next freaking event, for waiting data to sync? or theres another way.. maybe i dont know something yet? Link to comment
Gamesnert Posted January 21, 2010 Share Posted January 21, 2010 Ehm... What exactly do you want? If you mean you want to check when element data has changed: on(Client)ElementDataChange Otherwise, could you please tell us (in detail) what you want to know? Link to comment
Gamesnert Posted January 21, 2010 Share Posted January 21, 2010 Ehm... What exactly do you want? If you mean you want to check when element data has changed: on(Client)ElementDataChange Otherwise, could you please tell us (in detail) what you want to know? Link to comment
Jumba' Posted January 21, 2010 Share Posted January 21, 2010 ok, im getting crazy with all those eventsto script simple mission i need a lot of events, it was easier to script main.scm nvm function startMission() triggerServerEvent('startMission', getLocalPlayer()) -- this creates vehicle, and puts player into it -- and also do setElementData (thePlayer, "missionVehicle", createdVehicle) -- now i want to read element data, and set an client exit vehicle event -- but i cannot, becouse of lag, between sending data end addEventHandler ( "onClientGUIClick", myBtn, startMission, false ) so, should i create next freaking event, for waiting data to sync? or theres another way.. maybe i dont know something yet? Well, in the 'startMission' function you could put the event handler in the "setElementData" (or the trigger for a client event) so you'll be sure that the data has already been synced. Link to comment
Jumba' Posted January 21, 2010 Share Posted January 21, 2010 ok, im getting crazy with all those eventsto script simple mission i need a lot of events, it was easier to script main.scm nvm function startMission() triggerServerEvent('startMission', getLocalPlayer()) -- this creates vehicle, and puts player into it -- and also do setElementData (thePlayer, "missionVehicle", createdVehicle) -- now i want to read element data, and set an client exit vehicle event -- but i cannot, becouse of lag, between sending data end addEventHandler ( "onClientGUIClick", myBtn, startMission, false ) so, should i create next freaking event, for waiting data to sync? or theres another way.. maybe i dont know something yet? Well, in the 'startMission' function you could put the event handler in the "setElementData" (or the trigger for a client event) so you'll be sure that the data has already been synced. Link to comment
dzek (varez) Posted January 21, 2010 Author Share Posted January 21, 2010 Gamesnert, i think i explained it clearly. on client side im triggering server side event to create a vehicle, setElementData for player, containing a reference to created vehicle then i want to create client side event onClientVehicleExit.. but Jumba' explained it well, thanks Link to comment
dzek (varez) Posted January 21, 2010 Author Share Posted January 21, 2010 Gamesnert, i think i explained it clearly. on client side im triggering server side event to create a vehicle, setElementData for player, containing a reference to created vehicle then i want to create client side event onClientVehicleExit.. but Jumba' explained it well, thanks 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