Jump to content

Search the Community

Showing results for tags 'scripting'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Member Title


Gang


Location


Occupation


Interests

  1. Eu tenho um pequeno problema, na hora de entrar no veículo depois de pegar o personagem, o veículo começa a voar, eu preciso de ajuda e se eu sou novo nesse Scripting. Preciso de sua ajuda. function AgarrarSoltar(source, target) local ID = getElementData(target , config['serverInfo']['id']) or 0 local rotpX = 90 local rotpY = 0 local rotpZ = getElementRotation(target) local rotvX,rotvY,rotvZ = getElementRotation(source) local rotX = rotpX - rotvX local rotY = rotpY - rotvY local rotZ = rotpZ - rotvZ local Agarrado = getElementData(target, "SS:Agarrado") or false if Agarrado == false then attachElementToElement(target, source, 0, 0.4 , 0.3 , rotX, rotY, rotZ) setElementData(target,"SS:Agarrado",true) setPedAnimation(source, "CARRY", "crry_prtial", 0, false, false, false, false) setPedAnimation(target, "ped", "CAR_dead_LHS", false, false) exports["CzInventory"]:sendNotification(source, "info", "Agarraste "..removeHex(getPlayerName(target)).." ["..(getElementData(target, config['serverInfo']['id']) or 0).."].") else detachElementFromElement(target, source, 0, 0.4 , 0.3 , rotX, rotY, rotZ) setElementData(target,"SS:Agarrado",false) setPedAnimation(target) exports["CzInventory"]:sendNotification(source, "info", "Soltaste"..removeHex(getPlayerName(target)).." ["..(getElementData(target, config['serverInfo']['id']) or 0).."].") end end addEvent ( "SS:Agarrar", true ) addEventHandler ( "SS:Agarrar", root, AgarrarSoltar)
  2. fikasS

    mysql error

    Hi, I have a little problem! dbPoll failed; The "character names" field has no default value First of all, what is its default value? because this is an outdated mysql that was perfected 5 years ago. dbquery, db_free db_pool functions. Thank you in advance for your help. CODE: local hostname = "127.0.0.1" local username = "...username" local password = ".....pass" local database = "databasename" local results = {} addEventHandler("onResourceStart", resourceRoot, function() dbHandler = dbConnect("mysql","dbname=".. database ..";host="..hostname, username, password, "autoreconnect=1") if not dbHandler then outputDebugString("#1 failed connect") cancelEvent(true) else outputDebugString("#2 succesful connect") end end) function query_free(q,poll) local this = #results + 1 results[this] = dbQuery(dbHandler, q) if poll then local result, num_affected_rows, last_insert_id = dbPoll(results[this], -1) if result == nil then dbFree(results[this]) return this, nil elseif result == false then dbFree(results[this]) return this, nil else dbFree(results[this]) return this, tonumber(last_insert_id) end end dbFree(results[this]) return this end function getConnection() return dbHandler end
  3. Galera to fazendo um sistema de painel q vc digita no painel tipo 255, 0, 0 dentro de um carro e seta a cor vermelha no carro q e do rgb 255, 0, 0 e etc. mas da forma que achei que era possivel ao abrir o painel e digitar a cor em rgb eu fiz uma função que na teoria era pra pegar oq foi digitado na editbox e setar oq foi digitado na editbox como cor do carro usando setVehicleColor so q n aparece nada e n seta cor no carro mais se o carro ta vermelho e coloca tipo 255, 0, 0 na editbox e da ok a cor sempre muda pra preto espero q de para entender function SetarCor (playerSource, getMsg) --local mensagem = tonumber(getMsg) local uVehicle = getPedOccupiedVehicle( playerSource ) if isPedInVehicle( playerSource ) then if uVehicle then -- if mensagem == "Vermelho" then setVehicleColor( uVehicle, tonumber(getMsg)) end end --end end addEvent("SetarCor", true) addEventHandler("SetarCor", getRootElement(), SetarCor) PARTE DO CLIENT function rgbtrigger (button, state) if painel == true then if button == "left" and state == "down" then if isCursorOnElement(screenW * 0.6384, screenH * 0.5885, screenW * 0.7379, screenH * 0.6185) then local getMsg = tostring(getElementData(msgstaff, "CMT_Txt")) removeEventHandler("onClientRender", root, dx) triggerServerEvent("SetarCor", getLocalPlayer(), localPlayer, getMsg) painel = false showCursor(false) end end end end addEventHandler("onClientClick", root, rgbtrigger)
  4. Hello, this is my problem: I made a cigarette system for my server but I've been testing it and I found only 1 problem, when the player "spams" the command "/smoke" the part where the object it's deleted doesn't work corectly and DO NOT delete the object. How could I solve this? The part where the system deletes the object: setPedAnimation(thePlayer, "-", "-",false,false,false,false) local cancelsmoke = setTimer(function() exports.pAttach:detach(smoking,thePlayer) destroyElement(smoking) iprint("Destroyed") end, 2500, 1) If the player puts the command it works, the bug only happens when the player spam the command
  5. I've been trying to save the position of the player's character and it saves... but in a new table, not in the main one where its the account's name, the character's name and the rest. -> This is what happens<- This is the code I'm using for the "character money, position, and health" // i translated some concepts to english so you can understand easly what I'm trying to make: (server-side) function saveDataCharacter() local x, y, z = getElementPosition(source) local money = getPlayerMoney(source) local health = getElementHealth(source) local sendInfo = exports.mysql:_Exec("INSERT INTO characters (x,y,z, money, health) VALUES (?,?,?,?,?)", x, y, z, money, health) if (sendInfo) then iprint("Data saved") else iprint("Error saving") end end end addEventHandler("onPlayerQuit", getRootElement(), saveDataCharacter)
  6. Well, it's too late to delete it, so if a mod or admin see this, please delete this or move it, I solved the problem
  7. I made a login menu for my server, I wanted to put some buildings as a background so I used setCameraMatrix, all works perfectly, but when I try to cancel the camera position and the music (I added playSound too) it doesn't work and the camera keeps far from the player, and the music keeps playing Client-Side function fondoLogin(thePlayer) local cancion = playSound("loginSoundtrack.mp3") setSoundVolume(cancion, 0.5) setElementPosition(thePlayer, -1400.2099609375,106.88999938965,1032.2734375) setElementInterior(thePlayer, 1) setCameraMatrix ( 1709.7098388672,-1449.96484375,151.87727355957, 1537.9990234375,-1276.736328125,238.57434082031, 0, 100 ) triggerServerEvent(source, "parartodo", source) end addEvent("posicionar", true) addEventHandler("posicionar", getLocalPlayer(), fondoLogin) ---------Suposed to stops the music and cameraMatrix---------------- function parartodo(thePlayer, cancion) setCameraTarget (thePlayer) stopSound(cancion) end addEvent("pararmusicaycamara", true) addEventHandler("pararmusicaycamara", getLocalPlayer(), parartodo) Server-Side function registroHRP(user, clavecreada) if(addAccount(user, clavecreada))then outputChatBox("Bienvenido") triggerClientEvent(source, "cerrar", source) logIn(source, getAccount(user, clavecreada), clavecreada) setElementPosition(source, 209.41818237305,-33.872188568115,1001.9296875) setElementInterior(source, 1) setElementDimension(source, 1) setPedRotation(source, 180) triggerClientEvent(source, "pararmusicaycamara", source) else outputChatBox("La cuenta ya existe.") end end -----------"triggerClientEvent(source, "pararmusicaycamara", source)" doesn't work--------------
  8. I have been editing a vehicle script to make it work in a RP but I have a problem when executing the command to lock the vehicle, it locks perfectly from the outside, nobody can enter unless the owner unlocks the vehicle, but the problem is that if the owner locks inside, you can still go out. I did some research and found that something could be done with cancelEvent and "onClientVehicleStartExit", I've tried everything but nothing seems to work for me with that command, any advice? This is the code: function setPlayerVehicleLocked(player, vehicle) local vehname = vehicle:getName() if (vehicle:getData("vehicles:locked") == 1) then vehicle:setData("vehicles:locked", 0) vehicle:setLocked(false) player:outputChat("Desbloqueaste tu "..vehname..".", 214, 37, 37) connection:exec("UPDATE vehicles SET locked=? WHERE id=? AND owner=?", 0, vehicle:getData("vehicles:id"), vehicle:getData("vehicles:owner")) elseif (vehicle:getData("vehicles:locked") == 0) then vehicle:setData("vehicles:locked", 1) vehicle:setLocked(true) player:outputChat("Bloqueaste tu "..vehname..".", 141, 229, 22) connection:exec("UPDATE vehicles SET locked=? WHERE id=? AND owner=?", 1, vehicle:getData("vehicles:id"), vehicle:getData("vehicles:owner")) end end function onclientVehicleStartExit() if (vehicle:getData("vehicles:locked") == 0) then cancelEvent(onVehicleStartExit) end end ("onclientVehicleStartExit", root, onVehicleStartExit)
  9. Hello guys I recently had ideas for setting up a server in MTA. I heard a bit about lua and its characteristics. I wanted to know what programming languages are needed to set up a game server in MTA and manage it from beginner to professional. thank you.
  10. I'm having trouble creating a gun shop But when I press b4 (buy m4) on GUI I face a problem And he says to me Client triggered server side event, but event is not added servers Client triggered server side event givem4, but event is not added serverside GUIEditor = { button = {}, staticimage = {}, label = {} } yoyoWnd = guiCreateWindow(114, 139, 575, 311, "gun panel ~~~ by Yoyo", false) guiWindowSetSizable(yoyoWnd, false) guiSetProperty(yoyoWnd, "CaptionColour", "FFFE0505") guiSetVisible(yoyoWnd,false) GUIEditor.staticimage[1] = guiCreateStaticImage(10, 21, 67, 62, ":metaa/img/32.png", false, yoyoWnd) GUIEditor.staticimage[2] = guiCreateStaticImage(254, 21, 69, 62, ":metaa/img/29.png", false, yoyoWnd) GUIEditor.staticimage[3] = guiCreateStaticImage(-241, 0, 70, 59, ":metaa/img/30.png", false, GUIEditor.staticimage[2]) GUIEditor.staticimage[4] = guiCreateStaticImage(496, 21, 69, 62, ":metaa/img/27.png", false, yoyoWnd) GUIEditor.staticimage[5] = guiCreateStaticImage(10, 125, 67, 61, ":metaa/img/30.png", false, yoyoWnd) GUIEditor.staticimage[6] = guiCreateStaticImage(256, 125, 67, 61, ":metaa/img/31.png", false, yoyoWnd) GUIEditor.staticimage[7] = guiCreateStaticImage(10, 240, 67, 61, ":metaa/img/22.png", false, yoyoWnd) GUIEditor.staticimage[8] = guiCreateStaticImage(496, 240, 69, 60, ":metaa/img/23.png", false, yoyoWnd) GUIEditor.staticimage[9] = guiCreateStaticImage(496, 125, 65, 61, ":metaa/img/33.png", false, yoyoWnd) b1 = guiCreateButton(10, 83, 67, 21, "uzi", false, yoyoWnd) guiSetProperty(b1, "NormalTextColour", "FF6CFE00") b2 = guiCreateButton(257, 83, 67, 21, "mp5", false, yoyoWnd) guiSetProperty(b2, "NormalTextColour", "FF6CFE00") b3 = guiCreateButton(498, 83, 67, 21, "spas", false, yoyoWnd) guiSetProperty(b3, "NormalTextColour", "FF6CFE00") b4 = guiCreateButton(256, 186, 67, 21, "m4", false, yoyoWnd) guiSetProperty(b4, "NormalTextColour", "FF6CFE00") b5 = guiCreateButton(10, 186, 67, 21, "ak-47", false, yoyoWnd) guiSetProperty(b5, "NormalTextColour", "FF6CFE00") b6 = guiCreateButton(496, 186, 67, 21, "lancher", false, yoyoWnd) guiSetProperty(b6, "NormalTextColour", "FF6CFE00") GUIEditor.button[1] = guiCreateButton(77, 261, 71, 23, "", false, yoyoWnd) b8 = guiCreateButton(77, 261, 71, 23, "pistole", false, yoyoWnd) guiSetProperty(b8, "NormalTextColour", "FF6CFE00") b10 = guiCreateButton(425, 260, 71, 23, "Silenced", false, yoyoWnd) guiSetProperty(b10, "NormalTextColour", "FF6CFE00") GUIEditor.label[1] = guiCreateLabel(151, -51, 46, 35, "", false, yoyoWnd) cl = guiCreateButton(240, 258, 98, 35, "close", false, yoyoWnd) guiSetProperty(cl, "NormalTextColour", "FFFF0000") function yoyo () guiSetVisible (yoyoWnd,true) showCursor (true) end bindKey ( "F6","down",yoyo) addEventHandler ("onClientGUIClick",root, function() if ( source == cl ) then guiSetVisible ( yoyoWnd , false) showCursor ( false ) end end ) function buym4() if ( source == b4) then showCursor(false) guiSetVisible(window1,false) triggerServerEvent("givem4", localPlayer) end end addEventHandler("onClientGUIClick", root, buym4) function buym4() local playerMoney = getPlayerMoney(source) if (playerMoney >= 40000) then takePlayerMoney(source,40000) giveWeapon(source,31,200) end end addEvent("givem4",true) addEventHandler("givem4", root, buym4) function buym4() if ( source == b4) then showCursor(false) guiSetVisible(window1,false) triggerServerEvent("givem4", localPlayer) end end addEventHandler("onClientGUIClick", root, buym4) HELP PLSSS
  11. Hi, im trying to prevent player from putting off crate, please help me if you know how to fix it. thats how crate is attached to fork: [lua] skrzynieGraczy[client] = createObject(obiekty[praca].idObiektu, 0, 0, 0) setElementCollisionsEnabled(skrzynieGraczy[client],false) setElementFrozen(skrzynieGraczy[client],true) stopObject(skrzynieGraczy[client]) attachElements(skrzynieGraczy[client],wozkiGraczy[client],0,0.5,0.3,0,0,0) [/lua] Here is video that showing my problem: https://gyazo.com/ff5ab17194ce5a99b0c8f972ce20c5fc
  12. Mas não consigo, algo da errado no 'isElementInRange', alguém poderia me ajudar? addCommandHandler("car", function(thePlayer,veh) local x, y, z = getElementPosition (thePlayer) local veh = getElementsByType('vehicle') if isElementInRange(veh, x, y, z, 25) then outputChatBox("teste",thePlayer,255,255,255,true) end end end ) Print do erro: https://prnt.sc/12bhy03
  13. Anyone can send me a working yt mp3 converter API? Or how to create one, to play music from youtube on my server?
  14. Map loader This is a map loader, which can let specific players download a map of choice. Maps will be generated clientside and the resource is capable of loading extreme large maps. Loading the map will be done with a speed the pc can handle. The code execution time will be reduced to circa 10 ms. Which is the frame time of a player with 100 fps. So technically when you have 100 fps you still have 98/100 fps when this resource is loading a map. But this is based on running only this resource and based on predictions/knowledge. Which you can't trust... The .map files are unloaded afterwards reading them. But the resource will keep a buffer of the processed data until no more players are using that map. This will speed up the resource when it is used for multiply players. The resource can be managed with the following functions (serverside): loadMapForTarget() Require: element player/root, string mapName Returns: boolean success, string message unloadMapForTarget() Require: element player/root, string mapName Returns: boolean success, string message getPlayerDownloadProgress() Require: element player Returns: int percentages or boolean false Version 1.0.1 or higher getPlayerMapStatus() Require: element player, string mapName Returns: string status or boolean false Status list: string "DOWNLOADING" -- Player is downloading the map. string "LOADING" -- Player is generating/loading the map string "LOADED" -- Player has loaded the map. boolean false -- Player variable is invalid or the player hasn't started downloading this map. Events(serverside): "onPlayerLoadedMap" Source: element player Parameters: string mapName int loadTime "onPlayerUnloadedMap" Source: element player Arguments: string mapName Version 1.0.1 or higher "onPlayerCancelMapDownload" Source: element player Arguments: string mapName Events(clientside): "onClientPlayerLoadedMap" Source: element localPlayer Arguments: string mapName, int loadTime "onClientPlayerUnloadedMap" Source: element localPlayer Arguments: string mapName The same information about the functions and the events can be found inside the meta.xml Element types that are supported: objects, peds, vehicles, markers and pickups If you found any bugs, which might be in there. Don't be shy and let me know, I will exterminate them. And don't forget, this resource require some rights in order to read map files from other resources: DOWNLOAD 1.0.2 For developers a quick source code preview: Server Client
  15. Eae rapaziada, tava fazendo um painel de login aqui e ele ta todo funcional já, só que tem um probleminha que ta tenso, não to conseguindo achar onde está errado. ---------- client.lua ---------- local sW, sH = guiGetScreenSize() loadstring(exports.dgs:dgsImportFunction())() DGS = { e = {} } color = {} addEventHandler("onClientResourceStart", resourceRoot, function() DGS.e[1] = dgsCreateEdit(0.42, 0.47, 0.16, 0.04, "", true) dgsSetAlpha(DGS.e[1], 0.75) dgsSetProperty(DGS.e[1], "NormalTextColour", "FE000000") dgsSetProperty(DGS.e[1], "font", "default-bold") DGS.e[2] = dgsCreateEdit(0.42, 0.55, 0.16, 0.04, "", true) dgsSetAlpha(DGS.e[2], 0.75) dgsSetProperty(DGS.e[2], "NormalTextColour", "FE000000") dgsSetProperty(DGS.e[2], "font", "default-bold") end) function dxLogin() dxDrawRectangle(sW * 0.3806, sH * 0.2167, sW * 0.2396, sH * 0.5678, tocolor(25, 30, 40, 160), false) dxDrawRectangle(sW * 0.3806, sH * 0.2156, sW * 0.2396, sH * 0.0833, tocolor(25, 40, 100, 100), false) dxDrawText("ATLANTIC © 2021", sW * 0.3806, sH * 0.2156, sW * 0.6201, sH * 0.2978, tocolor(200, 200, 200, 255), 2.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawRectangle(sW * 0.3806, sH * 0.2989, sW * 0.2396, sH * 0.0044, tocolor(0, 0, 0, 180), false) color[1] = tocolor(200, 200, 200, 255) if cursorOnPosition(sW * 0.3875, sH * 0.6778, sW * 0.1042, sH * 0.0956) then color[1] = tocolor(0, 255, 0, 255) end dxDrawRectangle(sW * 0.3875, sH * 0.6778, sW * 0.1042, sH * 0.0956, tocolor(70, 75, 83, 175), false) -- Botão login color[2] = tocolor(200, 200, 200, 255) if cursorOnPosition(sW * 0.5090, sH * 0.6778, sW * 0.1042, sH * 0.0956) then color[2] = tocolor(255, 0, 0, 255) end dxDrawRectangle(sW * 0.5090, sH * 0.6778, sW * 0.1042, sH * 0.0956, tocolor(70, 75, 83, 175), false) -- Botão register dxDrawText("USER :", sW * 0.4229, sH * 0.4267, sW * 0.5035, sH * 0.4611, tocolor(155, 155, 155, 200), 1.00, "default-bold", "left", "bottom", false, false, false, false, false) dxDrawText("REGISTER :", sW * 0.4229, sH * 0.5100, sW * 0.5035, sH * 0.5444, tocolor(155, 155, 155, 200), 1.00, "default-bold", "left", "bottom", false, false, false, false, false) dxDrawText("Login", sW * 0.3875, sH * 0.6778, sW * 0.4917, sH * 0.7733, color[1], 1.20, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Create Account", sW * 0.5090, sH * 0.6778, sW * 0.6132, sH * 0.7733, color[2], 1.20, "default-bold", "center", "center", false, false, false, false, false) showCursor(true) addEventHandler('onClientClick', root, function(btn, state) if btn == 'left' and state == 'down' then if cursorOnPosition(sW * 0.3875, sH * 0.6778, sW * 0.1042, sH * 0.0956) then local g_user, g_pass = dgsGetText(DGS.e[1]), dgsGetText(DGS.e[2]) triggerServerEvent('playerRequestLog', getLocalPlayer(), g_user, g_pass) end end end) end addEventHandler('onClientRender', root, dxLogin) addEvent('playerLogged', true) function playerLogged() removeEventHandler('onClientRender', root, dxLogin) destroyElement(DGS.e[1]) destroyElement(DGS.e[2]) showCursor(false) end addEventHandler('playerLogged', getRootElement(), playerLogged) addEvent('playerRegisterSucess', true) function playerRegisterSucess() destroyElement(GUI.window[2]) end addEventHandler('playerRegisterSucess', getRootElement(), playerLogged) function cursorOnPosition(x, y, w, h) if (not isCursorShowing()) then return false end local mx, my = getCursorPosition() local sx, sy = guiGetScreenSize() local cx, cy = (mx*sx), (my*sy) if (cx > x and cx < x + w) and (cy > y and cy < y + h) then return true else return false end end Creio que seja no client mas, vou colocar aqui o lado server tbm: ---------- server.lua ---------- addEvent('playerRequestLog', true) function playerRequestLog(user, pass) if not(user == '') then if not(pass == '') then local account = getAccount(user, pass) if not account then outputChatBox('ERROR: Está conta não existe.', source, 255, 0, 0) else logIn(source, account, pass) triggerClientEvent(source, 'playerLogged', source) outputChatBox('Logado com sucesso. =)', source, 0, 255, 255) end else outputChatBox('Insira uma senha.', source, 255, 0, 0) end else outputChatBox('Insira um username.', source, 255, 0, 0) end end addEventHandler('playerRequestLog', getRootElement(), playerRequestLog) addEvent('playerRequestRegister', true) function playerRequestRegister(reguser, regpass) if not(reguser == '') then if not(regpass == '') then local account = getAccount(reguser, regpass) if (account) then outputChatBox('ERROR: Está conta já existe, insira outro username e senha.', source, 255, 0, 0) else addAccount(reguser, regpass) outputChatBox('Registrado com sucesso, faça o login agora.', source, 0, 255, 255) triggerClientEvent(source, 'playerRegisterSucess', source) end else outputChatBox('Insira uma senha.', source, 255, 0, 0) end else outputChatBox('Insira um username.', source, 255, 0, 0) end end addEventHandler('playerRequestRegister', getRootElement(), playerRequestRegister) O Erro é o seguinte, quando o player não digitar um campo, ou a não existir ele emite um texto no chat(futuramente farei menssagens, é só para teste), só que ta repetindo as frases e muito papo de floodar o chat da um ligo: https://imgur.com/a/S3qPhVk Se poderem me ajudar ai fico grato s2
  16. Server Name: [ENG/EU/HUN]Official Vice City Modded Playground [FUN/DM]OPENBETA TEST EVERY WEEKEND Server IP: 80.99.26.50:22003 It will be a fun game server in the making. There are a lot of community-created scripts on the server that I rewrote for optimization. Please give the server a chance and be a member of a start-up community! The Server is currently only available for testing on weekends, we are constantly developing it. On weekdays, the server is password protected for the time being. The official final opening of the Server is 20.02.2021 17:00 !! We are also looking for a developer with free time, contact us if you are interested! Video: Short clashed tutorial video
  17. I would like to ask if there is a way to make a second weapon, for example to have two M4s, but to shoot differently, e.g. to have a different one with a rate of fire and the other one to deal more hp. Is there a way to do something like this?
  18. Estou fazendo um sistema de Porte de Armas + Venda de Armas. E eu quero deixar assim, só quem pode comprar arma é quem tem o porte de armas. Quem não tem, não consegue comprar as armas. Alguém que possa me ajudar?
  19. I would like to know about two things: 1. Are the server-side and client-side timers dangerous and why? 2. Is it possible to do the function GetTickCount () timer?
  20. So I wanted to ask if someone would explain to me how to make my own shaders, I immediately say that I know there is an MTA page with examples but I don't understand anything of them so I prefer someone to explain it to me and what it is and how to create although the easiest script with shaders
  21. Is there a way to check for collisions where the player is looking without aiming the gun as if the getWorldFromScreenPosition and GetPedTargetCollision functions were combined?
  22. I have one question about client objects, if I use the "TriggerClientEvent" function on the server side script, whether the object that was saved on the client side and will be set with the triggerClientEvent function on the server side, will every player see it and will work in the same way as normally I would call it in the server side script "createObject (object, x, y, z)"? For example, such -- client addEvent("createObject", true) addEventHandler("createObject", root, function(object, x, y, z) createObject(x, y, z) end ) -- server triggerClientEvent(root, "createObject", root, 1372, 0, 0, 5) -- Would that be the same as this? -- server createObject(1372, 0, 0, 5)
  23. So the problem is that there is a function called "animate" https://wiki.multitheftauto.com/wiki/Animate and with this function we can animate the GUI etc ... but there is one problem, because I would like to stop this function at some point and stop animating at some point, there is a way to do that ?
  24. Lua ile ilgili her desteği ücretsiz olarak verebilirim. Piyasaya kopyala - yapıştır yöntemi veya editlenip sunulmuş eklentilerden çok Türkler tarafından kodlanmış eklentilerin bulunmasını istiyorum. Aklınıza takılan en ufak sorunda benimle iletişime geçebilir veya forumda konu açarsanız yardım etmekten memnun olurum. Bunun dışında 0'dan başlamak isteyen veya halihazırda birşeyler bilenler kendi kodladığım sunucuya yardım etmek ve geliştirmek isteyenler benimle iletişime geçebilir. Discord : Asokanta#9451
  25. I started scripting with GUI / dxDraw and would like to do some panning or alpha animation. And the question is how this animate works, I know it is shown on the MTA wiki, but I don't quite understand how, If someone would explain it to me, I would be grateful. By the way, I am sending the function I am talking about ... https://wiki.multitheftauto.com/wiki/Animate
×
×
  • Create New...