dzek (varez) Posted January 21, 2010 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? Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
dzek (varez) Posted January 21, 2010 Author 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? Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
Gamesnert Posted January 21, 2010 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? Projects: Slothbot | Maximap
Gamesnert Posted January 21, 2010 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? Projects: Slothbot | Maximap
Jumba' Posted January 21, 2010 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.
Jumba' Posted January 21, 2010 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.
dzek (varez) Posted January 21, 2010 Author 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 Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
dzek (varez) Posted January 21, 2010 Author 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 Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
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