Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 28/01/22 in all areas

  1. https://wiki.multitheftauto.com/wiki/SetAmbientSoundEnabled client: setAmbientSoundEnabled( "gunfire", false )
    1 point
  2. sorry guys problem solved by using this trick https://stackoverflow.com/questions/50093144/mysql-8-0-client-does-not-support-authentication-protocol-requested-by-server
    1 point
  3. no problem it was my pleasure ?
    1 point
  4. I put the gsub part above the outputchatbox and now it works thank you both for the help, saludos ??
    1 point
  5. your code already has mensaje:gsub part doing this job mensaje = mensaje:gsub("^%l", string.upper) you don't need to do anything else
    1 point
  6. mensaje = mensaje:gsub("^%l", string.upper) if you share this whole section with us, we can understand what you are trying to do,then Burak can give the necessary answer.
    1 point
  7. I tested this code it converts the first character of the text to uppercase mensaje = "hello" -- hello mensaje = mensaje:gsub("^%l", string.upper) outputDebugString(mensaje) -- Hello
    1 point
  8. no problem if you have any other questions, please open a thread, I'll help as much as I can ?
    1 point
  9. hello, after a long effort, I finally managed to run your code. I think the problem is about entering a low value for the bandwith parameter, but if you enter a high amount here, the problem will be solved, I'll send you the code I tried. server: addCommandHandler ("LoadCar",function(player) txd1 = fileOpen("sultan.txd") dff1 = fileOpen("sultan.dff") local txd = fileRead (txd1, 100*1024*1024) local dff = fileRead(dff1, 100*1024*1024) triggerLatentClientEvent(player,"acceptCar",100*1024*1024,false,player,txd,dff) fileClose (txd1) fileClose (dff1) end) client: addEvent ("acceptCar", true) addEventHandler ("acceptCar",root,function(t1 ,d1) outputDebugString("test") txd1 = engineLoadTXD ( t1 ) dff1 = engineLoadDFF ( d1,576 ) engineImportTXD ( txd1, 576 ) engineReplaceModel ( dff1, 576 ) end) triggerLatentClientEvent(player,"acceptCar",100*1024*1024,false,player,txd,dff) -- max bandwidth : 100 MB When you type LoadCar it will load your model with a little delay.
    1 point
  10. ok i fix it . I will edit and send the script you want specially for you. you just need to embed these commands in your own JoinQuit script. local noColorName = string.gsub(playerName, "#%x%x%x%x%x%x", "")--this code prevents players from casting colors if setPlayerName(source, "#ffffff"..noColorName)--this code gives players white color these commands will make the names white, but "has left the game" and "is now known as" will make them green. If you share the joinquit script with me privately, I can show you where to place the codes I sent.
    1 point
  11. Thank you, but i want to edit the joinquit resource in order for when the player is changing the name and quitting to have the colors in the screenshot. And i am not sure where to put every color code. Tried already some variants and it doesn't work. Here's how it looks right now - check the screenshot I want like this: #006400∙ #FF0000Cosmin #006400has left the game [#FF0000Quit#006400] #006400∙ #FF0000Adr1ft #006400is now known as #FF0000Ady #FF0000 - White #006400 - Green
    1 point
  12. actually hex codes will work for you, but before that you can clear the hex codes in the player's name For example, I made the dice text red here, you can use it this way to get what you want, but make sure the last parameter of the outputChatBox is true. local clearedName = string.gsub(sourceName, "#%x%x%x%x%x%x", "") outputChatBox ("[ING] "..clearedName.."#FF0000dice: "..mensaje..".", v, 255, 255, 255, true)
    1 point
  13. addEventHandler("onPlayerLogin", root, function(_, account) local playerName = getPlayerName(source) local noColorName = string.gsub(playerName, "#%x%x%x%x%x%x", "")--this code prevents players from casting colors if setPlayerName(source, "#ffffff"..noColorName)--this code gives players white color end end ) I recommend using commands like this
    1 point
  14. 如题/dogeInsert image from URL
    1 point
  15. oh my fault sorry forgot to say triggerClientEvent(root, "playSound", player) change the first player parameter to root this should work so it will send to all players
    1 point
  16. Uh, and what If I want other players hear it?
    1 point
  17. It worked!! Thank you so much for helping me
    1 point
  18. function sonidoBloq() local x, y, z = getElementPosition(localPlayer) -- get player position local bloqueo = playSound3D("sonidoBloq.mp3", x, y, z, false) setSoundMaxDistance(bloqueo, 10) end addEvent("playSound", true) -- add event with name "playSound" or whatever you want addEventHandler("playSound", root, sonidoBloq) -- add event listener hmmm can you try to enclose the getElementPosition in a function?
    1 point
  19. yes it's possible you can call it with triggerClientEvent likewise triggerClientEvent(player, "playSound", player) but be careful with the player parameter because it will change based on where it is called. As an example, here I made 3 parameters as posX, posY, posZ. function sonidoBloq(posX, posY, posZ) local bloqueo = playSound3D("sonidoBloq.mp3", posX, posY, posZ, false) setSoundMaxDistance(bloqueo, 10) end addEvent("playSound", true) -- add event with name "playSound" or whatever you want addEventHandler("playSound", root, sonidoBloq) -- add event listener you can run it on the server side with triggerClientEvent in the same way, but here we will need to add 3 x, y, z coordinates as an extra, so we can play the sound in the coordinates we want. triggerClientEvent(player, "playSound", player, 0, 50, 3) -- play sound 0,50,3 coordinates
    1 point
  20. local x, y, z = getElementPosition(localPlayer) -- get player position function sonidoBloq() local bloqueo = playSound3D("sonidoBloq.mp3", x, y, z, false) setSoundMaxDistance(bloqueo, 10) end addEvent("playSound", true) -- add event with name "playSound" or whatever you want addEventHandler("playSound", root, sonidoBloq) -- add event listener create an event on the client side to play the sound you can use triggerClientEvent to call this on server side triggerClientEvent(player, "playSound", player)
    1 point
  21. If your MTA crashes on startup or during the game, then first of all you should visit the list of known crash types (link) and search for a match with the crash offset from your crash dialog (example: "Offset = 0x003F0BF7" > copy and search for 0x003F0BF7). Incase your particular crash is listed in the table, the reason for said crash and resolution info is provided on that page, right behind the crash offset. Note: most people will think "oh, nah, probably not relevant to me", but crashes with known reasons that are listed, together make up 85% of all MTA crashes globally, and most support is requested for clarified crashes. So for the sake of getting a faster fix, we recommend really taking this step. If your crash isn't listed, then download and run MTADiag and follow the instructions. If MTADiag will not run for you, download & install Visual C++ 2017 runtimes (using this link, download automatically starts) Then create a topic in this section (Client support) and post any Pastebin URL MTADiag gives you in there. If for some reason MTADiag does not function, do the following before creating a new topic: Install the latest patch of MTA:SA Install the latest DirectX runtime by keeping this option to automatically install it, enabled in the MTA installer selection. If installing those does not fix the problem, try: Delete the gta_sa.set file located in the GTA San Andreas User Files in your Documents folder/library (Windows Vista and 7 users) or My Documents directory (Windows XP users) Check in your GTA San Andreas installation directory for a D3D9.dll. If one is present, delete it. Ensure that your GTA San Andreas installation is not modded in any way. If it is - please uninstall, then reinstall GTA San Andreas first before installing MTA: San Andreas. While MTA can cope well with most mods, this will exclude the chance some funky mod is causing problems without a long troubleshooting process to determine which specific mod the culprit is. Please note that the more (type of) SA mods you have, the higher the risk for stability issues; MTA has a high tolerance for things it's not designed to be compatible with, but it has its limits. We cannot guarantee support if you're using a modded installation while running into problems. Also include any error messages that may appear when your MTA:SA crashes; either copy and paste of the crash log or a screenshot is fine. Thank you! Note: If you want to read more about MTADiag or report issues while using this tool, go here: https://forum.multitheftauto.com/topic/32071-mtadiag-diagnostic-tool-for-mtasa/
    1 point
×
×
  • Create New...