Jump to content

Jacobob14

Members
  • Posts

    266
  • Joined

  • Last visited

Everything posted by Jacobob14

  1. works for me well and I published recently that had a problem with the script
  2. I give an example of an advance on my radar rotation local screenx, screeny = guiGetScreenSize( ); local posX = 30; local posY = 157; -- Make sure it's the right values local width = 135; local height = 135; -- local scale = 2.2; local texture = dxCreateTexture( 'files/sattelite.dds', 'dxt5', true, 'clamp' ); imageWidth, imageHeight = dxGetMaterialSize( texture ); showPlayerHudComponent( "radar", false ) addEventHandler("onClientRender",root, function( ) local px ,py, pz = getElementPosition( localPlayer ) local mapX = px / ( 6000 / imageWidth ) + ( imageWidth / 2 ) - ( width / scale / 2 ); local mapY = py / ( -6000 / imageHeight ) + ( imageHeight / 2 ) - ( height / scale / 2 ); local cx,cy,cz,tx,ty,tz = getCameraMatrix( ); local rotation = findRotation( cx,cy,tx,ty ); dxDrawImageSection( posX, screeny - posY, width, height, mapX, mapY, width / scale, height / scale, texture, rotation, 0, 0, tocolor( 255, 255, 255, 255 ), false ); dxDrawText("Latin Server", screeny - posY, width, height, mapX, mapY, width / scale, height / scale, texture, rotation, 0, 0, tocolor( 255, 255, 255, 255 ), tocolor(9, 70, 245, 255), 0.65, "bankgothic", "left", "top", false, false, true, false, false) ; -- You can use a rectangle --dxDrawRectangle( posX + width / 2, screeny - posY + height / 2, 5, 5, tocolor( 0, 0, 255, 255 ) ); -- Or dxDrawImage( posX + width / 2, screeny - posY + height / 2, 5, 5, "files/sattelite.dds" ); --[[for i, v in ipairs( getElementsByType('player') ) do --Don't care to this. if v ~= localPlayer then local scale = 256/(3000*2) local apx,apy,apz = getElementPosition(v) local point_xx = box_screen_x+apx*scale local point_yy = box_screen_y+apy*scale dxDrawImage(point_xx, point_yy, ppx, ppy,"files/sattelite.dds") end end]] end ) function findRotation( x1, y1, x2, y2 ) local t = -math.deg( math.atan2( x2 - x1, y2 - y1 ) ) if t < 0 then t = t + 360 end return t end
  3. Jacobob14

    help gui

    thanks finally works perfectly
  4. Jacobob14

    help gui

    still can not close: (
  5. Jacobob14

    help gui

    without error only when the panel is opened not close when I click the close button
  6. Jacobob14

    help gui

    because the panel does not close what is the problem: ( server auto1 = createVehicle ( 425, 2296.1000976563, 462.5, 12.699999809265 , 0, 0, 0 ) setVehicleDamageProof ( auto1, true ) auto2 = createVehicle ( 520, 2326.5083007813, 461.42266845703, 12.5, 0, 0, 0 ) setVehicleDamageProof ( auto2, true ) auto3 = createVehicle ( 411, 2390.6999511719, 447.39999389648, 11.39999961853, 340, 0, 90 ) setVehicleDamageProof ( auto3, true ) setVehicleColor ( auto3, 81, 84, 89 ) auto4 = createVehicle ( 411, 2390.5, 459.10000610352, 11.39999961853, 339.99938964844, 0, 90 ) setVehicleDamageProof ( auto4, true ) setVehicleColor ( auto4, 0, 0, 255 ) auto5 = createVehicle ( 451, 2390.6999511719, 470.29998779297, 10.961318969727, 339.99938964844, 0, 90 ) setVehicleDamageProof ( auto5, true ) setVehicleColor ( auto5, 63, 147, 12 ) auto6 = createVehicle ( 451, 2391.1000976563,483.29998779297, 10.961318969727, 339.99938964844, 0, 90 ) setVehicleDamageProof ( auto6, true ) setVehicleColor ( auto6, 251, 31, 6 ) auto7 = createVehicle ( 432, 2391.796875, 545.5048828125, 11, 0, 0, 180 ) setVehicleDamageProof ( auto7, true ) setVehicleColor ( auto7, 251, 31, 6 ) function panel ( player, seat, jacked ) if ( seat == 0 and source == auto or source == auto1 or source == auto2 or source == auto3 or source == auto4 or source == auto5 or source == auto6 or source == auto7 ) then -- Aca tenias que checkear si el asiento era "0", no si no era "0". local accountName = getAccountName ( getPlayerAccount ( player ) ) if ( not isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Consesionaria" ) ) ) then cancelEvent ( ) triggerClientEvent ( "panel", getRootElement() ) end end end addEventHandler ( "onVehicleStartEnter", root, panel ) client function draw() dxDrawRectangle(215, 144, 396, 385, tocolor(0, 0, 0, 140), false) dxDrawRectangle(215, 144, 396, 21, tocolor(0, 0, 0, 255), true) dxDrawLine(214, 143, 611, 143, tocolor(70, 70, 70, 255), 1, true) dxDrawLine(215, 529, 612, 529, tocolor(70, 70, 70, 255), 1, true) dxDrawLine(213, 143, 213, 530, tocolor(70, 70, 70, 255), 1, true) dxDrawLine(611, 144, 611, 531, tocolor(70, 70, 70, 255), 1, true) dxDrawLine(215, 165, 612, 165, tocolor(70, 70, 70, 255), 1, true) dxDrawText("Vehicle Shop", 296, 139, 686, 165, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "left", "top", false, false, true, false, false) dxDrawRectangle(228, 242, 365, 256, tocolor(255, 255, 255, 255), false) dxDrawLine(503, 180, 593, 180, tocolor(4, 25, 232, 254), 1, true) dxDrawLine(503, 222, 593, 222, tocolor(4, 25, 232, 254), 1, true) dxDrawLine(502, 180, 502, 223, tocolor(4, 25, 232, 254), 1, true) dxDrawLine(593, 180, 593, 223, tocolor(4, 25, 232, 254), 1, true) dxDrawText("Cerrar", 502, 190, 617, 218, tocolor(251, 251, 254, 254), 0.80, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Vehicle :", 225, 170, 333, 196, tocolor(251, 251, 254, 254), 0.70, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Latin Server", 218, 508, 412, 539, tocolor(5, 110, 239, 254), 0.80, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Vehiculo En Venta", 234, 249, 583, 282, tocolor(12, 27, 139, 254), 0.70, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Si Deseas Adquirir Este vehiculo ", 234, 300, 583, 333, tocolor(4, 3, 3, 254), 0.60, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Esta Disponible en nuestro Foro", 234, 338, 583, 371, tocolor(4, 3, 3, 254), 0.60, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("Informate de Todo lo necesario en :", 234, 371, 583, 404, tocolor(4, 3, 3, 254), 0.60, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("http://latinserver.nuevoforo.es/", 234, 414, 583, 447, tocolor(4, 3, 3, 254), 0.60, "bankgothic", "left", "top", false, false, true, false, false) dxDrawText("https://www.facebook.com/groups/187411881390218/", 238, 485, 587, 518, tocolor(2, 43, 99, 254), 0.40, "bankgothic", "left", "top", false, false, true, false, false) end function panel() cerrar = guiCreateButton(503, 182, 89, 40, "", false) guiSetAlpha(cerrar, 100) addEventHandler("onClientRender", root, draw) end addEvent("panel", true) addEventHandler("panel", getRootElement(), panel) function qpanel() if (guiGetVisible (cerrar) == true) then guiSetVisible(cerrar,false) removeEventHandler("onClientRender", root, draw) end end addEventHandler("onClientGUIClick", cerrar, qpanel)
  7. my problem is how he has to connect to the console
  8. recently entered one player in to my server with account Console and gave ban all staff as it did to enter the Account Console and how I can prevent it from happening again?
  9. Thanks works well but when I killed the nemesis boot error on the console http://prntscr.com/2xy2vd
  10. es posible que no puede matarse unos a otros
  11. as I can make 10 appear nemesis and not only one function BossNemesis ( thePlayer ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then local x, y, z = getElementPosition ( thePlayer ) nemesi4 = exports [ "slothBot" ]:spawnBot ( x+1,y+1,z+0.5, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) exports.extra_health:setElementExtraHealth ( nemesi4, 150 ) setElementModel ( nemesi4, 107 ) end end addCommandHandler ( "nemesis",BossNemesis ) addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function (killer) if (source == nemesi4) then givePlayerMoney(killer,math.random(1000,1000)) killerName = getPlayerName(killer) weapon = getPedWeapon(killer) wr, wg, wb = getPlayerNametagColor(killer) exports.killmessages:outputMessage ( {killerName,{"padding",width=3},{"icon",id=weapon or 0},{"padding",width=3},{"color",r=141,g=7,b=220},"Nemesis"},getRootElement(),wr,wg,wb ) exports.exp_system:addPlayerEXP ( killer, math.random(1, 200)) end end)
  12. si es en el hud yo lo tengo asi local r, g, b = getPlayerNametagColor (localPlayer) dxDrawText("Player: "..getPlayerName(localPlayer),sWidth-2,sHeight-115,sWidth-2,sHeight-48, tocolor(r, g, b), 0.5, "bankgothic","right","top",false,false,false,true)
  13. Jacobob14

    help radar

    how can I get the radar also rotate in 3d thus http://prntscr.com/2xusz5 local screenx, screeny = guiGetScreenSize( ); local posX = 30; local posY = 157; -- Make sure it's the right values local width = 135; local height = 135; -- local scale = 2.2; local texture = dxCreateTexture( 'files/sattelite.dds', 'dxt5', true, 'clamp' ); imageWidth, imageHeight = dxGetMaterialSize( texture ); showPlayerHudComponent( "radar", false ) addEventHandler("onClientRender",root, function( ) local px ,py, pz = getElementPosition( localPlayer ) local mapX = px / ( 6000 / imageWidth ) + ( imageWidth / 2 ) - ( width / scale / 2 ); local mapY = py / ( -6000 / imageHeight ) + ( imageHeight / 2 ) - ( height / scale / 2 ); local cx,cy,cz,tx,ty,tz = getCameraMatrix( ); local rotation = findRotation( cx,cy,tx,ty ); dxDrawImageSection( posX, screeny - posY, width, height, mapX, mapY, width / scale, height / scale, texture, rotation, 0, 0, tocolor( 255, 255, 255, 255 ), false ); -- You can use a rectangle --dxDrawRectangle( posX + width / 2, screeny - posY + height / 2, 5, 5, tocolor( 0, 0, 255, 255 ) ); -- Or dxDrawImage( posX + width / 2, screeny - posY + height / 2, 5, 5, "files/ten.dds" ); --[[for i, v in ipairs( getElementsByType('player') ) do --Don't care to this. if v ~= localPlayer then local scale = 256/(3000*2) local apx,apy,apz = getElementPosition(v) local point_xx = box_screen_x+apx*scale local point_yy = box_screen_y+apy*scale dxDrawImage(point_xx, point_yy, ppx, ppy,"files/arco.dds") end end]] end ) function findRotation( x1, y1, x2, y2 ) local t = -math.deg( math.atan2( x2 - x1, y2 - y1 ) ) if t < 0 then t = t + 360 end return t end
  14. as I can make that a number of zombies that appear to put in the command: ( function crearz (thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then x,y,z = getElementPosition(thePlayer) local crear = exports [ "zombies" ]:createZombie( x+1, y+1, z, 0) setElementData(crear,"jthead","adolf_hitler.png") setPedOnFire(crear,true) end end addCommandHandler("create",crearz)
  15. what is the problem function levelup() local x,y,z = getElementPosition(localplayer) local player = getLocalPlayer() local sound = playSound3D ( "levelup.ogg",x,y,z ) attachElements (sound, player) setElementHealth ( player, getElementHealth(player) + 100 ) end addEventHandler( "onPlayerLevelUP", getRootElement(), levelup )
  16. : o thanks solid Thank you! :D
  17. help how could make the área will blink every 2 seconds safecol = createColCuboid ( -2239.158203125, 1500.6708984375, 18.840867996216, 60, 60, 60 ) safeZoneRadar = createRadarArea ( -2239.158203125, 1500.6708984375, 350, 350, 0, 103, 0, 155 ) setElementData (safeZoneRadar, "zombieProof", true)
  18. local initPos = 1236.6999511719, 2108.8999023438, 8.6000003814697 local finaPos = 1236.6999511719, 2108.8999023438, 3.0999999046326 function createTheGate() gate = createObject ( 980, 1236.6999511719, 2108.8999023438, 8.6000003814697, 0, 0, 270 ) end addEventHandler ("onResourceStart", getRootElement, createTheGate) function moveTheGate () if ( getElementPosition (gate) == initPos ) then moveObject ( gate, 5000, finaPos ) outputChatBox ( "#ff0000 The gate is moving!", client ) else if ( getElementPosition (gate) == finaPos ) then moveObject ( gate, 5000, initPos) outputChatBox ( "#ff0000 The gate is moving!", client ) end end addCommandHandler ("gate", moveTheGate)
  19. Debe modificar las animaciones del archivo zombies_server.lua
  20. emm just want to know what function I can use to move the radar
  21. as I can make an image move in the direction that moves a player addEventHandler("onClientResourceStart", resourceRoot, function() end ) addEventHandler("onClientRender", root, function() dxDrawImage(32, 438, 153, 139, "radar.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) end )
×
×
  • Create New...