Jump to content

Search the Community

Showing results for tags 'problem work'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 1 result

  1. Hi everyone, I am doing a trucker job, which I have a problem in the panel, when I approach the market I leave the panel but not the cursor to accept the job would help me to see what the error ------------------- This is my code --- client.Lua marker = createMarker( 887.65673828125, -1209.0100097656, 15.9765625,"cylinder", 2, 248, 248, 14, 100) blip = createBlipAttachedTo ( marker, 56, 2, 255, 0, 0, 255, 0, 200 ) function abrir (hitPlayer) if hitPlayer == localPlayer then showCursor(false) ventanatrabajar = guiCreateWindow(445, 237, 530, 416, "Hola Bienvenido Al Job De Camionero De |ZA|~> Zombie Attack", false) guiWindowSetSizable(ventanatrabajar, false) guiSetVisible(ventanatrabajar,true) showCursor(false) guiSetAlpha(ventanatrabajar, 1) memopercha = guiCreateMemo(9, 22, 301, 226, "Este Trabajo Consiste en darle a trabajar o a la X para salir Y Vas al marker q se spawmeara y cojes el auto y vas donde se te indica :D\n\nZombies Attack New Actualizacion\n\n\n\nServer Prahh \n\n\n|ZA| Te Saluda", false, ventanatrabajar) GridList = guiCreateGridList(315, 24, 205, 224, false, ventanatrabajar) guiGridListAddColumn(GridList, "Skin", 0.9) guiGridListAddRow(GridList) guiGridListSetItemText(GridList, 0, 1, "Libre", false, false) botonaceptar = guiCreateButton(18, 283, 216, 85, "Trabajar", false, ventanatrabajar) guiSetFont(botonaceptar, "sa-header") guiSetProperty(botonaceptar, "NormalTextColour", "FF47FE00") botoncancelar = guiCreateButton(285, 283, 216, 85, "X", false, ventanatrabajar) guiSetFont(botoncancelar, "sa-header") guiSetProperty(botoncancelar, "NormalTextColour", "FFFD0000") showCursor(false) proximamente = guiCreateButton(183, 373, 152, 33, "Actualizando Proximamente", false, ventanatrabajar) guiSetFont(proximamente, "default-bold-small") guiSetProperty(proximamente, "NormalTextColour", "FFAAAAAA") labelpercha = guiCreateLabel(423, 253, 97, 20, "BY : Akranes", false, ventanatrabajar) addEventHandler("onClientGUIClick",botonaceptar,tomarjob,false) addEventHandler("onClientGUIClick",botoncancelar,function() guiSetVisible(ventanatrabajar,false) showCursor(false) showCursor(false) end,false) end end addEventHandler("onClientMarkerHit",marker,abrir) function tomarjob () guiSetVisible(ventanatrabajar,false) showCursor(false) setElementData(localPlayer,"Ocupacion","Camionero") triggerServerEvent("setteam",localPlayer) local markervehiculos = createMarker( 892.03631591797, -1221.4144287109, 15.9765625,"cylinder", 2, 0, 248, 0, 100) addEventHandler("onClientMarkerHit",markervehiculos,elegirvehiculo) end function elegirvehiculo (hitPlayer) if hitPlayer == localPlayer and (getElementData(hitPlayer,"Ocupacion") == "Camionero") then if isPedInVehicle(hitPlayer) == false then if guiGetVisible(ventanavehiculo) == false then ventanavehiculo = guiCreateWindow(521, 210, 353, 333, "Elegir vehiculo", false) guiWindowSetSizable(ventanavehiculo, false) gridlistelegir = guiCreateGridList(80, 43, 193, 179, false, ventanavehiculo) guiGridListAddColumn(gridlistelegir, "Vehiculo:", 0.9) for i = 1, 3 do guiGridListAddRow(gridlistelegir) end guiGridListSetItemText(gridlistelegir, 0, 1, "Tanker", false, false) guiGridListSetItemText(gridlistelegir, 1, 1, "Roadtrain", false, false) guiGridListSetItemText(gridlistelegir, 2, 1, "Linerunner", false, false) aceptarvehiculo = guiCreateButton(29, 261, 121, 45, "Aceptar", false, ventanavehiculo) cancelarvehiculo = guiCreateButton(195, 261, 121, 45, "Cancelar", false, ventanavehiculo) guiSetVisible(ventanavehiculo,true) showCursor(true) addEventHandler("onClientGUIClick",aceptarvehiculo,function () camion = guiGridListGetItemText ( gridlistelegir, guiGridListGetSelectedItem ( gridlistelegir ), 1 ) if camion == "Tanker" then triggerServerEvent("creartanker",localPlayer) guiSetVisible(ventanavehiculo,false) showCursor(false) llegadamarker1 =createMarker(-75.295272827148, -1124.0804443359, 1.078125,"checkpoint", 4.0, 0, 0, 255, 255 ) blipllegada1 = createBlipAttachedTo(llegadamarker1,51) setElementData(localPlayer,"misioncamionero",1) addEventHandler("onClientMarkerHit",llegadamarker1,llegada1) outputChatBox("Ve hasta el icono de camion marcado en el mapa!",0,250,0) addEventHandler("onClientRender",getRootElement(),rendercamionero) elseif camion == "Roadtrain" then triggerServerEvent("crearroad",localPlayer) guiSetVisible(ventanavehiculo,false) showCursor(false) llegadamarker1 =createMarker(-75.295272827148, -1124.0804443359, 1.078125,"checkpoint", 4.0, 0, 0, 255, 255 ) blipllegada1 = createBlipAttachedTo(llegadamarker1,51) setElementData(localPlayer,"misioncamionero",1) addEventHandler("onClientMarkerHit",llegadamarker1,llegada1) outputChatBox("Ve hasta el icono de camion marcado en el mapa!",0,250,0) addEventHandler("onClientRender",getRootElement(),rendercamionero) elseif camion == "Linerunner" then triggerServerEvent("crearline",localPlayer) guiSetVisible(ventanavehiculo,false) showCursor(false) llegadamarker1 =createMarker(-75.295272827148, -1124.0804443359, 1.078125,"checkpoint", 4.0, 0, 0, 255, 255 ) blipllegada1 =createBlipAttachedTo(llegadamarker1,51) setElementData(localPlayer,"misioncamionero",1) addEventHandler("onClientMarkerHit",llegadamarker1,llegada1) outputChatBox("Ve hasta el icono de camion marcado en el mapa!",0,250,0) addEventHandler("onClientRender",getRootElement(),rendercamionero) end end, false) addEventHandler("onClientGUIClick",cancelarvehiculo,function () guiSetVisible(ventanavehiculo,false) showCursor(false) end,false) end end end end function llegada1 (hitPlayer) if hitPlayer == localPlayer then llegaradestino() destroyElement(llegadamarker1) destroyElement(blipllegada1) llegadamarker2= createMarker( -1033.4045410156, -612.54766845703, 32.0078125,"checkpoint", 4.0, 0, 0, 255, 255 ) blipllegada2 =createBlipAttachedTo(llegadamarker2,51) addEventHandler("onClientMarkerHit",llegadamarker2,llegada2) end end function llegada2 (hitPlayer) if hitPlayer == localPlayer then llegaradestino() destroyElement(llegadamarker2) destroyElement(blipllegada2) llegadamarker3= createMarker( -2107.03515625, 207.4593963623, 35.245025634766,"checkpoint", 4.0, 0, 0, 255, 255 ) blipllegada3 =createBlipAttachedTo(llegadamarker3,51) addEventHandler("onClientMarkerHit",llegadamarker3,llegada3) end end function llegada3 (hitPlayer) if hitPlayer == localPlayer then llegaradestino() destroyElement(llegadamarker3) destroyElement(blipllegada3) llegadamarker4= createMarker( -1708.77734375, 952.78442382813, 24.7421875,"checkpoint", 4.0, 0, 0, 255, 255 ) blipllegada4 =createBlipAttachedTo(llegadamarker4,51) addEventHandler("onClientMarkerHit",llegadamarker4,llegada4) end end function llegada4 (hitPlayer) if hitPlayer == localPlayer then llegaradestino() destroyElement(llegadamarker4) destroyElement(blipllegada4) llegadamarker5= createMarker( -2260.9384765625, 2327.1472167969, 4.8125,"checkpoint", 4.0, 0, 0, 255, 255 ) blipllegada5 =createBlipAttachedTo(llegadamarker5,51) addEventHandler("onClientMarkerHit",llegadamarker5,llegada5) end end function llegada5 (hitPlayer) if hitPlayer == localPlayer then llegaradestino() destroyElement(llegadamarker5) destroyElement(blipllegada5) llegadamarker6= createMarker( -64.618476867676, 1200.3625488281, 18.646831512451,"checkpoint", 4.0, 0, 0, 255, 255 ) blipllegada6 =createBlipAttachedTo(llegadamarker6,51) addEventHandler("onClientMarkerHit",llegadamarker6,llegada6) end end function llegada6 (hitPlayer) if hitPlayer == localPlayer then llegaradestino() destroyElement(llegadamarker6) destroyElement(blipllegada6) llegadamarker7= createMarker( 281.90103149414, -214.63499450684, 1.4296875,"checkpoint", 4.0, 0, 0, 255, 255 ) blipllegada7 =createBlipAttachedTo(llegadamarker7,51) addEventHandler("onClientMarkerHit",llegadamarker7,llegada7) end end function llegada7 (hitPlayer) if hitPlayer == localPlayer then llegaradestino() destroyElement(llegadamarker7) destroyElement(blipllegada7) llegadamarker1 =createMarker(-75.295272827148, -1124.0804443359, 1.078125,"checkpoint", 4.0, 0, 0, 255, 255 ) blipllegada1 =createBlipAttachedTo(llegadamarker1,51) addEventHandler("onClientMarkerHit",llegadamarker1,llegada1) outputChatBox("Completaste todo el recorrido, se te dio un plus de $20.000") triggerServerEvent("dardinero1",localPlayer) end end function llegaradestino () suerte = math.random(1,4) nivelcamionero = getElementData(localPlayer,"nivelcamionero") if suerte == 4 then plata = tonumber(5280 + tonumber(nivelcamionero)*10) triggerServerEvent("dardinero",localPlayer,plata) elseif suerte == 3 then plata = tonumber(4890 + tonumber(nivelcamionero)*10) triggerServerEvent("dardinero",localPlayer,plata) elseif suerte == 2 then plata = tonumber(5355 + tonumber(nivelcamionero)*10) triggerServerEvent("dardinero",localPlayer,plata) elseif suerte == 1 then plata = tonumber(5120 + tonumber(nivelcamionero)*10) triggerServerEvent("dardinero",localPlayer,plata) end triggerServerEvent("darnivel",localPlayer) outputChatBox("Entrega completada!, te pagaron $"..tostring(plata),0,250,0) end function cancelarMision() setElementData(source,"misioncamionero",0) removeEventHandler("onClientRender",getRootElement(),rendercamionero) if isElement(llegadamarker1) then destroyElement(llegadamarker1) destroyElement(blipllegada1) elseif isElement(llegadamarker2) then destroyElement(llegadamarker2) destroyElement(blipllegada2) elseif isElement(llegadamarker3) then destroyElement(llegadamarker3) destroyElement(blipllegada3) elseif isElement(llegadamarker4) then destroyElement(llegadamarker4) destroyElement(blipllegada4) elseif isElement(llegadamarker5) then destroyElement(llegadamarker5) destroyElement(blipllegada5) elseif isElement(llegadamarker6) then destroyElement(llegadamarker6) destroyElement(blipllegada6) elseif isElement(llegadamarker7) then destroyElement(llegadamarker7) destroyElement(blipllegada7) end end addEvent("cancel",true) addEventHandler("cancel",root,cancelarMision) function rendercamionero() if getElementData(localPlayer,"misioncamionero") == 1 then x1,y1 = getElementPosition(localPlayer) dxDrawText("|Trabajo de camionero|", 305, 682, 565, 719, tocolor(235, 250, 4, 255), 2.00, "default", "left", "top", false, false, false, false, false) if (isElement(llegadamarker1)) then local distancia = getDistanceBetweenPoints2D ( x1, y1, -75.295272827148, -1124.0804443359 ) dxDrawText("|Distancia:"..tostring(math.floor( distancia / 1)).." MTS", 565, 682, 825, 719, tocolor(235, 250, 4, 255), 2.00, "default", "left", "top", false, false, false, false, false) elseif (isElement(llegadamarker2)) then local x2,y2 = getElementPosition(llegadamarker2) local distancia = getDistanceBetweenPoints2D ( x1, y1, x2,y2) dxDrawText("|Distancia:"..tostring(math.floor( distancia / 1)).." MTS", 565, 682, 825, 719, tocolor(235, 250, 4, 255), 2.00, "default", "left", "top", false, false, false, false, false) elseif (isElement(llegadamarker3)) then local x2,y2 = getElementPosition(llegadamarker3) local distancia = getDistanceBetweenPoints2D ( x1, y1, x2,y2 ) dxDrawText("|Distancia:"..tostring(math.floor( distancia / 1)).." MTS", 565, 682, 825, 719, tocolor(235, 250, 4, 255), 2.00, "default", "left", "top", false, false, false, false, false) elseif (isElement(llegadamarker4)) then local x2,y2 = getElementPosition(llegadamarker4) local distancia = getDistanceBetweenPoints2D ( x1, y1, x2,y2 ) dxDrawText("|Distancia:"..tostring(math.floor( distancia / 1)).." MTS", 565, 682, 825, 719, tocolor(235, 250, 4, 255), 2.00, "default", "left", "top", false, false, false, false, false) elseif (isElement(llegadamarker5)) then local x2,y2 = getElementPosition(llegadamarker5) local distancia = getDistanceBetweenPoints2D ( x1, y1, x2,y2 ) dxDrawText("|Distancia:"..tostring(math.floor( distancia / 1)).." MTS", 565, 682, 825, 719, tocolor(235, 250, 4, 255), 2.00, "default", "left", "top", false, false, false, false, false) elseif (isElement(llegadamarker6)) then local x2,y2 = getElementPosition(llegadamarker6) local distancia = getDistanceBetweenPoints2D ( x1, y1, x2,y2 ) dxDrawText("|Distancia:"..tostring(math.floor( distancia / 1)).." MTS", 565, 682, 825, 719, tocolor(235, 250, 4, 255), 2.00, "default", "left", "top", false, false, false, false, false) elseif (isElement(llegadamarker7)) then local x2,y2 = getElementPosition(llegadamarker7) local distancia = getDistanceBetweenPoints2D ( x1, y1, x2,y2 ) dxDrawText("|Distancia:"..tostring(math.floor( distancia / 1)).." MTS", 565, 682, 825, 719, tocolor(235, 250, 4, 255), 2.00, "default", "left", "top", false, false, false, false, false) end dxDrawText("|Nivel:"..tostring(getElementData(localPlayer,"nivelcamionero")), 825, 682, 1085, 719, tocolor(235, 250, 4, 255), 2.00, "default", "left", "top", false, false, false, false, false) end end fileDelete("c.lua")
×
×
  • Create New...