SoMoRay Posted May 1, 2013 Author Share Posted May 1, 2013 Post the client and server side you are using now. GUIEditor = { memo = {} } marker[1] = createMarker( 1958.2806396484, -2183.5830078125, 13.546875,"cylinder", 2, 255, 0, 0, 255 ) blip = createBlip( 1958.2806396484, -2183.5830078125, 13.546875, 5, 3, 255, 0, 0, 255 ) addEventHandler("onClientResourceStart", resourceRoot, function( ) wnd = guiCreateWindow(544, 219, 393, 315, "Pilot Misson", false) guiWindowSetSizable(wnd, false) guiSetAlpha(wnd, 1.00) GUIEditor.memo[1] = guiCreateMemo(13, 32, 370, 186, "Pilot Misson By AlooyFTW", false, wnd) guiMemoSetReadOnly(GUIEditor.memo[1], true) Take_it = guiCreateButton(23, 247, 146, 41, "Take It !", false, wnd) guiSetProperty(Take_it, "NormalTextColour", "FFAAAAAA") Exit = guiCreateButton(227, 247, 146, 41, "Exit", false, wnd) guiSetProperty(Exit, "NormalTextColour", "FFAAAAAA") guiSetVisible(wnd,false) end ) addEventHandler("onClientMarkerHit",getRootElement(), function( element ) if element == localPlayer then if ( source == marker[1] ) then guiSetVisible(wnd,true) showCursor(true) elseif ( source == marker[2] ) then destroyElement(marker[2]) destroyElement( blip1 ) outputChatBox ( "Go To Red Flag Blip In Map !", source, 255, 0, 0, true ) marker[3] = createMarker( -1648.7810058594, -201.68106079102, 14.240471839905,"cylinder", 5, 255, 255, 0, 255 ) blip2 = createBlip( -1648.7810058594, -201.68106079102, 14.240471839905, 19, 2, 255, 0, 0, 255 ) elseif ( source == marker[3] ) then destroyElement(marker[3]) destroyElement( blip2 ) outputChatBox ( "Go To Red Flag Blip In Map !", source, 255, 0, 0, true ) marker[4] = createMarker( 1955.7342529297, -2493.7749023438, 13.53911781311,"cylinder", 5, 255, 255, 0, 255 ) blip3 = createBlip( 1955.7342529297, -2493.7749023438, 13.53911781311, 19, 2, 255, 0, 0, 255 ) elseif ( source == marker[4] ) then destroyElement(marker[4]) destroyElement( blip3 ) triggerServerEvent("Done",getLocalPlayer()) end end end ) addEventHandler("onClientGUIClick",getRootElement(), function( ) if ( source == Exit ) then guiSetVisible(wnd,false) setElementPosition( localPlayer,1957.9681396484, -2179.650390625, 13.546875 ) setCameraTarget( localPlayer ) showCursor(false) elseif ( source == Take_it ) then guiSetVisible(wnd,false) showCursor(false) outputChatBox ( "Go To Red Flag Blip In Map !", source, 255, 0, 0, true ) triggerServerEvent("onPlayerTake",getLocalPlayer()) marker[2] = createMarker( 1438.82421875, 1462.8070068359, 10.8203125,"cylinder", 5, 255, 255, 0, 255 ) blip1 = createBlip( 1438.82421875, 1462.8070068359, 10.8203125, 19, 2, 255, 0, 0, 255 ) setCameraTarget( localPlayer ) end end ) ----------- Client Side ! addEvent("Destroy",true) 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]) destroyElement(blip1) destroyElement(blip2) destroyElement(blip3) end end ) -------------------- blow addEvent("Blow",true) addEventHandler("Blow",getRootElement(), function() if ( marker[2] or marker[3] or marker[4] ) then destroyElement(marker[2]) destroyElement(marker[3]) destroyElement(marker[4]) destroyElement(blip1) destroyElement(blip2) destroyElement(blip3) outputChatBox ( "Misson Canceled For You Exit Plane !", source, 255, 0, 0, true ) end end ) serverSide ! Plane = {} addEvent("onPlayerTake",true) addEventHandler("onPlayerTake",getRootElement(), function( ) Plane[source] = createVehicle( 513 , 2070.1633300781 , -2493.3559570313 , 13.523823738098 ) if ( Plane[source] ) then warpPedIntoVehicle ( source,Plane[source] ) setCameraTarget( source , source ) end end ) addEvent("Done",true) addEventHandler("Done",getRootElement(), function( ) if ( Plane[source] ) then destroyElement(Plane[source]) givePlayerMoney(source,13000) outputChatBox ( "Misson Done And You Now Has Been Give 13000$", source, 255, 0, 0, true ) end end ) 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) function qqq(player) if ( source == Plane[player] ) then destroyElement(Plane[player]) triggerClientEvent(player,"Blow",player) end end addEventHandler("onVehicleExplode",getRootElement(),qqq) Link to comment
iPrestege Posted May 1, 2013 Share Posted May 1, 2013 Will i entered the marker and work's fine. Link to comment
SoMoRay Posted May 1, 2013 Author Share Posted May 1, 2013 Will i entered the marker and work's fine. and when leave plane it's work fine ? 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