Jump to content

BanNsS1

Members
  • Posts

    24
  • Joined

  • Last visited

Posts posted by BanNsS1

  1. Look, if i declare these functions (with the events):

      
    function onPlayerSpawn() 
    setElementData(source, "databaseid", charSelected) -- charSelected is declared when you select the character you want to use from your character list. 
    end 
      
    function onPlayerQuit() 
    outputChatBox(getElementData(source, "databaseid")) 
    end 
    

    When a player quits, the outputChatBox shows "false".

    EDIT: I tested it again and it works. Excuse me. Thanks so much!

  2. How can i getElementData onPlayerQuit?

    On player spawn the server updates the database and set "online" = 1 to the player who spawn.

    I would like that on player quit the server updates the database and set online to 0.

    To do it i've to get the character DATABASE ID which sets as a ElementData. When i try to getElementData(thePlayer, "databaseid") in the event onPlayerQuit it returns false.

    How can i do?

  3. i saw that on community..

    can you update that script and put all cars in so other players can have it and on english?

    You saw that on community? It's impossible. I created it and is a private resource.

    There are different points to buy cars. Depending the site you try to buy, will appear some other vehicles, planes or boats.

    DP: If you saw that on "community" give me the URL.

  4. lvltgreja = createObject ( 980, 2497.2998046875, 2773.3994140625, 12.600001335144, 0, 0, 90) 
    function opendoor(thePlayer) 
    if (getElementData(thePlayer, "equipo") == idDelEquipoQueLaPuedeAbrir) then    ------ Que pongo en Id el nombre del equipo?¿ 
      
     moveObject (lvltgreja, 2000, 2497.2998046875, 2773.3994140625, 5.600001335144, 0, 0, 0) 
    end 
    end 
    addCommandHandler("lvltgreja", opendoor, true) 
      
    function closedoor(thePlayer) 
    if (getElementData(thePlayer, "equipo") == idDelEquipoQueLaPuedeAbrir) then    ------ Que pongo en Id el nombre del equipo?¿ 
      
     moveObject (lvltgreja, 2000, 2497.2998046875, 2773.3994140625, 5.600001335144, 0, 0, 0) 
    end 
    end 
    addCommandHandler("lvltgreja", closedoor, true) 
    

    Funcionará simplemente cambiando idDelEquipoQueLaPuedeAbrir por la ID del equipo.

    NOTA: Si al realizar en SPAWN del jugador no se asigna la variable "equipo" al jugador, esto no funcionara:

    Si no asignas

    setElementData(thePlayer, "equipo", idequipo)  
    

    el servidor no podrá recoger

    getElementData(thePlayer, "equipo")  
    

  5. I realised the reason.

    When the car is stopped, the sound of the engine is so low.

    When a new sound is played for the element vehicle it gets first the vehicle volume and then the playSound volume.

  6. si usas setElementData(thePlayer, "equipo", idequipo) al ralizar el spawn (que es lo que yo hago):

    te serviria con añadir esta condición al ejecutar el comando:

    if (getElementData(thePlayer, "equipo") == idDelEquipoQueLaPuedeAbrir) then 
    

    dejando el código así.

      
    -- Esto seria una function para el cliente. 
    function abrirReja(thePlayer) 
    if (getElementData(thePlayer, "equipo") == idDelEquipoQueLaPuedeAbrir) then 
      
    --ejecutar código aqui: moveObject... 
      
    end 
    end 
    addCommandHandler("abrir", abrirReja, true) 
    

    Sino usas setElementData() y usas setPlayerTeam( ) sería lo mismo pero con getPlayerTeam ( thePlayer )

    Y otra cosa como puedo crear un archivo.txd para la textura;

    Ejemplo: Quiero poner el nombre de un clan en una valla publicitaria, osea remplazarla como hago eso?

    Buscando el archivo .txd en tu gta que contenga la imagen, editandolo con txdworkshop y con un resource (ahora mismo no recuerdo cual es) reemplazarla.

  7. I've created a event to reproduce a sound when the player press a key staying in a vehicle.

    It works but...

    If the car is stopped (0km/h) the sound volume is so low. If the car velocity is 120km/h the sound is reproduced with the desired volume.

    This is my code:

    local soundlockint = false 
    function sonidoBloqueoVehiculoInterior( vehicle ) 
      
            local x, y, z = getElementPosition(vehicle) 
            local int = getElementInterior(vehicle) 
            local dim = getElementDimension(vehicle) 
            local px, py, pz = getElementPosition(getLocalPlayer()) 
            if (getDistanceBetweenPoints3D(x, y, z, px, py, pz)<35) then 
                local soundlockint = playSound3D("sounds/puertas_vehiculo_interior.mp3", x, y, z, false) 
                setSoundMaxDistance(soundlockint, 10) 
                setElementDimension(soundlockint, dim) 
                setElementInterior(soundlockint, int) 
                setSoundVolume(soundlockint, 0.5) 
            end 
             
            if (isPedInVehicle(getLocalPlayer())) then 
                setSoundVolume(sound, 0.5) 
            end 
    end 
    addEvent("PlayLockOrUnlockInteriorSound", true) 
    addEventHandler("PlayLockOrUnlockInteriorSound", getResourceRootElement(), sonidoBloqueoVehiculoInterior) 
    

    ¿Volume depending on the vehicle speed? ¿How to fix?

  8. I'm using valhalla 4.0.24 Script. I started to edit it in my computer testing the changes in my dedicated server (in windows 7). Now Im trying to run server in a vps, in linux but i can't.

    In my computer i use a xampp server. In linux server im using a remote mysql host.

    server.logs in Windows Server (i can join and works ok)

    =========================================================== 
    = Multi Theft Auto: San Andreas v1.3 
    =========================================================== 
    = Server name      : ((Edited to hidden server identity)) 
    = Server IP address: 127.0.0.1 
    = Server port      : 22003 
    =  
    = Log file         : ..a_sv/server/mods/deathmatch/logs/server.log 
    = Maximum players  : 301 
    = HTTP port        : 22003 
    = Voice Chat       : Disabled 
    =========================================================== 
    [2012-07-29 23:09:53] ERROR: Problem with resource: editor;  
    [2012-07-29 23:09:53] ERROR: Problem with resource: editor_main; Failed to link to freecam 
    [2012-07-29 23:09:53] ERROR: Not processing resource 'freecam' as it has duplicates on different paths: 
                      Path #1: "resources\freecam" 
                      Path #2: "resources\[editor]\freecam" 
    [2012-07-29 23:09:53] ERROR: Not processing resource 'parachute' as it has duplicates on different paths: 
                      Path #1: "resources\parachute" 
                      Path #2: "resources\[gameplay]\parachute" 
    [2012-07-29 23:09:53] ERROR: Not processing resource 'runcode' as it has duplicates on different paths: 
                      Path #1: "resources\runcode" 
                      Path #2: "resources\[admin]\runcode" 
    [2012-07-29 23:09:53] Resources: 269 loaded, 2 failed 
    [2012-07-29 23:09:53] Querying game-monitor.com master server... failed! (Not available) 
    [2012-07-29 23:09:53] Querying backup master server... failed! (Not available) 
    [2012-07-29 23:09:53] MODULE: Loaded "MySQL 5.0 database module" (0.50) by "Alberto Alonso <[email protected]>" 
    [2012-07-29 23:09:53] Starting resources.... 
    [2012-07-29 23:09:53] ERROR: exports: Call to non-running server resource (mysql) [string "?"] 
    [2012-07-29 23:09:53] WARNING: admin-system/Vehicle/s_vehicle_commands.lua [server] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
    [2012-07-29 23:09:53] WARNING: admin-system/s_check.lua [server] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
    [2012-07-29 23:09:53] WARNING: admin-system/c_check.lua [Client] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
    [2012-07-29 23:09:53] WARNING: admin-system/c_overlay.lua [Client] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
    [2012-07-29 23:09:53] Some files in 'admin-system' use deprecated functions. 
    [2012-07-29 23:09:53] Use the 'upgrade' command to perform a basic upgrade of resources. 
    [2012-07-29 23:09:53] WARNING: Script 'admin-system\Vehicle\s_vehicle_commands.lua' is not encoded in UTF-8.  Loading as ANSI... 
    [2012-07-29 23:09:53] WARNING: Script 'admin-system\s_check.lua' is not encoded in UTF-8.  Loading as ANSI... 
    [2012-07-29 23:09:54] WARNING: faction-system/c_faction_system.lua [Client] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
    [2012-07-29 23:09:54] WARNING: faction-system/s_faction_admin.lua [server] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
    [2012-07-29 23:09:54] Some files in 'faction-system' use deprecated functions. 
    [2012-07-29 23:09:54] Use the 'upgrade' command to perform a basic upgrade of resources. 
    [2012-07-29 23:09:54] WARNING: Script 'faction-system\s_faction_admin.lua' is not encoded in UTF-8.  Loading as ANSI... 
    [2012-07-29 23:09:54] ERROR: Couldn't find resource freecam. Check it exists. 
    [2012-07-29 23:09:54] Please wait... 
    [2012-07-29 23:09:57] INFO: Loaded all world items in 0ms 
    [2012-07-29 23:09:57] ERROR: Couldn't find resource parachute. Check it exists. 
    [2012-07-29 23:09:58] WARNING: shop-system/s_generalshop_system.lua [server] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
    [2012-07-29 23:09:58] Some files in 'shop-system' use deprecated functions. 
    [2012-07-29 23:09:58] Use the 'upgrade' command to perform a basic upgrade of resources. 
    [2012-07-29 23:09:58] WARNING: Script 'shop-system\s_generalshop_system.lua' is not encoded in UTF-8.  Loading as ANSI... 
    [2012-07-29 23:09:58] ERROR: shop-system\s_generalshop_system.lua:520: attempt to index local 'result' (a nil value) 
    [2012-07-29 23:10:01] ERROR: Couldn't find resource runcode. Check it exists. 
    [2012-07-29 23:10:02] WARNING: account-system/g_events.lua [server] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
    [2012-07-29 23:10:02] WARNING: account-system/g_events.lua [Client] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
    [2012-07-29 23:10:02] WARNING: account-system/s_characters.lua [server] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
    [2012-07-29 23:10:02] WARNING: account-system/c_characters.lua [Client] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
    [2012-07-29 23:10:02] WARNING: account-system/c_login.lua [Client] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
    [2012-07-29 23:10:02] WARNING: account-system/c_create_character.lua [Client] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
    [2012-07-29 23:10:02] WARNING: account-system/c_options.lua [Client] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
    [2012-07-29 23:10:02] Some files in 'account-system' use deprecated functions. 
    [2012-07-29 23:10:02] Use the 'upgrade' command to perform a basic upgrade of resources. 
    [2012-07-29 23:10:02] WARNING: Script 'account-system\g_events.lua' is not encoded in UTF-8.  Loading as ANSI... 
    [2012-07-29 23:10:02] WARNING: Script 'account-system\s_characters.lua' is not encoded in UTF-8.  Loading as ANSI... 
    [2012-07-29 23:10:02] ERROR: account-system\s_main.lua:31: attempt to index local 'motdresult' (a nil value) 
    [2012-07-29 23:10:03] ERROR: Couldn't find resource animtest. Check it exists. 
    [2012-07-29 23:10:03] Server started and is ready to accept connections! 
    [2012-07-29 23:10:03] Type 'help' for a list of commands. 
    [2012-07-29 23:10:03] Stopping global 
    [2012-07-29 23:10:18] Starting global 
    [2012-07-29 23:10:19] global restarted successfully 
    [2012-07-29 23:10:32] CONNECT: Javi connected (IP: 127.0.0.1  Serial: D7B5798C78E743D6AFF08F0B432C2602  Version: 1.3.0-9.04400.0) 
    [2012-07-29 23:10:35] JOIN: Javi joined the game (IP: 127.0.0.1) 
      
    

    server.logs in Linux Server (i can't join) 64bits (i added the mta_mysql.so module and the library libmysqlclient.so.15 in usr/lib without installing).

    ================================================================== 
    = Multi Theft Auto: San Andreas v1.3 
    ================================================================== 
    = Server name      : ((Edited to hidden server identity)) 
    = Server IP address: 37.59.73.205 
    = Server port      : 22003 
    =  
    = Log file         : ..i/service10/mods/deathmatch/logs/server.log 
    = Maximum players  : 16 
    = HTTP port        : 22005 
    = Voice Chat       : Disabled 
    = Bandwidth saving : Medium 
    ================================================================== 
    [2012-07-30 01:06:01] ERROR: [2012-07-30 01:06:01] ERROR: near "3": syntax error 
    [2012-07-30 01:06:01] ERROR: Errors were encountered loading 'internal.db' database 
    [2012-07-30 01:06:01] ERROR: Maybe now is the perfect time to panic. 
    [2012-07-30 01:06:01] ERROR: See - [url=https://wiki.multitheftauto.com/wiki/fixdb]https://wiki.multitheftauto.com/wiki/fixdb[/url] 
    [2012-07-30 01:06:01] ERROR: ************************ 
    [2012-07-30 01:06:02] Resources: 91 loaded, 0 failed 
    [2012-07-30 01:06:02] Querying game-monitor.com master server... success! 
    [2012-07-30 01:06:02] Querying backup master server... success! 
    [2012-07-30 01:06:02] MODULE: Loaded "MySQL 5.0 database module" (0.50) by "Alberto Alonso <[email protected]>" 
    [2012-07-30 01:06:02] Starting resources.... 
    [2012-07-30 01:06:02] ERROR: exports: Call to non-running server resource (mysql) [string "?"] 
    [2012-07-30 01:06:02] WARNING: admin-system/c_check.lua [Client] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
    [2012-07-30 01:06:02] WARNING: admin-system/c_overlay.lua [Client] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
    [2012-07-30 01:06:02] Some files in 'admin-system' use deprecated functions. 
    [2012-07-30 01:06:02] Use the 'upgrade' command to perform a basic upgrade of resources. 
    [2012-07-30 01:06:03] WARNING: faction-system/c_faction_system.lua [Client] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
    [2012-07-30 01:06:03] WARNING: faction-system/s_faction_admin.lua [server] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
    [2012-07-30 01:06:03] Some files in 'faction-system' use deprecated functions. 
    [2012-07-30 01:06:03] Use the 'upgrade' command to perform a basic upgrade of resources. 
    [2012-07-30 01:06:03] WARNING: Script 'faction-system/s_faction_admin.lua' is not encoded in UTF-8.  Loading as ANSI... 
    [2012-07-30 01:06:03] SCRIPT ERROR: faction-system/s_faction_admin.lua:1: unexpected symbol near '?' 
    [2012-07-30 01:06:03] WARNING: Loading script failed: faction-system/s_faction_admin.lua:1: unexpected symbol near '?' 
    [2012-07-30 01:06:03] Please wait... 
    [color=#FF0000]I spotted the logs difference here but i dont know what can i do...[/color] 
    [2012-07-30 01:06:03] INFO: MYSQL ERROR 1054: Unknown column 'protected' in 'where clause' 
    [2012-07-30 01:06:03] ERROR: exports: Call to non-running server resource (logs) [string "?"] 
    [2012-07-30 01:06:03] ERROR: item-world/s_load_items.lua:41: bad argument #1 to 'mysql_rows' (mysqlResult expected, got nil) 
    [2012-07-30 01:06:04] WARNING: shop-system/s_generalshop_system.lua [server] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
    [2012-07-30 01:06:04] Some files in 'shop-system' use deprecated functions. 
    [2012-07-30 01:06:04] Use the 'upgrade' command to perform a basic upgrade of resources. 
    [2012-07-30 01:06:04] WARNING: Script 'shop-system/s_generalshop_system.lua' is not encoded in UTF-8.  Loading as ANSI... 
    [2012-07-30 01:06:04] SCRIPT ERROR: shop-system/s_generalshop_system.lua:1: unexpected symbol near '?' 
    [2012-07-30 01:06:04] WARNING: Loading script failed: shop-system/s_generalshop_system.lua:1: unexpected symbol near '?' 
    [2012-07-30 01:06:04] WARNING: account-system/g_events.lua [server] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
    [2012-07-30 01:06:04] WARNING: account-system/g_events.lua [Client] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
    [2012-07-30 01:06:04] WARNING: account-system/s_characters.lua [server] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
    [2012-07-30 01:06:04] WARNING: account-system/c_characters.lua [Client] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
    [2012-07-30 01:06:04] WARNING: account-system/c_login.lua [Client] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
    [2012-07-30 01:06:04] WARNING: account-system/c_create_character.lua [Client] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
    [2012-07-30 01:06:04] WARNING: account-system/c_options.lua [Client] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
    [2012-07-30 01:06:04] Some files in 'account-system' use deprecated functions. 
    [2012-07-30 01:06:04] Use the 'upgrade' command to perform a basic upgrade of resources. 
    [2012-07-30 01:06:04] WARNING: Script 'account-system/g_events.lua' is not encoded in UTF-8.  Loading as ANSI... 
    [2012-07-30 01:06:04] SCRIPT ERROR: account-system/g_events.lua:1: unexpected symbol near '?' 
    [2012-07-30 01:06:04] WARNING: Loading script failed: account-system/g_events.lua:1: unexpected symbol near '?' 
    [2012-07-30 01:06:04] WARNING: Script 'account-system/s_characters.lua' is not encoded in UTF-8.  Loading as ANSI... 
    [2012-07-30 01:06:04] SCRIPT ERROR: account-system/s_characters.lua:1: unexpected symbol near '?' 
    [2012-07-30 01:06:04] WARNING: Loading script failed: account-system/s_characters.lua:1: unexpected symbol near '?' 
    [2012-07-30 01:06:04] WARNING: account-system/s_news.lua:2: Bad argument @ 'callRemote' [Expected string at argument 1, got nil] 
      
    

    What can i do? Thanks so much.

×
×
  • Create New...