SoMoRay Posted April 30, 2013 Share Posted April 30, 2013 What wrong the debugscript says warpPedIntoVehicle( Plane ) is the wrong function() Plane = createVehicle( 513 , 2070.1633300781 , -2493.3559570313 , 13.523823738098 ) warpPedIntoVehicle( Plane ) setCameraTarget( source , source ) end) Link to comment
iPrestege Posted April 30, 2013 Share Posted April 30, 2013 thePed: The ped which you wish to force inside the vehicle theVehicle: The vehicle you wish to force the ped into You're code must be : warpPedIntoVehicle ( Ped , Plane ) Link to comment
SoMoRay Posted April 30, 2013 Author Share Posted April 30, 2013 thePed: The ped which you wish to force inside the vehicletheVehicle: The vehicle you wish to force the ped into You're code must be : warpPedIntoVehicle ( Ped , Plane ) still doesn't warp ped into plane Link to comment
iPrestege Posted April 30, 2013 Share Posted April 30, 2013 What is the ped? player or ped or or post the whole code . Link to comment
SoMoRay Posted April 30, 2013 Author Share Posted April 30, 2013 What is the ped? player or ped or or post the whole code . Client Side ! addEventHandler("onClientGUIClick",root, function() if ( source == Take_it ) then guiSetVisible(wnd,false) outputChatBox("Go To Red Flag Blip In Map !") 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(source,source) showCursor(false) end end) Server Side ! addEvent("onPlayerTake",true) addEventHandler("onPlayerTake",root, function() Plane = createVehicle( 513 , 2070.1633300781 , -2493.3559570313 , 13.523823738098 ) warpPedIntoVehicle ( Ped , Plane ) setCameraTarget( source , source ) end) Link to comment
iPrestege Posted April 30, 2013 Share Posted April 30, 2013 -- Client side -- addEventHandler("onClientGUIClick",root, function() if ( source == Take_it ) then guiSetVisible(wnd,false) showCursor(false) outputChatBox("Go To Red Flag Blip In Map !") 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 ) -- Server side -- addEvent("onPlayerTake",true) addEventHandler("onPlayerTake",root, function() Plane = createVehicle( 513 , 2070.1633300781 , -2493.3559570313 , 13.523823738098 ) warpPedIntoVehicle ( source,Plane ) setCameraTarget( source , source ) end ) Try it. Link to comment
SoMoRay Posted April 30, 2013 Author Share Posted April 30, 2013 -- Client side -- addEventHandler("onClientGUIClick",root, function() if ( source == Take_it ) then guiSetVisible(wnd,false) showCursor(false) outputChatBox("Go To Red Flag Blip In Map !") 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 ) -- Server side -- addEvent("onPlayerTake",true) addEventHandler("onPlayerTake",root, function() Plane = createVehicle( 513 , 2070.1633300781 , -2493.3559570313 , 13.523823738098 ) warpPedIntoVehicle ( source,Plane ) setCameraTarget( source , source ) end ) Try it. it's work but now I have proplem if I join marker and the window should open just for me but she isn't open just for me it's open for all players are on the server and when plane hit the marker for create anthore marker doesn't work I go in she with plane and she isn't this is my code Client Side ! marker = {} marker[1] = createMarker( 1958.2806396484, -2183.5830078125, 13.546875,"cylinder", 3, 255, 255, 0, 255 ) --- window marker blip = createBlip( 1958.2806396484, -2183.5830078125, 13.546875, 5, 3, 255, 0, 0, 255 ) GUIEditor = { memo = {} } 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 ( getElementType(element) == "player" ) then if ( source == marker[1] ) then guiSetVisible(wnd,true) showCursor(true) end end end) ------------------------------------ take it addEventHandler("onClientGUIClick",root, function() if ( source == Exit ) then guiSetVisible(wnd,false) setElementPosition( source, 1957.9681396484, -2179.650390625, 13.546875 ) setCameraTarget(source,source) showCursor(false) end end) ------------------------------- take it addEventHandler("onClientGUIClick",root, function() if ( source == Take_it ) then guiSetVisible(wnd,false) showCursor(false) outputChatBox("Go To Red Flag Blip In Map !") 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 ) ---------------------------- addEventHandler("onClientMarkerHit",getRootElement(), function(element) if ( getElementType(element) == "vehicle" ) then if ( source == marker[2] ) then destroyElement(marker[2]) destroyElement( blip1 ) outputChatBox("Go To Red Flag Blip In Map !") 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 ) end end end) addEventHandler("onClientMarkerHit",getRootElement(), function(element) if ( getElementType(element) == "vehicle" ) then if ( source == marker[3] ) then destroyElement(marker[3]) destroyElement( blip2 ) outputChatBox("Go To Red Flag Blip In Map !") 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 ) end end end) addEventHandler("onClientMarkerHit",getRootElement(), function(element) if ( getElementType(element) == "vehicle" ) then if ( source == marker[4] ) then destroyElement(marker[4]) destroyElement( blip3 ) triggerServerEvent("Done",getLocalPlayer()) end end end) Server Side ! addEvent("onPlayerTake",true) addEventHandler("onPlayerTake",root, function() Plane = createVehicle( 513 , 2070.1633300781 , -2493.3559570313 , 13.523823738098 ) warpPedIntoVehicle ( source,Plane ) setCameraTarget( source , source ) end ) ---------- finish addEvent("Done",true) addEventHandler("Done",root, function() destroyElement(Plane) givePlayerMoney(source,13000) outputChatBox ( "Misson Done And You Now Has Been Give 13000$", source, 255, 0, 0, true ) end) Link to comment
iPrestege Posted April 30, 2013 Share Posted April 30, 2013 Try this not tested : client : marker = {} GUIEditor = { memo = {} } marker[1] = createMarker( 1958.2806396484, -2183.5830078125, 13.546875,"cylinder", 3, 255, 255, 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 ( getElementType(element) == "player" ) 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 !") 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 !") 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 !") 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 ) server : addEvent("onPlayerTake",true) addEventHandler("onPlayerTake",getRootElement(), function( ) Plane = createVehicle( 513 , 2070.1633300781 , -2493.3559570313 , 13.523823738098 ) warpPedIntoVehicle ( source,Plane ) setCameraTarget( source , source ) end ) addEvent("Done",true) addEventHandler("Done",getRootElement(), function( ) destroyElement(Plane) givePlayerMoney(source,13000) outputChatBox ( "Misson Done And You Now Has Been Give 13000$", source, 255, 0, 0, true ) end ) Link to comment
SoMoRay Posted April 30, 2013 Author Share Posted April 30, 2013 Try this not tested :client : marker = {} GUIEditor = { memo = {} } marker[1] = createMarker( 1958.2806396484, -2183.5830078125, 13.546875,"cylinder", 3, 255, 255, 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 ( getElementType(element) == "player" ) 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 !") 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 !") 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 !") 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 ) server : addEvent("onPlayerTake",true) addEventHandler("onPlayerTake",getRootElement(), function( ) Plane = createVehicle( 513 , 2070.1633300781 , -2493.3559570313 , 13.523823738098 ) warpPedIntoVehicle ( source,Plane ) setCameraTarget( source , source ) end ) addEvent("Done",true) addEventHandler("Done",getRootElement(), function( ) destroyElement(Plane) givePlayerMoney(source,13000) outputChatBox ( "Misson Done And You Now Has Been Give 13000$", source, 255, 0, 0, true ) end ) still open for all when I join marker and still if I go to marker[2] with plane doesn't destroy and create the anthore marker[3] Link to comment
iPrestege Posted April 30, 2013 Share Posted April 30, 2013 still if I go to marker[2] with plane doesn't destroy and create the anthore marker[3] Destroy what? try this : marker = {} GUIEditor = { memo = {} } marker[1] = createMarker( 1958.2806396484, -2183.5830078125, 13.546875,"cylinder", 3, 255, 255, 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 ( getElementType(element) == "player" ) then if ( source == marker[1] ) then if ( element == localPlager ) then guiSetVisible(wnd,true) showCursor(true) elseif ( source == marker[2] ) then destroyElement(marker[2]) destroyElement( blip1 ) outputChatBox("Go To Red Flag Blip In Map !") 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 !") 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 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 !") 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 ) Link to comment
SoMoRay Posted April 30, 2013 Author Share Posted April 30, 2013 still if I go to marker[2] with plane doesn't destroy and create the anthore marker[3]Destroy what? try this : marker = {} GUIEditor = { memo = {} } marker[1] = createMarker( 1958.2806396484, -2183.5830078125, 13.546875,"cylinder", 3, 255, 255, 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 ( getElementType(element) == "player" ) then if ( source == marker[1] ) then if ( element == localPlager ) then guiSetVisible(wnd,true) showCursor(true) elseif ( source == marker[2] ) then destroyElement(marker[2]) destroyElement( blip1 ) outputChatBox("Go To Red Flag Blip In Map !") 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 !") 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 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 !") 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 ) now when I go inside marker[1] doesn't open window misson -__-" Link to comment
iPrestege Posted April 30, 2013 Share Posted April 30, 2013 marker = {} GUIEditor = { memo = {} } marker[1] = createMarker( 1958.2806396484, -2183.5830078125, 13.546875,"cylinder", 3, 255, 255, 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 ( getElementType(element) == "player" ) then if ( source == marker[1] ) then if ( element == localPlayer ) then guiSetVisible(wnd,true) showCursor(true) elseif ( source == marker[2] ) then destroyElement(marker[2]) destroyElement( blip1 ) outputChatBox("Go To Red Flag Blip In Map !") 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 !") 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 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 !") 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 ) Type mistake localPlager > localPlayer Try this ! Link to comment
SoMoRay Posted April 30, 2013 Author Share Posted April 30, 2013 marker = {} GUIEditor = { memo = {} } marker[1] = createMarker( 1958.2806396484, -2183.5830078125, 13.546875,"cylinder", 3, 255, 255, 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 ( getElementType(element) == "player" ) then if ( source == marker[1] ) then if ( element == localPlayer ) then guiSetVisible(wnd,true) showCursor(true) elseif ( source == marker[2] ) then destroyElement(marker[2]) destroyElement( blip1 ) outputChatBox("Go To Red Flag Blip In Map !") 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 !") 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 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 !") 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 ) Type mistake localPlager > localPlayer Try this ! all think now is work just this ~ -_-" she is when I go inside she should destroy and create the marker next his name marker[3] but she isn't destroy and ................................................... Link to comment
iPrestege Posted April 30, 2013 Share Posted April 30, 2013 I Can't understand you you're English is so bad sorry but where's the problem now? Which line? Link to comment
SoMoRay Posted April 30, 2013 Author Share Posted April 30, 2013 I Can't understand you you're English is so bad sorry but where's the problem now? Which line? Private Chat Link to comment
iPrestege Posted April 30, 2013 Share Posted April 30, 2013 Any errors debugscript 3? Link to comment
SoMoRay Posted April 30, 2013 Author Share Posted April 30, 2013 Any errors debugscript 3? no . Link to comment
iPrestege Posted April 30, 2013 Share Posted April 30, 2013 You want to destroy the marker or the vehicle and please post the line you have the problem in it . Link to comment
SoMoRay Posted April 30, 2013 Author Share Posted April 30, 2013 You want to destroy the marker or the vehicle and please post the line you have the problem in it . destroy marker and line 31 is proplem Edit : when player Attached To marker with plane destroy marker and create the next marker Link to comment
iPrestege Posted April 30, 2013 Share Posted April 30, 2013 There's no variable with "marker[2]" To destroy it! Link to comment
PaiN^ Posted April 30, 2013 Share Posted April 30, 2013 Try this : marker = {} GUIEditor = { memo = {} } marker[1] = createMarker( 1958.2806396484, -2183.5830078125, 13.546875,"cylinder", 3, 255, 255, 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 !") 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 !") 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 !") 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 ) There's no variable with "marker[2]" To destroy it! marker[2] is created with onClientGUIClick event . Link to comment
iPrestege Posted April 30, 2013 Share Posted April 30, 2013 Oh i see i know what's the problem now : Try it server side : 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 ) Link to comment
SoMoRay Posted April 30, 2013 Author Share Posted April 30, 2013 thank you pain + Mr.Pres[T]ege but now I want when exit plane the misson cancel how it wil be with wiki function? Link to comment
iPrestege Posted April 30, 2013 Share Posted April 30, 2013 Use : setElementData getElementData And what you mean by exit when the player wasted or ? Link to comment
PaiN^ Posted April 30, 2013 Share Posted April 30, 2013 'onVehicleExit' or 'onClientVehicleExit' And what Mr.Pres[T]ege gave you . 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