Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. playSound3D is a client side only function, you can't use it in the server side. The only way to sync the sound for everyone is to trigger like you did, but instead of using playSound3D, you must trigger a client side event using triggerClientEvent to everyone, then in the client side you add the event to play the sound.
  2. Oh well, if you want to use a own database file, then you must use the dbExec, dbQuery and dbPoll functions. Check the wiki links for each, they all got examples.
  3. But what do you mean by "database"? is it a SQL database file?
  4. You can't load a script file as a config file. What is the content of "Driftdatabase.lua"?
  5. Yes, that's the correct syntax for teaDecode, I just tested it. If I understood correctly, you want to use this encryption method just to save the password for your login system, so you don't have to write the password each time, I guess these should do just fine.
  6. If I'm correct, you are trying to load a script as a config file, which is wrong. Post your meta.xml.
  7. We aren't here to fix your scripts just because you ask us, what we do here is help you find the problem and help you fix it. So, as Snow-Man asked, does the debugscript ( /debugscript 3 ) show any sort of error?
  8. XML is another thing, which can also be used to save the drift points. Few SQLite examples: Create table: executeSQLQuery ( "CREATE TABLE IF NOT EXISTS drift_points ( accountName TEXT, points INT )" ) Insert row to table: executeSQLQuery ( "INSERT INTO drift_points ( accountName, points ) VALUES ( ?, ? )", "Castillo", 500 ) Update row: executeSQLQuery ( "UPDATE drift_points SET points = ? WHERE accountName = ?", 600, "Castillo" )
  9. You could use SQLite/MySQL to store the drift points. Functions: executeSQLQuery -- SQLite only. Or: MySQL & SQLite: dbExec dbQuery dbPoll
  10. The problem with Dealman's script is that he's checking if hitElement is equal to 3458, but it won't work, because hitElement is a element, not a number. So, you must first check if the element is valid using isElement and then use getElementModel to obtain the element model. function blowOnCollisionWithModel_Handler ( hitElement ) if ( source ~= getPedOccupiedVehicle ( localPlayer ) ) then if ( isElement ( hitElement ) and getElementModel ( hitElement ) == 3458 ) then blowVehicle ( source ) end end end addEventHandler ( "onClientVehicleCollision", getRootElement(), blowOnCollisionWithModel_Handler )
  11. No podes cancelar el daño server side, solo client side.
  12. There isn't. You can make just a resource which has the vehicle names and export a function.
  13. Hide the image after you create it. addEventHandler ( "onClientResourceStart", gResRoot, function ( ) imag = guiCreateStaticImage ( 0.505, 0.378, 0.05, 0.05, "head.png", true ) guiSetVisible ( imag, false ) end )
  14. Podrias usar getVehicleOccupant para obtener el/los ocupantes.
  15. Castillo

    [Fixed][Ty]

    I just tested it and it works fine, I'm testing with two players, if both go AFK, in /afklist it shows both names.
  16. Castillo

    [Fixed][Ty]

    Post the code for the "/afklist" command.
  17. Castillo

    [Fixed][Ty]

    I don't understand the problem, could you explain it again?
  18. Castillo

    [Unsolved]Bug

    You can store the current station index when the player leaves the vehicle, and when he re-enters, see if the variable contains a value, then load it.
  19. Castillo

    [Unsolved]Bug

    For that event, what you defined as "player" in the function arguments is the vehicle, not the player. Use "source" instead.
  20. How many blips are being created? if it's more than one, then the variable will be overwritten. P.S: You aren't checking if "veh" is equal to "source", which is the element that was destroyed.
  21. Castillo

    [Unsolved]Bug

    Errors in debugscript? Why do you use setElementPosition? you can attach the sound to the player.
  22. Castillo

    AFK list

    That's because getPlayerFromName obtains a player userdata from it's name. You must use getElementsByType instead.
  23. trigger*Event lo unico que hace es devolver true o false, no podes hacer que devuelva un resultado especifico.
  24. You must use that event and the following functions: getElementModel -- To check if the object is X model. blowVehicle -- To blow the vehicle.
×
×
  • Create New...