Search the Community

Showing results for tags 'help'.



More search options

  • 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
  • Archive
  • Private Bugtracker

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Gang


Location


Occupation


Interests

Found 600 results

  1. (PT) -tem como eu colocar bots em uma base, e configura-los para atacar qualquer player que se aproximar ? (ENG) -how do I put bots on a base, and configure them to attack any player that approaches?
  2. How do I create a script that allows players to choose a team and start with Specific Skins and Spawn on the specific base of the team? If anyone can help me, thank you very much.
  3. someone knows how I can achieve what is shown in the following images?
  4. [2018-01-12 14:55:12] ERROR: Could not load /home/gameservers/mta/turbo1/x64/./dbconmy.so - /home/gameservers/mta/turbo1/x64/./dbconmy.so: symbol __cxa_pure_virtual, version libmysqlclient_16 not defined in file libmysqlclient.so.16 with link time reference[2018-01-12 14:55:12] ERROR: san_mysql/server.lua:19: dbConnect failed; Could not connect [2018-01-12 14:55:12] INFO: [mysql]: Sikertelen MYSQL csatlakozás! please help me, how to fix this?
  5. This is the code: addEvent ( "aPlayer", true ) addEventHandler ( "aPlayer", _root, function ( player, action, data, additional, additional2, kickedname ) if checkClient( "command."..action, source, 'aPlayer', action ) then return end if not isElement( player ) then return -- Ignore if player is no longer valid end if ( hasObjectPermissionTo ( source, "command."..action ) ) then local admin = source local mdata = "" local more = "" if ( action == "kick" ) then local reason = data or "" mdata = reason~="" and ( "(" .. reason .. ")" ) or "" setTimer ( kickPlayer, 100, 1, player, source, reason ) exports.ig_kickban:showBoxS (root ,"Kirúgás", player.." kirúgta "..source.." nevű játékost", "kick") the exports.ig_ki...etc line does not working.. why? i get this error: "Attempt to concatenate global source (a userdata value)"
  6. I tried triggering, but does not working :c How to get my account name in client side?
  7. I have lag in foggy weather and i want to completely remove fog from my game. I play on mta pubg server and game lags whenever I get fog weather. I have replaced the models of smoke with empty png files and the smoke and couds vanished , but lag is still there. I want to remove fog completely. Please help.
  8. what is the commands to create a video intro for server ? and how to create automated video stop timer ? addEventHandler("onClientResourceStart",resourceRoot, function () ? = ?("video.mp4",true) end )
  9. this is the code: and the problem: if i'm far away then the dx elements will be bigger, and when i'm closer.. how to fix this?
  10. I have this music script but it does not destroy the music when the vehicle is destroyed and how can I solve it? client function centerWindow (center_window) local screenW, screenH = guiGetScreenSize() local windowW, windowH = guiGetSize(center_window, false) local x, y = (screenW - windowW) /2,(screenH - windowH) /2 guiSetPosition(center_window, x, y, false) end GUIEditor = { tab = {}, label = {}, tabpanel = {}, edit = {}, button = {}, window = {}, scrollbar = {}, radiobutton = {} } GUIEditor.window[1] = guiCreateWindow(500, 187, 378, 280, "Radio Vehicular", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.tabpanel[1] = guiCreateTabPanel(9, 22, 358, 227, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Radio", GUIEditor.tabpanel[1]) GUIEditor.label[1] = guiCreateLabel(10, 10, 178, 16, "Ingresa una url:", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") GUIEditor.edit[1] = guiCreateEdit(10, 31, 199, 26, "", false, GUIEditor.tab[1]) GUIEditor.radiobutton[1] = guiCreateRadioButton(20, 67, 18, 15, "", false, GUIEditor.tab[1]) GUIEditor.radiobutton[2] = guiCreateRadioButton(112, 69, 18, 15, "", false, GUIEditor.tab[1]) GUIEditor.label[2] = guiCreateLabel(44, 67, 60, 17, "Radio/Web", false, GUIEditor.tab[1]) GUIEditor.label[3] = guiCreateLabel(133, 67, 200, 17, "Youtube", false, GUIEditor.tab[1]) GUIEditor.button[1] = guiCreateButton(13, 97, 91, 28, "Reproducir", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.scrollbar[1] = guiCreateScrollBar(20, 161, 239, 22, true, false, GUIEditor.tab[1]) guiScrollBarSetScrollPosition(GUIEditor.scrollbar[1], 100.0) GUIEditor.label[4] = guiCreateLabel(10, 135, 178, 16, "Volumen:", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[4], "default-bold-small") porcientomusica = guiCreateLabel(67, 135, 86, 17, "0%", false, GUIEditor.tab[1]) GUIEditor.button[2] = guiCreateButton(114, 97, 91, 28, "Detener", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") GUIEditor.tab[2] = guiCreateTab("Mis links", GUIEditor.tabpanel[1]) GUIEditor.label[5] = guiCreateLabel(10, 10, 138, 15, "Ingresa el url a guardar:", false, GUIEditor.tab[2]) guiSetFont(GUIEditor.label[5], "default-bold-small") GUIEditor.edit[2] = guiCreateEdit(10, 31, 199, 26, "", false, GUIEditor.tab[2]) GUIEditor.button[3] = guiCreateButton(145, 67, 74, 28, "Guardar", false, GUIEditor.tab[2]) guiSetFont(GUIEditor.button[3], "default-bold-small") guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA") GUIEditor.button[4] = guiCreateButton(10, 67, 125, 28, "Ver links guardados", false, GUIEditor.tab[2]) guiSetFont(GUIEditor.button[4], "default-bold-small") guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA") closebutton = guiCreateButton(307, 249, 60, 24, "Cerrar", false, GUIEditor.window[1]) guiSetFont(closebutton, "default-bold-small") guiSetProperty(closebutton, "NormalTextColour", "FFAAAAAA") guiSetVisible( GUIEditor.window[1], false ) centerWindow ( GUIEditor.window[1] ) myLinksGUI = guiCreateWindow(378, 133, 503, 292, "Mis links", false) guiWindowSetSizable(myLinksGUI, false) mylinksGridlist = guiCreateGridList(9, 26, 485, 218, false, myLinksGUI) a = guiGridListAddColumn(mylinksGridlist, "Url", 0.5) b = guiGridListAddColumn(mylinksGridlist, "Fecha", 0.5) copyurlbutton = guiCreateButton(19, 254, 86, 29, "Copiar url", false, myLinksGUI) guiSetFont(copyurlbutton, "default-bold-small") guiSetProperty(copyurlbutton, "NormalTextColour", "FFAAAAAA") deleteurlbutton = guiCreateButton(115, 254, 86, 29, "Eliminar url", false, myLinksGUI) guiSetFont(deleteurlbutton, "default-bold-small") guiSetProperty(deleteurlbutton, "NormalTextColour", "FFAAAAAA") closeMyLinksGUI = guiCreateButton(211, 254, 86, 29, "Cerrar", false, myLinksGUI) guiSetFont(closeMyLinksGUI, "default-bold-small") guiSetProperty(closeMyLinksGUI, "NormalTextColour", "FFAAAAAA") guiSetVisible( myLinksGUI, false ) centerWindow ( myLinksGUI ) --guiSetEnabled( GUIEditor.radiobutton[2], false ) local radios = { } function openPanel( ) local veh = getPedOccupiedVehicle( getLocalPlayer( ) ) if isPedInVehicle( getLocalPlayer( ) ) and getVehicleController( veh ) == getLocalPlayer( ) then openMain( ) end end bindKey( "F5", "down", openPanel ) addCommandHandler( "radio", openPanel ) function openMain( ) if guiGetVisible( GUIEditor.window[1] ) == false then guiSetVisible( GUIEditor.window[1], true ) showCursor( true ) guiSetText( porcientomusica, tostring( guiScrollBarGetScrollPosition ( GUIEditor.scrollbar[1] ) ).."%") else guiSetVisible( GUIEditor.window[1], false ) showCursor( false ) end end function clicksBotones( ) if source == GUIEditor.button[1] then if guiRadioButtonGetSelected( GUIEditor.radiobutton[1] ) == true or guiRadioButtonGetSelected( GUIEditor.radiobutton[2] ) == true then local veh = getPedOccupiedVehicle( getLocalPlayer( ) ) if getVehicleController( veh ) == getLocalPlayer( ) then local editT = guiGetText( GUIEditor.edit[1] ) if string.len( editT ) > 5 then guiSetVisible( GUIEditor.window[1], false ) showCursor( false ) triggerServerEvent ( "reproducirLink", getLocalPlayer( ), editT, veh, ( ( guiScrollBarGetScrollPosition ( GUIEditor.scrollbar[1] ) * 1.0 ) / 100 ), tipoRepro( ) ) else outputChatBox( "Link no valido!", 255, 255, 255, true ) end else outputChatBox( "Solo el conductor puede reproducir la radio!", 255, 255, 255, true ) end else outputChatBox( "Selecciona un tipo de url!", 255, 255, 255, true ) end elseif source == GUIEditor.button[2] then local veh = getPedOccupiedVehicle( getLocalPlayer( ) ) if getVehicleController( veh ) == getLocalPlayer( ) then triggerServerEvent ( "detenerRepro", getLocalPlayer( ), veh ) else outputChatBox( "Solo el conductor puede reproducir la radio!", 255, 255, 255, true ) end elseif source == closebutton then guiSetVisible( GUIEditor.window[1], false ) showCursor( false ) elseif source == GUIEditor.button[3] then local editT = guiGetText( GUIEditor.edit[2] ) if string.len( editT ) > 5 then triggerServerEvent ( "saveALink", getLocalPlayer( ), editT ) guiSetText( GUIEditor.edit[2], "" ) else outputChatBox( "Link no valido!", 255, 255, 255, true ) end elseif source == GUIEditor.button[4] then guiSetVisible( GUIEditor.window[1], false ) guiSetVisible( myLinksGUI, true ) guiGridListClear( mylinksGridlist ) triggerServerEvent ( "obtenerMisLnks", getLocalPlayer( ) ) elseif source == closeMyLinksGUI then guiSetVisible( GUIEditor.window[1], true ) guiSetVisible( myLinksGUI, false ) elseif source == copyurlbutton then local row, col = guiGridListGetSelectedItem( mylinksGridlist ) if row == -1 or col == -1 then outputChatBox( "Selecciona un Url!", 255, 255, 255, true ) return end local link = guiGridListGetItemText( mylinksGridlist, row, a ) setClipboard( link ) outputChatBox( "Url copiado al portapapeles!", 255, 255, 255, true ) elseif source == deleteurlbutton then local row, col = guiGridListGetSelectedItem( mylinksGridlist ) if row == -1 or col == -1 then outputChatBox( "Selecciona un Url!", 255, 255, 255, true ) return end local link = guiGridListGetItemText( mylinksGridlist, row, a ) triggerServerEvent ( "deleteALink", getLocalPlayer( ), link ) setTimer( function( ) guiGridListClear ( mylinksGridlist ) triggerServerEvent ( "obtenerMisLnks", getLocalPlayer( ) ) end , 250, 1 ) end end addEventHandler( "onClientGUIClick", getRootElement( ), clicksBotones ) function tipoRepro( ) local tipo if guiRadioButtonGetSelected( GUIEditor.radiobutton[1] ) == true then tipo = "radio" elseif guiRadioButtonGetSelected( GUIEditor.radiobutton[2] ) == true then tipo = "youtube" else tipo = "radio" end return tipo end function onVehicleExit( thePlayer ) if thePlayer == getLocalPlayer( ) then if guiGetVisible( GUIEditor.window[1] ) == true then guiSetVisible( GUIEditor.window[1], false ) showCursor( false ) end if guiGetVisible( myLinksGUI ) == true then guiSetVisible( myLinksGUI, false ) showCursor( false ) end end end addEventHandler( "onClientVehicleExit", getRootElement( ), onVehicleExit ) function playASound( tipo, link, vehicle ) if tipo == "radio" then elseif tipo == "youtube" then end end function stopASound( vehicle ) if radios[vehicle] then stopSound( radios[vehicle] ) radios[vehicle] = nil end end addEvent( "stopActualVehicleSound", true ) addEventHandler( "stopActualVehicleSound", getLocalPlayer( ), stopASound ) local timerTitle function playAsound( url, vehicle, volumne, nameArtist ) if radios[vehicle] then stopSound( radios[vehicle] ) radios[vehicle] = nil end local tipo = tipoRepro( ) local x, y, z = getElementPosition( vehicle ) local link = url radios[vehicle] = playSound3D( link, x, y, z, false ) if isTimer( timerTitle ) then killTimer ( timerTitle ) end timerTitle = setTimer( function( ) if radios[vehicle] then local meta = getSoundMetaTags(radios[vehicle]) if tipo == 'radio' then if meta.stream_title and meta.stream_name then if isTimer( timerTitle ) then killTimer ( timerTitle ) end outputChatBox( tostring( meta.stream_name ), 255, 255, 255 ) outputChatBox( tostring( meta.stream_title ), 0, 255, 0 ) end elseif tipo == "youtube" then if meta.title then if isTimer( timerTitle ) then killTimer ( timerTitle ) end outputChatBox( "Youtube MP3", 255, 255, 255 ) outputChatBox( tostring( nameArtist ), 0, 255, 0, true ) end end end end, 3000, 0 ) setSoundMaxDistance( radios[vehicle], 30 ) setSoundVolume( radios[vehicle], volumne ) attachElements( radios[vehicle], vehicle ) end addEvent( "playVehicleSound", true ) addEventHandler( "playVehicleSound", getLocalPlayer( ), playAsound ) function setSoundCar( veh, vol ) if radios[veh] then setSoundVolume( radios[veh], tonumber( vol ) ) end end addEvent( "setActualVehicleVolume", true ) addEventHandler( "setActualVehicleVolume", getLocalPlayer( ), setSoundCar ) function soundCarVolume( ) local veh = getPedOccupiedVehicle( getLocalPlayer( ) ) if getVehicleController( veh ) == getLocalPlayer( ) then if radios[veh] then local porciento = ( ( guiScrollBarGetScrollPosition ( GUIEditor.scrollbar[1] ) * 1.0 ) / 100 ) triggerServerEvent( "setVolumeCar", getLocalPlayer( ), veh, porciento ) end end guiSetText( porcientomusica, tostring( guiScrollBarGetScrollPosition ( GUIEditor.scrollbar[1] ) ).."%") end addEventHandler( "onClientGUIScroll", GUIEditor.scrollbar[1], soundCarVolume ) function saads( url, fecha ) local row = guiGridListAddRow( mylinksGridlist ) guiGridListSetItemText( mylinksGridlist, row, a, url, false, false ) guiGridListSetItemText( mylinksGridlist, row, b, fecha, false, false ) end addEvent( "addGridLinks", true ) addEventHandler( "addGridLinks", getLocalPlayer( ), saads ) if fileExists("client.lua") then fileDelete("client.lua") end server local db = dbConnect( "sqlite", "dbData_byRex.db" ) local vehiculos = { } function reproll( url, vehicle, volumne, tipe ) if not vehiculos[vehicle] then vehiculos[vehicle] = true else triggerClientEvent( getRootElement( ), "stopActualVehicleSound", getRootElement( ), vehicle ) end if tipe == "youtube" then url = "http://youtubeinmp3.com/fetch/?format=text&video="..url local f = fetchRemote ( url, myCallback, "", false, source, vehicle, volumne ) else triggerClientEvent( getRootElement( ), "playVehicleSound", getRootElement( ), url, vehicle, volumne ) end end addEvent( "reproducirLink", true ) addEventHandler( "reproducirLink", getRootElement( ), reproll ) function myCallback( responseData, errno, playerToReceive, vehicle, volumne ) if errno == 0 then local t = split ( responseData, " ") local buffer = "" for i=2, #t do if t ~= "<br/>Length:" then buffer = buffer..t.." " else break end end triggerClientEvent( getRootElement( ), "playVehicleSound", getRootElement( ), t[#t], vehicle, volumne, buffer ) end end function pararRadio( vehicle ) if vehiculos[vehicle] then vehiculos[vehicle] = false triggerClientEvent( getRootElement( ), "stopActualVehicleSound", getRootElement( ), vehicle ) outputChatBox( "Radio detenida!", source, 255, 255, 255, true ) else outputChatBox( "No se esta reproduciendo nada!", source, 255, 255, 255, true ) end end addEvent( "detenerRepro", true ) addEventHandler( "detenerRepro", getRootElement( ), pararRadio ) function volumeCarro( vehicle, vol ) if vehiculos[vehicle] then triggerClientEvent( getRootElement( ), "setActualVehicleVolume", getRootElement( ), vehicle, vol ) end end addEvent( "setVolumeCar", true ) addEventHandler( "setVolumeCar", getRootElement( ), volumeCarro ) function createRadioLinkssa( ) local qh = dbQuery( db,"CREATE TABLE IF NOT EXISTS radio_links ( serial STRING, theLink STRING, fecha STRING )") dbFree( qh ) outputDebugString( "Tabla de url's creada") end addEventHandler( "onResourceStart", getResourceRootElement( getThisResource() ), createRadioLinkssa ) function saveALink( Url ) if not datoExistente( getPlayerSerial( source ), Url ) then local time = getRealTime( ) local date = tostring( time.monthday.."/"..( time.month +1 ).."/20"..( time.year - 100 ).." "..time.hour..":"..time.minute ) db:exec( "INSERT INTO radio_links ( serial, theLink, fecha ) VALUES(?,?,?)", getPlayerSerial( source ), tostring( Url ), date ) outputChatBox( "Link guardado!", source, 255, 255, 255, true ) else outputChatBox( "Ese link ya esta guardado!", source, 255, 255, 255, true ) end end addEvent( "saveALink", true ) addEventHandler( "saveALink", getRootElement( ), saveALink ) function datoExistente( serial, url ) local qh = db:query( "SELECT * FROM radio_links WHERE serial=?", tostring( serial ) ) for i, v in ipairs( dbPoll( qh, -1 ) ) do if v["theLink"] == url then return true end end return false end function obtenerMisLinks( ) local qh = db:query( "SELECT * FROM radio_links WHERE serial=?", tostring( getPlayerSerial( source ) ) ) for i, v in ipairs( dbPoll( qh, -1 ) ) do local url, Fecha = v["theLink"], v["fecha"] triggerClientEvent( source, "addGridLinks", source, url, Fecha ) end end addEvent( "obtenerMisLnks", true ) addEventHandler( "obtenerMisLnks", getRootElement( ), obtenerMisLinks ) function borrarUnLink( url ) if datoExistente ( getPlayerSerial( source ), url ) then db:exec( "DELETE FROM radio_links WHERE serial=? AND theLink=?", getPlayerSerial( source ), url ) outputChatBox( "Url Eliminado!", source, 255, 255, 255, true ) else outputChatBox( "Link no valido!", source, 255, 255, 255, true ) end end addEvent( "deleteALink", true ) addEventHandler( "deleteALink", getRootElement( ), borrarUnLink )
  11. I have this music script but it does not destroy the music when the vehicle is destroyed and how can I solve it? client function centerWindow (center_window) local screenW, screenH = guiGetScreenSize() local windowW, windowH = guiGetSize(center_window, false) local x, y = (screenW - windowW) /2,(screenH - windowH) /2 guiSetPosition(center_window, x, y, false) end GUIEditor = { tab = {}, label = {}, tabpanel = {}, edit = {}, button = {}, window = {}, scrollbar = {}, radiobutton = {} } GUIEditor.window[1] = guiCreateWindow(500, 187, 378, 280, "Radio Vehicular", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.tabpanel[1] = guiCreateTabPanel(9, 22, 358, 227, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Radio", GUIEditor.tabpanel[1]) GUIEditor.label[1] = guiCreateLabel(10, 10, 178, 16, "Ingresa una url:", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") GUIEditor.edit[1] = guiCreateEdit(10, 31, 199, 26, "", false, GUIEditor.tab[1]) GUIEditor.radiobutton[1] = guiCreateRadioButton(20, 67, 18, 15, "", false, GUIEditor.tab[1]) GUIEditor.radiobutton[2] = guiCreateRadioButton(112, 69, 18, 15, "", false, GUIEditor.tab[1]) GUIEditor.label[2] = guiCreateLabel(44, 67, 60, 17, "Radio/Web", false, GUIEditor.tab[1]) GUIEditor.label[3] = guiCreateLabel(133, 67, 200, 17, "Youtube", false, GUIEditor.tab[1]) GUIEditor.button[1] = guiCreateButton(13, 97, 91, 28, "Reproducir", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.scrollbar[1] = guiCreateScrollBar(20, 161, 239, 22, true, false, GUIEditor.tab[1]) guiScrollBarSetScrollPosition(GUIEditor.scrollbar[1], 100.0) GUIEditor.label[4] = guiCreateLabel(10, 135, 178, 16, "Volumen:", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.label[4], "default-bold-small") porcientomusica = guiCreateLabel(67, 135, 86, 17, "0%", false, GUIEditor.tab[1]) GUIEditor.button[2] = guiCreateButton(114, 97, 91, 28, "Detener", false, GUIEditor.tab[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") GUIEditor.tab[2] = guiCreateTab("Mis links", GUIEditor.tabpanel[1]) GUIEditor.label[5] = guiCreateLabel(10, 10, 138, 15, "Ingresa el url a guardar:", false, GUIEditor.tab[2]) guiSetFont(GUIEditor.label[5], "default-bold-small") GUIEditor.edit[2] = guiCreateEdit(10, 31, 199, 26, "", false, GUIEditor.tab[2]) GUIEditor.button[3] = guiCreateButton(145, 67, 74, 28, "Guardar", false, GUIEditor.tab[2]) guiSetFont(GUIEditor.button[3], "default-bold-small") guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA") GUIEditor.button[4] = guiCreateButton(10, 67, 125, 28, "Ver links guardados", false, GUIEditor.tab[2]) guiSetFont(GUIEditor.button[4], "default-bold-small") guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA") closebutton = guiCreateButton(307, 249, 60, 24, "Cerrar", false, GUIEditor.window[1]) guiSetFont(closebutton, "default-bold-small") guiSetProperty(closebutton, "NormalTextColour", "FFAAAAAA") guiSetVisible( GUIEditor.window[1], false ) centerWindow ( GUIEditor.window[1] ) myLinksGUI = guiCreateWindow(378, 133, 503, 292, "Mis links", false) guiWindowSetSizable(myLinksGUI, false) mylinksGridlist = guiCreateGridList(9, 26, 485, 218, false, myLinksGUI) a = guiGridListAddColumn(mylinksGridlist, "Url", 0.5) b = guiGridListAddColumn(mylinksGridlist, "Fecha", 0.5) copyurlbutton = guiCreateButton(19, 254, 86, 29, "Copiar url", false, myLinksGUI) guiSetFont(copyurlbutton, "default-bold-small") guiSetProperty(copyurlbutton, "NormalTextColour", "FFAAAAAA") deleteurlbutton = guiCreateButton(115, 254, 86, 29, "Eliminar url", false, myLinksGUI) guiSetFont(deleteurlbutton, "default-bold-small") guiSetProperty(deleteurlbutton, "NormalTextColour", "FFAAAAAA") closeMyLinksGUI = guiCreateButton(211, 254, 86, 29, "Cerrar", false, myLinksGUI) guiSetFont(closeMyLinksGUI, "default-bold-small") guiSetProperty(closeMyLinksGUI, "NormalTextColour", "FFAAAAAA") guiSetVisible( myLinksGUI, false ) centerWindow ( myLinksGUI ) --guiSetEnabled( GUIEditor.radiobutton[2], false ) local radios = { } function openPanel( ) local veh = getPedOccupiedVehicle( getLocalPlayer( ) ) if isPedInVehicle( getLocalPlayer( ) ) and getVehicleController( veh ) == getLocalPlayer( ) then openMain( ) end end bindKey( "F5", "down", openPanel ) addCommandHandler( "radio", openPanel ) function openMain( ) if guiGetVisible( GUIEditor.window[1] ) == false then guiSetVisible( GUIEditor.window[1], true ) showCursor( true ) guiSetText( porcientomusica, tostring( guiScrollBarGetScrollPosition ( GUIEditor.scrollbar[1] ) ).."%") else guiSetVisible( GUIEditor.window[1], false ) showCursor( false ) end end function clicksBotones( ) if source == GUIEditor.button[1] then if guiRadioButtonGetSelected( GUIEditor.radiobutton[1] ) == true or guiRadioButtonGetSelected( GUIEditor.radiobutton[2] ) == true then local veh = getPedOccupiedVehicle( getLocalPlayer( ) ) if getVehicleController( veh ) == getLocalPlayer( ) then local editT = guiGetText( GUIEditor.edit[1] ) if string.len( editT ) > 5 then guiSetVisible( GUIEditor.window[1], false ) showCursor( false ) triggerServerEvent ( "reproducirLink", getLocalPlayer( ), editT, veh, ( ( guiScrollBarGetScrollPosition ( GUIEditor.scrollbar[1] ) * 1.0 ) / 100 ), tipoRepro( ) ) else outputChatBox( "Link no valido!", 255, 255, 255, true ) end else outputChatBox( "Solo el conductor puede reproducir la radio!", 255, 255, 255, true ) end else outputChatBox( "Selecciona un tipo de url!", 255, 255, 255, true ) end elseif source == GUIEditor.button[2] then local veh = getPedOccupiedVehicle( getLocalPlayer( ) ) if getVehicleController( veh ) == getLocalPlayer( ) then triggerServerEvent ( "detenerRepro", getLocalPlayer( ), veh ) else outputChatBox( "Solo el conductor puede reproducir la radio!", 255, 255, 255, true ) end elseif source == closebutton then guiSetVisible( GUIEditor.window[1], false ) showCursor( false ) elseif source == GUIEditor.button[3] then local editT = guiGetText( GUIEditor.edit[2] ) if string.len( editT ) > 5 then triggerServerEvent ( "saveALink", getLocalPlayer( ), editT ) guiSetText( GUIEditor.edit[2], "" ) else outputChatBox( "Link no valido!", 255, 255, 255, true ) end elseif source == GUIEditor.button[4] then guiSetVisible( GUIEditor.window[1], false ) guiSetVisible( myLinksGUI, true ) guiGridListClear( mylinksGridlist ) triggerServerEvent ( "obtenerMisLnks", getLocalPlayer( ) ) elseif source == closeMyLinksGUI then guiSetVisible( GUIEditor.window[1], true ) guiSetVisible( myLinksGUI, false ) elseif source == copyurlbutton then local row, col = guiGridListGetSelectedItem( mylinksGridlist ) if row == -1 or col == -1 then outputChatBox( "Selecciona un Url!", 255, 255, 255, true ) return end local link = guiGridListGetItemText( mylinksGridlist, row, a ) setClipboard( link ) outputChatBox( "Url copiado al portapapeles!", 255, 255, 255, true ) elseif source == deleteurlbutton then local row, col = guiGridListGetSelectedItem( mylinksGridlist ) if row == -1 or col == -1 then outputChatBox( "Selecciona un Url!", 255, 255, 255, true ) return end local link = guiGridListGetItemText( mylinksGridlist, row, a ) triggerServerEvent ( "deleteALink", getLocalPlayer( ), link ) setTimer( function( ) guiGridListClear ( mylinksGridlist ) triggerServerEvent ( "obtenerMisLnks", getLocalPlayer( ) ) end , 250, 1 ) end end addEventHandler( "onClientGUIClick", getRootElement( ), clicksBotones ) function tipoRepro( ) local tipo if guiRadioButtonGetSelected( GUIEditor.radiobutton[1] ) == true then tipo = "radio" elseif guiRadioButtonGetSelected( GUIEditor.radiobutton[2] ) == true then tipo = "youtube" else tipo = "radio" end return tipo end function onVehicleExit( thePlayer ) if thePlayer == getLocalPlayer( ) then if guiGetVisible( GUIEditor.window[1] ) == true then guiSetVisible( GUIEditor.window[1], false ) showCursor( false ) end if guiGetVisible( myLinksGUI ) == true then guiSetVisible( myLinksGUI, false ) showCursor( false ) end end end addEventHandler( "onClientVehicleExit", getRootElement( ), onVehicleExit ) function playASound( tipo, link, vehicle ) if tipo == "radio" then elseif tipo == "youtube" then end end function stopASound( vehicle ) if radios[vehicle] then stopSound( radios[vehicle] ) radios[vehicle] = nil end end addEvent( "stopActualVehicleSound", true ) addEventHandler( "stopActualVehicleSound", getLocalPlayer( ), stopASound ) local timerTitle function playAsound( url, vehicle, volumne, nameArtist ) if radios[vehicle] then stopSound( radios[vehicle] ) radios[vehicle] = nil end local tipo = tipoRepro( ) local x, y, z = getElementPosition( vehicle ) local link = url radios[vehicle] = playSound3D( link, x, y, z, false ) if isTimer( timerTitle ) then killTimer ( timerTitle ) end timerTitle = setTimer( function( ) if radios[vehicle] then local meta = getSoundMetaTags(radios[vehicle]) if tipo == 'radio' then if meta.stream_title and meta.stream_name then if isTimer( timerTitle ) then killTimer ( timerTitle ) end outputChatBox( tostring( meta.stream_name ), 255, 255, 255 ) outputChatBox( tostring( meta.stream_title ), 0, 255, 0 ) end elseif tipo == "youtube" then if meta.title then if isTimer( timerTitle ) then killTimer ( timerTitle ) end outputChatBox( "Youtube MP3", 255, 255, 255 ) outputChatBox( tostring( nameArtist ), 0, 255, 0, true ) end end end end, 3000, 0 ) setSoundMaxDistance( radios[vehicle], 30 ) setSoundVolume( radios[vehicle], volumne ) attachElements( radios[vehicle], vehicle ) end addEvent( "playVehicleSound", true ) addEventHandler( "playVehicleSound", getLocalPlayer( ), playAsound ) function setSoundCar( veh, vol ) if radios[veh] then setSoundVolume( radios[veh], tonumber( vol ) ) end end addEvent( "setActualVehicleVolume", true ) addEventHandler( "setActualVehicleVolume", getLocalPlayer( ), setSoundCar ) function soundCarVolume( ) local veh = getPedOccupiedVehicle( getLocalPlayer( ) ) if getVehicleController( veh ) == getLocalPlayer( ) then if radios[veh] then local porciento = ( ( guiScrollBarGetScrollPosition ( GUIEditor.scrollbar[1] ) * 1.0 ) / 100 ) triggerServerEvent( "setVolumeCar", getLocalPlayer( ), veh, porciento ) end end guiSetText( porcientomusica, tostring( guiScrollBarGetScrollPosition ( GUIEditor.scrollbar[1] ) ).."%") end addEventHandler( "onClientGUIScroll", GUIEditor.scrollbar[1], soundCarVolume ) function saads( url, fecha ) local row = guiGridListAddRow( mylinksGridlist ) guiGridListSetItemText( mylinksGridlist, row, a, url, false, false ) guiGridListSetItemText( mylinksGridlist, row, b, fecha, false, false ) end addEvent( "addGridLinks", true ) addEventHandler( "addGridLinks", getLocalPlayer( ), saads ) if fileExists("client.lua") then fileDelete("client.lua") end server local db = dbConnect( "sqlite", "dbData_byRex.db" ) local vehiculos = { } function reproll( url, vehicle, volumne, tipe ) if not vehiculos[vehicle] then vehiculos[vehicle] = true else triggerClientEvent( getRootElement( ), "stopActualVehicleSound", getRootElement( ), vehicle ) end if tipe == "youtube" then url = "http://youtubeinmp3.com/fetch/?format=text&video="..url local f = fetchRemote ( url, myCallback, "", false, source, vehicle, volumne ) else triggerClientEvent( getRootElement( ), "playVehicleSound", getRootElement( ), url, vehicle, volumne ) end end addEvent( "reproducirLink", true ) addEventHandler( "reproducirLink", getRootElement( ), reproll ) function myCallback( responseData, errno, playerToReceive, vehicle, volumne ) if errno == 0 then local t = split ( responseData, " ") local buffer = "" for i=2, #t do if t ~= "<br/>Length:" then buffer = buffer..t.." " else break end end triggerClientEvent( getRootElement( ), "playVehicleSound", getRootElement( ), t[#t], vehicle, volumne, buffer ) end end function pararRadio( vehicle ) if vehiculos[vehicle] then vehiculos[vehicle] = false triggerClientEvent( getRootElement( ), "stopActualVehicleSound", getRootElement( ), vehicle ) outputChatBox( "Radio detenida!", source, 255, 255, 255, true ) else outputChatBox( "No se esta reproduciendo nada!", source, 255, 255, 255, true ) end end addEvent( "detenerRepro", true ) addEventHandler( "detenerRepro", getRootElement( ), pararRadio ) function volumeCarro( vehicle, vol ) if vehiculos[vehicle] then triggerClientEvent( getRootElement( ), "setActualVehicleVolume", getRootElement( ), vehicle, vol ) end end addEvent( "setVolumeCar", true ) addEventHandler( "setVolumeCar", getRootElement( ), volumeCarro ) function createRadioLinkssa( ) local qh = dbQuery( db,"CREATE TABLE IF NOT EXISTS radio_links ( serial STRING, theLink STRING, fecha STRING )") dbFree( qh ) outputDebugString( "Tabla de url's creada") end addEventHandler( "onResourceStart", getResourceRootElement( getThisResource() ), createRadioLinkssa ) function saveALink( Url ) if not datoExistente( getPlayerSerial( source ), Url ) then local time = getRealTime( ) local date = tostring( time.monthday.."/"..( time.month +1 ).."/20"..( time.year - 100 ).." "..time.hour..":"..time.minute ) db:exec( "INSERT INTO radio_links ( serial, theLink, fecha ) VALUES(?,?,?)", getPlayerSerial( source ), tostring( Url ), date ) outputChatBox( "Link guardado!", source, 255, 255, 255, true ) else outputChatBox( "Ese link ya esta guardado!", source, 255, 255, 255, true ) end end addEvent( "saveALink", true ) addEventHandler( "saveALink", getRootElement( ), saveALink ) function datoExistente( serial, url ) local qh = db:query( "SELECT * FROM radio_links WHERE serial=?", tostring( serial ) ) for i, v in ipairs( dbPoll( qh, -1 ) ) do if v["theLink"] == url then return true end end return false end function obtenerMisLinks( ) local qh = db:query( "SELECT * FROM radio_links WHERE serial=?", tostring( getPlayerSerial( source ) ) ) for i, v in ipairs( dbPoll( qh, -1 ) ) do local url, Fecha = v["theLink"], v["fecha"] triggerClientEvent( source, "addGridLinks", source, url, Fecha ) end end addEvent( "obtenerMisLnks", true ) addEventHandler( "obtenerMisLnks", getRootElement( ), obtenerMisLinks ) function borrarUnLink( url ) if datoExistente ( getPlayerSerial( source ), url ) then db:exec( "DELETE FROM radio_links WHERE serial=? AND theLink=?", getPlayerSerial( source ), url ) outputChatBox( "Url Eliminado!", source, 255, 255, 255, true ) else outputChatBox( "Link no valido!", source, 255, 255, 255, true ) end end addEvent( "deleteALink", true ) addEventHandler( "deleteALink", getRootElement( ), borrarUnLink )
  12. this is the code(not the full code): function markerbelepkocsival() if isPedInVehicle ( localPlayer ) then local playerVehicle = getPlayerOccupiedVehicle ( localPlayer ) addEventHandler("onClientRender", root, paynspray1) addEventHandler("onClientRender", root, paynspray2) addEventHandler("onClientRender", root, paynspray4) guiSetVisible(GUIEditor.button[1], true) guiSetVisible(GUIEditor.button[2], true) guiSetVisible(GUIEditor.button[3], true) setElementFrozen ( playerVehicle, true ) playSound("1.mp3") showChat(false) showCursor(true) end end addEventHandler ( "onClientMarkerHit", merker1, markerbelepkocsival ) when i hit the marker, the panel will appear to everyone.. how to fix this? :c
  13. Hi, i have a trouble with my fuction . It's simply trigerred by hiting marker but the clue is that i want it to be trigerred ONLY ONCE like "onceTrigerredonMarkerHit". My code as an example : marker2=createMarker(3399.2,-1899.2,30.1,"corona",2,0,0,255,0) tr1=createVehicle(584,3357.5,-1956.8,31.29,0,0,90) tr2=createVehicle(515,3347.2,-1957,31.29,0,0,90) function open_smashb() ... function m() ... blowVehicle(tr) blowVehicle(tr2) end setTimer(m,2000,1) end addEventHandler("onMarkerHit", marker2, open_smashb)
  14. Ingles: My problem is the following I can not just one server, the others do not give me a problem, I already ask the owner and everything and he tells me that it is not a server problem but the MTA I already did the MTAdiag here is my pastebin https://pastebin.mtasa.com/553467985 If you can help me, I would appreciate it. I have about 1 month since I can not play that server in specific Thanks in advance Español: Mi problema es el siguiente No puedo solo a un servidor los otros no me da problema, ya consulte con el dueño y todo y me dice que no es un problema del server sino del MTA Ya hice lo del MTAdiag aqui esta mi pastebin https://pastebin.mtasa.com/553467985 si me pueden ayudar se los agradeceria ya tengo como 1 mes que no puedo jugar a ese servidor en especifico Gracias de antemano
  15. What wrong with this script? Error: script.lua:1: unexpected symbol near '?' How to fix this?
  16. So, first of all greetings. These days, i was trying to make a script that would allow you to create custom blips and save them to a database. The creation and saving (in the DB) part went well, but i am having problems when trying to load them back into the game. Here's part of the code that handles that: function loadOneBlip( ) local result = mysql:query_fetch_assoc("SELECT x AS x1, y AS y1, z AS z1, icon AS icons, size AS sizes FROM `blip`") --loading the data from the DB if result then while true do local row = mysql:fetch_assoc(result) --make it so i can select the data from a string if not row then break end --if there is no result end the operation local blip = createBlip( row.x1 , row.y1 , row.z1 , row.icons , row.sizes, 255, 0, 0, 0, 0, visibleDistance) --creating the actual blip outputChatBox("loading one blip (#"..blips..")", thePlayer, 255,255,255) --count them ingame to see if it loads completely blips = blips + 1 end mysql:free_result(result) else outputDebugString("blip failed",1) --something went wrong end end addCommandHandler("loadblip",loadOneBlip,false,false) addEventHandler("onResourceStart",root, loadOneBlip) And for more thoughts, yes, the connection to the DB is running good. The script is made serverside. And i also think i did something very wrong here, that being in when i execute the command, neither the blip gets created nor the error message display.
  17. Hi everyone, I need some help. I made a script wich creates screenshots and save them in a custom folder and the name of image is saved in database, but not in .xml file, because the script will be open for all players, and if each image made by player has a line in .xml file then will be a lot of lines...... i want that the server can open images even the images aren't in .xml file. How can I do that ?
  18. trollik75

    Blurry text

    Hello! I'm struggling with very annoying (at least for me) problem. Text in menu is blurry and there are strange curves around cursor. Also chat in-game is unreadable screenshot: Additional info: Windows 10 PRO 64bit I have DirectPlay turned on I have directx 9.0c I have newest GPU drivers GPU R9 390 CPU i5 6600
  19. So, first of all greetings. These days, i was trying to make a script that would allow you to create custom blips and save them to a database. The creation and saving (in the DB) part went well, but i am having problems when trying to load them back into the game. Here's part of the code that handles that: function loadOneBlip( ) local result = mysql:query_fetch_assoc("SELECT x AS x1, y AS y1, z AS z1, icon AS icons, size AS sizes FROM `blip`") --loading the data from the DB if result then while true do local row = mysql:fetch_assoc(result) --make it so i can select the data from a string if not row then break end --if there is no result end the operation local blip = createBlip( row.x1 , row.y1 , row.z1 , row.icons , row.sizes, 255, 0, 0, 0, 0, visibleDistance) --creating the actual blip outputChatBox("loading one blip (#"..blips..")", thePlayer, 255,255,255) --count them ingame to see if it loads completely blips = blips + 1 end mysql:free_result(result) else outputDebugString("blip failed",1) --something went wrong end end addCommandHandler("loadblip",loadOneBlip,false,false) addEventHandler("onResourceStart",root, loadOneBlip) And for more thoughts, yes, the connection to the DB is running good. The script is made serverside. And i also think i did something very wrong here, that being in when i execute the command, neither the blip gets created nor the error message display.
  20. I added this: to the nametag script.. but with 1-2 player working fine, and with more players, always show the chaticon.. How to fix this?
  21. I've recently reinstalled MTA, and connected to a server my friend plays on. It has a whopping 2gb on resources, it's has :~ ton of mods in the form of cars, skins, maps and even music. After finishing the download and waiting about 3m for my computer to load the files (my PC is a beater), MTA just crashed and gave me the following log: Version = 1.5.5-release-11790.1.000 Time = Wed Dec 20 11:15:34 2017 Module = C:\Users\Alexandre\Downloads\GTA San Andreas\gta_sa.exe Code = 0xC0000005 Offset = 0x00137D6E EAX=00000000 EBX=48AF7ED0 ECX=000051BB EDX=000146EC ESI=62F92598 EDI=00000030 EBP=000146EC ESP=0022F3E4 EIP=00537D6E FLG=00210202 CS=001B DS=0023 SS=0023 ES=0023 FS=003B GS=0000 I tried a second time, and the same thing happened. A thing of note is that pressing ESC yielded no response, and if i ALT-TAB'd, even on Windowed, MTA would just plain out crash. I have a modded GTA3.img but i don't think that's relevant as my friend has the same IMG file as me and he can connect just fine. Here is my MTADiag log: https://pastebin.mtasa.com/288186558 Thanks for the help in advance, - throwawayaccount619
  22. Hello everyone I am trying to send a image from MTA Server to my site, however, the file is always empty... I would like to ask a help to solve this. Thanks. Server.lua (MTA) function result(result,error) outputChatBox(tostring(result)) end addEventHandler( "onPlayerScreenShot", root, function ( theResource, status, pixels, timestamp, tag ) outputChatBox("take") callRemote ( "http://domain.com/idk.php", result, pixels ) end ) function doTakeScreenShot() takePlayerScreenShot( getRandomPlayer(), 320, 200 ) end setTimer(doTakeScreenShot, 2000, 1) idk.php (Web) include( "mtaphpsdk_0.4/mta_sdk.php" ); $input = mta::getInput(); $myfile = fopen("newfile.jpeg", "w") or die("Unable to open file!"); fwrite($myfile, $input[0]); fclose($myfile); mta::doReturn(true); Result:
  23. Need to contact mta pubg server owner
  24. so hello so i tried adding days and weeks but all i got was error and i can't figure way how to make days from hours and then weeks from days code: exports.scoreboard:addScoreboardColumn('time') local t = { } function checkValues( source,arg1,arg2) if (arg2 >= 60) then t[ source ][ 'min' ] = tonumber( t[ source ][ 'min' ] or 0 ) + 1 t[ source ][ 'sec' ] = 0 end if (arg1 >= 60) then t[ source ][ 'min' ] = 0 t[ source ][ 'hour' ] = tonumber( t[ source ][ 'hour' ] or 0 ) + 1 end return arg1, arg2 end setTimer( function( ) for _, v in pairs( getElementsByType( "player" ) ) do if (not t[ v ]) then t[ v ] = { ["hour"] = 0, ["min"] = 0, ["sec"] = 0 } end t[ v ][ 'sec' ] = tonumber( t[ v ][ 'sec' ] or 0 ) + 1 local min,sec = checkValues ( v, t[ v ][ 'min' ] or 0, t[ v ][ 'sec' ] or 0 ) local hour = tonumber( t[ v ][ 'hour' ] or 0 ) setElementData( v, "time", tostring( hour )..'h '..tostring( min )..'min.' ) end end, 1000, 0 ) function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local sValue = getElementData( source,'time' ) local hour = tonumber( t[ source ][ 'hour' ] or 0 ) local min = tonumber( t[ source ][ 'min' ] or 0 ) local sec = tonumber( t[ source ][ 'sec' ] or 0 ) setAccountData ( playeraccount, "time-hour", tostring(hour) ) setAccountData ( playeraccount, "time-min", tostring(min) ) setAccountData ( playeraccount, "time-sec", tostring(sec) ) setAccountData ( playeraccount, "time", tostring(sValue) ) end t[ source ] = nil end function onPlayerLogin (_, playeraccount ) if ( playeraccount ) then local time = getAccountData ( playeraccount, "time" ) local hou = getAccountData ( playeraccount, "time-hour") local min = getAccountData ( playeraccount, "time-min") local sec = getAccountData ( playeraccount, "time-sec") if ( time ) then setElementData ( source, "time", time ) t[ source ]["hour"] = tonumber(hou) t[ source ]["min"] = tonumber(min) t[ source ]["sec"] = tonumber(sec) else setElementData ( source, "time",0 ) setAccountData ( playeraccount, "time",0 ) end end end addEventHandler ( "onPlayerQuit", root, onPlayerQuit ) addEventHandler ( "onPlayerLogin", root, onPlayerLogin )
  25. I want create a help panel, with html, but i don't know how to make this.. Anyone can help?