iPrestege Posted April 30, 2013 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 .
PaiN^ Posted April 30, 2013 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 !
SoMoRay Posted April 30, 2013 Author Posted April 30, 2013 Use : setElementData getElementData And what you mean by exit when the player wasted or ? mean when player quit from plane
iPrestege Posted April 30, 2013 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" .
SoMoRay Posted April 30, 2013 Author 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
iPrestege Posted April 30, 2013 Posted April 30, 2013 You can use : triggerClientEvent -- and destroyElement -- on the server side to destroy the vehicle !
SoMoRay Posted April 30, 2013 Author Posted April 30, 2013 You can use : triggerClientEvent -- and destroyElement -- on the server side to destroy the vehicle ! trigger for which function ?
iPrestege Posted April 30, 2013 Posted April 30, 2013 Create a new function and destroy All elements .
SoMoRay Posted April 30, 2013 Author 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)
PaiN^ Posted April 30, 2013 Posted April 30, 2013 addEventHandler("onVehicleExit",getRootElement(), function() if ( Plane[source] ) then destroyElement(Plane[source]) Plane[source] = nil triggerClientEvent("Destroy",getRootElement()) end end)
iPrestege Posted April 30, 2013 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)
SoMoRay Posted April 30, 2013 Author 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
SoMoRay Posted April 30, 2013 Author 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
SoMoRay Posted April 30, 2013 Author Posted April 30, 2013 Are you sure it's server side? any errors? ya and the proplem is this
iPrestege Posted April 30, 2013 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)
SoMoRay Posted May 1, 2013 Author 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
SoMoRay Posted May 1, 2013 Author 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
SoMoRay Posted May 1, 2013 Author 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
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