Jump to content

βurak

Members
  • Posts

    376
  • Joined

  • Last visited

  • Days Won

    22

Everything posted by βurak

  1. βurak

    Table

    not sure but try using table.remove local tables = { [1] = {}, [2] = {}, [3] = {}, } table.remove(tables, 2) --remove 2. nested table for i,v in ipairs(tables) do print(i,v) end --[[ --normally 1 table: 0x5598d3662e90 2 table: 0x5598d3661670 3 table: 0x5598d36616b0 -- after table remove 1 table: 0x555c01b1c6b0 2 table: 0x555c01b1c6f0 ]]--
  2. βurak

    Map Editor

    I'm not sure, but try double-clicking in the editor and make "double sided" true
  3. You're welcome. if you open more threads i will help you as much as i can ?
  4. I haven't tested it but it could be something like this you will need to call the loadPlayerMoney function local db_name = "your db name" --fill your info local db_host = "localhost" local db_user = "your username" --fill your info local db_pass = "your password" --fill your info local DbConnection = dbConnect("mysql", "dbname="..db_name..";host="..db_host..";charset=utf8", db_user, db_pass, "share=1") function loadPlayerMoney(player) local _player = player local playerNick = getPlayerName(_player) dbQuery( function(query, player) local result = dbPoll(query, 0) if(#result <= 0) then return end --if result table 0 dont go for _,data in pairs(result) do setPlayerMoney(player, data["money"]) --set money break end end,{_player}, DbConnection, "SELECT money FROM users WHERE nickname=? LIMIT 1", playerNick) end
  5. βurak

    [HELP]

    can you show the code?
  6. βurak

    [HELP]

    are you calling this event or function somewhere? because if that's the whole code it doesn't do anything because it needs to be called
  7. βurak

    [HELP]

    you can use a variable you set it to false by default if true you can draw anything you want If you want to show it to another player, you can run the setVisible event with triggerClientEvent if you want to do it from the server side, if it is on the client side, just set the visible variable to true by the way, the player parameter in the triggerClientEvent may vary depending on where you use it, for example, it becomes "source" in the onPlayerWasted event local visible = false function render() if(visible) then dxDrawRectangle(300, 300, 50, 50) end end addEventHandler("onClientRender", root, render) addEvent("setVisible",true) addEventHandler("setVisible",root, function(value) visible = value end ) --server triggerClientEvent(player, "setVisible", player, true) --show someone the rectangle
  8. βurak

    [HELP]

    do you have the rest of the code? there are uncertainties here
  9. βurak

    [HELP]

    When there is something you do not know, open a topic, I will help you as much as I can.
  10. βurak

    [HELP]

    local validVehicles = { [596] = true, [597] = true, --continue from here you want [vehicleid] = true } addEventHandler("onClientVehicleEnter", root, function(thePed, seat) local vehid = getElementModel(source) local playerskin = getElementModel(localPlayer) if (not validVehicles[vehid]) then return end if (playerskin == 280) then playSound("beep.mp3") outputChatBox("#898c8f<<#2c469cNeXoN Roleplay#898c8f>> #0f5720Sikeress belépés", 255, 255, 255, true) PDMenu = true else playSound("beep.mp3") outputChatBox("#898c8f<<#2c469cNeXoN Roleplay#898c8f>> #0f5720Sikertelen belépés", 255, 255, 255, true) end end)
  11. yes it worked now thank you I always make mistakes like this ?
  12. Thanks for writing to my post, I tried what you said, but when I attach the object to the vehicle, the object does not move, but if I do not attach it, here is the code local hunter = createVehicle(487,0,0,3) local hx,hy,hz = getElementPosition(hunter) local theObject = createObject(1337,hx,hy,hz) attachElements(theObject,hunter) setElementCollisionsEnabled(theObject,false) moveObject(theObject,10000,hx,hy,hz+20) --does nothing
  13. I need to move a vehicle in the same way as moveObject moves objects, that is, it will move from the current position to the target within a certain time. how do i do this?
  14. On which side are the objects created, server or client?
  15. hi here i made an example --client local theObject = createObject(18450, 0, 0, 2) --test object addEvent("destroyObject", true) addEventHandler("destroyObject", root, function() destroyElement(theObject) --destroy theObject end ) --server triggerClientEvent(root, "destroyObject", root) --destroy theObject object for everyone addCommandHandler("destroyobject", function(player) triggerClientEvent(player, "destroyObject", player) -- destroy that object for the person who wrote this command end )
  16. solved it was fixed after reloading with engineLoadTXD
  17. hello here I have two custom textures on the left my special model but the game model on the right although they both have the same texture my object's textures look bad what is the reason for this https://imgyukle.com/f/2022/12/16/JBLLMt.png here my object on the left looks noisy
  18. can you try this on server side addCommandHandler("emoji", function(player) local x,y,z = getElementPosition(player) -- get x,y,z position who used player emoji command local nearbyPlayers = getElementsWithinRange(x, y, z, 100, "player") -- get players 100 range for _,player in ipairs(nearbyPlayers) do triggerClientEvent(player, "Emoji5:activarEfecto", root, OnEnmojiRender) -- send them so they can see this effect end end )
  19. can you try this please triggerClientEvent(root, "Emoji5:activarEfecto", source, OnEnmojiRender) or try this triggerClientEvent(root, "Emoji5:activarEfecto", root, OnEnmojiRender)
  20. Problem Solved The problem of not sending email is because gmail does not have "2-step verification" enabled. For php warnings, it is necessary to check the array with isset. <?php include("sdk/mta_sdk.php"); $input = mta::getInput(); if(isset($input[0]) && isset($input[1]) && isset($input[2]) && isset($input[3])) { $resetMail = mail($input[0], $input[2], $input[3], "From: ".$input[1]."\n" . "Content-Type: text/html; charset=iso-8859-1\n"); if($resetMail){ mta::doReturn("Success"); } else{ mta::doReturn("Failed"); } } ?>
  21. other errors are gone but now it gives error like this and the mail is still not coming php: <?php require_once 'C:\Users\Burak2346\vendor\autoload.php'; use MultiTheftAuto\Sdk\Mta; $input = Mta::getInput(); mail($input[0], $input[2], $input[3], "From: ".$input[1]."\n" . "Content-Type: text/html; charset=iso-8859-1\n"); ?>
  22. I want to send an email from the lua script, it says it was sent successfully, but the email is not received. server: local allowed = {{48, 57}, {65, 90}, {97, 122 }} function generateString (len) if tonumber (len) then math.randomseed(getTickCount()) local str = "" for i = 1, len do local charlist = allowed[math.random( 1, 3 )] str = str .. string.char (math.random(charlist[1], charlist[2] )) end return str end return false end function sendMailTo (mail, sender, headertext, text) callRemote ("http://localhost/mail.php", EMailAccepted, mail, sender, headertext, text) end function EMailAccepted () outputDebugString ("E-Mail was succesfully sended." ) end addCommandHandler("sendmail", function() local resetKey = generateString(12) sendMailTo("[email protected]", "[email protected]", "Password Reset", "Here your password reset code: "..resetKey) end) php: <?php require_once 'C:\Users\Burak2346\vendor\autoload.php'; $input = mta::getInput(); mail($input[0], $input[2], $input[3], "From: ".$input[1]."\n" . "Content-Type: text/html; charset=iso-8859-1\n"); ?>
  23. hi you can try this but i didn't test it --Client addEvent("playWinSound", true) addEventHandler("playWinSound", root, function(soundFile) local sound = playSound(soundFile) --play the sound file that comes as a parameter setSoundVolume(sound, 1) setSoundMaxDistance(sound, 100) end ) --server function multi_sounds(player, commandName, soundType) if not (soundType) then return outputChatBox("You must be enter sound type.", player) end --if the player has not entered the soundType, exit immediately if(soundType == "cops") then --if soundType is "cops" enter here triggerClientEvent(player, "playWinSound", player, "sirens.mp3") elseif(soundType == "robbers") then --if soundType is "robbers" enter here triggerClientEvent(player, "playWinSound", player, "gangsters.mp3") end end addCommandHandler("win", multi_sounds)
  24. βurak

    setTimer

    You can do it this way. It works once after 3 seconds. You can enter the value you want in milliseconds. addEventHandler("onVehicleExplode", root, function() setTimer(function(source) destroyElement(source) end, 3000, 1, source) --run after 3 seconds end)
  25. I'm not sure but maybe you can give the object a value of -1 setElementDimension(object, -1) -- make visible all dimensions
×
×
  • Create New...