Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. That idea still has the problem I mentioned above.
  2. He can, but the cursor won't move like it does in a edit box.
  3. Castillo

    bindKey bug?

    addEvent ( "onLogin", true ) addEventHandler ( "onLogin", root, function ( haveGang, gangName, isOwner ) guiCreateGangPanel ( ) outputChatBox ( "guiCreateGangPanel" ) end ) Put that and see how many times does it output "guiCreateGangPanel" to the chat box.
  4. Castillo

    bindKey bug?

    addEvent ( "onLogin", true ) addEventHandler ( "onLogin", root, function ( state, haveGang, gangName, isOwner ) if ( state ) then guiCreateGangPanel ( ) end end ) Maybe you wanted that?
  5. Castillo

    bindKey bug?

    When are you executing "guiCreateGangPanel"? maybe you are binding it twice.
  6. --triggers a function to the closest player of a ped to find the closest node point in sight, which in return gives the next function down the info to start on the right path function findPath ( ped ) if isElement ( ped ) then local allwaypoints = getElementsByType ( "pathpoint" ) if #allwaypoints > 2 then if (isElement(getElementData(ped,"controller"))) then triggerClientEvent ( "pedPathfind", getElementData(ped,"controller"), ped) end else setElementData ( ped, "target", nil ) ---Linea 487 setElementData ( ped, "leader", nil ) assigncontroller(ped) setElementData ( ped, "status", "waiting" ) end end end
  7. Castillo

    The bug

    It must be that they don't have a spawn system loaded.
  8. Comments which ain't even bumping the topic isn't against the rules.
  9. Ah, well, there you see how it is.
  10. By objects you mean actual objects created by createObject? if so, then you can do: local object = myTable [ 6 ] if isElement ( object ) then local x, y, z = getElementPosition ( object ) end
  11. He said ammo including clip, getPedTotalAmmo includes clip.
  12. getPedWeapon getPedTotalAmmo
  13. Castillo

    Logging in

    You encrypt what the client sent and compare it with the saved password.
  14. Castillo

    Logging in

    function login_func ( player, username, password) local query = dbQuery ( connect, "SELECT username, password FROM accounts WHERE username = ?", username ) if ( query ) then local data, rows = dbPoll ( query, -1 ) if ( rows == 1 ) then if ( data [ 1 ].password == password ) then setElementData ( player, "LoggedIN", true ) outputChatBox ( "Du hast dich erfolgreich eingeloggt!",player, 0, 125, 0 ) outputChatBox ( "Willkommen zurück, "..string.gsub ( getPlayerName ( player ), '#%x%x%x%x%x%x', '' ), player, 0, 125, 0 ) triggerClientEvent ( player, "closeLoginPanel", player ) end end else outputChatBox("Error 404 : Dein Benutzername oder dein Passwort ist falsch!",player,125,0,0) end end addEvent ( "LoginRequest", true ) addEventHandler ( "LoginRequest", getRootElement(), login_func ) P.S: You should encrypt the passwords with sha256.
  15. Castillo

    Logging in

    dbQuery(connect,"INSERT INTO accounts(name, password) VALUES (username, password)") 1: Use dbExec for INSERT queries. 2: That query is wrong, it should be: dbExec ( connect, "INSERT INTO accounts ( name, password ) VALUES ( ?, ? )", username, password )
  16. Castillo

    playSound3D

    -- client side: addEvent ( "bassOn", true ) addEventHandler ( "bassOn", root, function ( veh ) local x, y, z = getElementPosition ( veh ) local sound1 = playSound3D ( "sounds/sound.mp3", x, y, z, true ) setSoundVolume ( sound1, 0.7 ) setSoundMaxDistance ( sound1, 40 ) attachElements ( sound1, veh ) end ) addEvent ( "bassOff", true ) addEventHandler ( "bassOff", root, function ( veh ) local elements = getAttachedElements ( veh ) if ( #elements > 0 ) then for _, sound in ipairs ( elements ) do if ( getElementType ( sound ) == "sound" ) then destroyElement ( sound ) end end end end ) -- server side: addCommandHandler ( "hardbasson", function ( player ) local veh = getPedOccupiedVehicle ( player ) if ( veh ) then triggerClientEvent( "bassOn", root, veh ) end end ) addCommandHandler ( "hardbassoff", function ( player ) local veh = getPedOccupiedVehicle ( player ) if ( veh ) then triggerClientEvent ( "bassOff", root, veh ) end end )
  17. Castillo

    Logging in

    He's not using the MTA account system.
  18. Castillo

    playSound3D

    It's attachElements, not attachElement.
  19. Castillo

    playSound3D

    Well, you are checking if all the players are in a vehicle, then play the sound.
  20. Castillo

    Logging in

    Use a "SELECT" query.
  21. Castillo

    playSound3D

    Post the client side, I take it that you have added "bassOn" and "bassOff" events? Also, if you put "player" at triggerClientEvent, it'll only trigger it to the player who used the command.
  22. Castillo

    Logging in

    You can use element data, yes.
  23. Castillo

    playSound3D

    Trigger a client side event from the server side using triggerClientEvent.
  24. That script will create 1 blip every render.
×
×
  • Create New...