-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
That idea still has the problem I mentioned above.
-
He can, but the cursor won't move like it does in a edit box.
-
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.
-
addEvent ( "onLogin", true ) addEventHandler ( "onLogin", root, function ( state, haveGang, gangName, isOwner ) if ( state ) then guiCreateGangPanel ( ) end end ) Maybe you wanted that?
-
When are you executing "guiCreateGangPanel"? maybe you are binding it twice.
-
--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
-
Comments which ain't even bumping the topic isn't against the rules.
-
Ah, well, there you see how it is.
-
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
-
He said ammo including clip, getPedTotalAmmo includes clip.
-
getPedWeapon getPedTotalAmmo
-
You encrypt what the client sent and compare it with the saved password.
-
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.
-
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 )
-
-- 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 )
-
He's not using the MTA account system.
-
It's attachElements, not attachElement.
-
Well, you are checking if all the players are in a vehicle, then play the sound.
-
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.
-
You can use element data, yes.
-
Trigger a client side event from the server side using triggerClientEvent.
-
That script will create 1 blip every render.
