iPrestege Posted April 30, 2013 Share Posted April 30, 2013 'onVehicleExit' or 'onClientVehicleExit' And what Mr.Pres[T]ege gave you . No he should use it on the server side only and i don't understand him about exit : P i was thinking he mean wasted or or etc . Link to comment
PaiN^ Posted April 30, 2013 Share Posted April 30, 2013 No he should use it on the server side only and i don't understand him about exit : P i was thinking he mean wasted or or etc . What do you mean ? It is server side events ! Link to comment
SoMoRay Posted April 30, 2013 Author Share Posted April 30, 2013 Use : setElementData getElementData And what you mean by exit when the player wasted or ? mean when player quit from plane Link to comment
iPrestege Posted April 30, 2013 Share Posted April 30, 2013 No he should use it on the server side only and i don't understand him about exit : P i was thinking he mean wasted or or etc . What do you mean ? It is server side events ! I mean you said to ise "onVehicleExit" or "Client" Right? It's better to use it server to check the "Plane" . Link to comment
SoMoRay Posted April 30, 2013 Author Share Posted April 30, 2013 No he should use it on the server side only and i don't understand him about exit : P i was thinking he mean wasted or or etc . What do you mean ? It is server side events ! I mean you said to ise "onVehicleExit" or "Client" Right? It's better to use it server to check the "Plane" . I don't understand getElementData setElementData Link to comment
iPrestege Posted April 30, 2013 Share Posted April 30, 2013 You can use : triggerClientEvent -- and destroyElement -- on the server side to destroy the vehicle ! Link to comment
SoMoRay Posted April 30, 2013 Author Share Posted April 30, 2013 You can use : triggerClientEvent -- and destroyElement -- on the server side to destroy the vehicle ! trigger for which function ? Link to comment
iPrestege Posted April 30, 2013 Share Posted April 30, 2013 Create a new function and destroy All elements . Link to comment
SoMoRay Posted April 30, 2013 Author Share Posted April 30, 2013 Create a new function and destroy All elements . ----------- Client Side ! addEvent("Destroy",true) addEventHandler("Destroy",getRootElement(), function() destroyElement(marker[2]) destroyElement(marker[3]) destroyElement(marker[4]) end) ------------ Server Side ! addEventHandler("onVehicleExit",getRootElement(), function() if ( Plane[source] ) then destroyElement(Plane[source]) triggerClientEvent("Destroy",getRootElement()) end end) Link to comment
PaiN^ Posted April 30, 2013 Share Posted April 30, 2013 addEventHandler("onVehicleExit",getRootElement(), function() if ( Plane[source] ) then destroyElement(Plane[source]) Plane[source] = nil triggerClientEvent("Destroy",getRootElement()) end end) Link to comment
iPrestege Posted April 30, 2013 Share Posted April 30, 2013 Client : addEvent("Destroy",true) addEventHandler("Destroy",getRootElement(), function() if ( marker[2] or marker[3] or marker[4] ) then destroyElement(marker[2]) destroyElement(marker[3]) destroyElement(marker[4]) end end ) Server : function xxx(player) if ( source == Plane[source] ) then destroyElement(Plane[source]) triggerClientEvent(player,"Destroy",player) end end addEventHandler("onVehicleStartExit",getRootElement(),xxx) addEventHandler("onVehicleExit",getRootElement(),xxx) Link to comment
SoMoRay Posted April 30, 2013 Author Share Posted April 30, 2013 addEventHandler("onVehicleExit",getRootElement(), function() if ( Plane[source] ) then destroyElement(Plane[source]) Plane[source] = nil triggerClientEvent("Destroy",getRootElement()) end end) stil don't destroy vehicle Link to comment
SoMoRay Posted April 30, 2013 Author Share Posted April 30, 2013 Client : addEvent("Destroy",true) addEventHandler("Destroy",getRootElement(), function() if ( marker[2] or marker[3] or marker[4] ) then destroyElement(marker[2]) destroyElement(marker[3]) destroyElement(marker[4]) end end ) Server : function xxx(player) if ( source == Plane[source] ) then destroyElement(Plane[source]) triggerClientEvent(player,"Destroy",player) end end addEventHandler("onVehicleStartExit",getRootElement(),xxx) addEventHandler("onVehicleExit",getRootElement(),xxx) still don't work Link to comment
iPrestege Posted April 30, 2013 Share Posted April 30, 2013 Are you sure it's server side? any errors? Link to comment
SoMoRay Posted April 30, 2013 Author Share Posted April 30, 2013 Are you sure it's server side? any errors? ya and the proplem is this Link to comment
SoMoRay Posted April 30, 2013 Author Share Posted April 30, 2013 Debugscript 3 ? No Any Error Link to comment
iPrestege Posted April 30, 2013 Share Posted April 30, 2013 Oh,Sorry my bad : Try this : -- Server -- function xxx(player) if ( source == Plane[player] ) then destroyElement(Plane[player]) triggerClientEvent(player,"Destroy",player) end end addEventHandler("onVehicleStartExit",getRootElement(),xxx) addEventHandler("onVehicleExit",getRootElement(),xxx) Link to comment
SoMoRay Posted May 1, 2013 Author Share Posted May 1, 2013 Oh,Sorry my bad :Try this : -- Server -- function xxx(player) if ( source == Plane[player] ) then destroyElement(Plane[player]) triggerClientEvent(player,"Destroy",player) end end addEventHandler("onVehicleStartExit",getRootElement(),xxx) addEventHandler("onVehicleExit",getRootElement(),xxx) thanx but now proplem on destroy plane and all marker + blip doesn't open window on marker[1] when attached to him Link to comment
iPrestege Posted May 1, 2013 Share Posted May 1, 2013 Of course because the marker has been destroyed . Link to comment
SoMoRay Posted May 1, 2013 Author Share Posted May 1, 2013 Of course because the marker has been destroyed . how it's now wil be to open when attached to him the player leave plane Link to comment
iPrestege Posted May 1, 2013 Share Posted May 1, 2013 Don't destroy the marker when you leave it. Link to comment
SoMoRay Posted May 1, 2013 Author Share Posted May 1, 2013 Don't destroy the marker when you leave it. I don't destroy him but this is the proplem I go inside marker and doesn't open for me window Link to comment
iPrestege Posted May 1, 2013 Share Posted May 1, 2013 Post the client and server side you are using now. 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