-
Posts
864 -
Joined
-
Last visited
-
Days Won
57
Everything posted by Shady1
-
that's true
-
https://wiki.multitheftauto.com/wiki/GetKeyState and https://wiki.multitheftauto.com/wiki/CancelEvent
-
but I created a piece of code for you, maybe it will help you, local vehicleChecker function checkVehiclesInWater() for _,vehicle in ipairs(getElementsByType("vehicle")) do if isElementInWater(vehicle) then destroyElement(vehicle) end end end vehicleChecker = setTimer(checkVehiclesInWater, 4000, 0) I don't understand exactly what you are trying to do, I didn't understand anything when I examined your code
-
function showTeamFunction(command, source) -- Check if the source (player element) is valid if not source or getElementType(source) ~= "player" then outputChatBox("Invalid player source.") return end local playerTeam = getPlayerTeam(source) if playerTeam then local players = getPlayersInTeam(playerTeam) for playerKey, playerValue in ipairs(players) do outputChatBox(getPlayerName(playerValue)) end else outputChatBox("You are not in a team.") end end addCommandHandler("showTeam", showTeamFunction)
-
kernelbase.dll crashes these can be caused by many system and operating system issues (may be memory related issues) kernelbase.dll error, probably out of VRAM/RAM/disk space
-
discord : shady.lua
-
https://wiki.multitheftauto.com/wiki/FormatDate
-
you have multiple non-standard errors, so please check your GTA:SA file and download GTA:SA again without clean mods
-
You don't need to do this in onPlayerQuit, all data is already destroyed when the player exits the game. In your code, the panel is run at startup. If you set guiSetVisible to false it will not show up, but my advice is to create it when you need it and delete it with destroyElement Also, onPlayerQuit is a server event. The codes inside are client-side, so they don't work together. function destroyWeaponShop() --destroy function for shop if isElement(GUIEditor.window[1]) then destroyElement(GUIEditor.window[1]) GUIEditor.window = {} end end function doWeaponShop() --create function for shop GUIEditor.window[1] = guiCreateWindow(98, 46, 654, 450, "Weapon shop", false) end addCommandHandler("shop", function() if GUIEditor.window[1] then -- if window is exists delete destroyWeaponShop() else doWeaponShop() --if not exists create one end end )
-
local x = 268.868 local y = 2037.208 local z = 17.7 function respawn(player) if player then spawnPlayer(player, x, y, z) fadeCamera(player, true) setCameraTarget(player, player) givePlayerMoney(player, 0) setPlayerTeam(player, player) giveWeapon(player, 31, 1000) outputChatBox("", player, 255, 255, 255) end end addEventHandler("onPlayerWasted",root, function() setTimer(respawn,8000,1,source) --respawn after 8 second later end)
- 1 reply
-
- 1
-
--clientside function handleKey(button, press) if not imagesEnabled and press and getKeyState("mouse2") then return false end for i, allowedImage in ipairs(allowedImages) do if button == allowedImage.key then triggerServerEvent("checkPlayerAllowed",localPlayer) end end end addEventHandler("onClientKey", root, handleKey) --serverside function isPlayerAllowed(player) return allowedPlayers[getPlayerSerial(player)] ~= nil end addEvent("checkPlayerAllowed",true) addEventHandler("checkPlayerAllowed",resourceRoot, function() if isPlayerAllowed(client) then --whatever you do, write server side functions or do client operations with triggerClientEvent end end)
-
function checkPlayerDoingAnim() local block,anim = getPedAnimation(localPlayer) if block and anim then triggerServerEvent("kickPlayer",localPlayer, "Don't use animations") end end local animChecker = setTimer(checkPlayerDoingAnim, 350,0) -client addEvent("kickPlayer",true) addEventHandler("kickPlayer",resourceRoot, function(reason) if client then kickPlayer(client, reason) end end) -server
-
Try updating your GPU, if that doesn't work, install DDU and uninstall your GPU driver and reinstall your driver Use this driver version to install after that DDU process: https://downloadmirror.intel.com/30196/a08/win64_15.40.5171.exe for your intel HD graphics, and https://www.amd.com/en/support/graphics/amd-radeon-r9-series/amd-radeon-r9-300-series/amd-radeon-r9-m375 > click "Windows 10 (64-bit) > download for your Radeon graphic
-
hi @Nicolas Henriquee, I like your thoughts and I hope you can help MTA players soon,If you train yourself well in these matters, maybe one day you can become an MTA Staff, but remember, first of all, strengthen your knowledge regularly and help MTA players and try to solve the problems of MTA players correctly, all the help you can do on the MTA discord and forum side will work well for you. and as an extra, you don't have to be a staff, you can do it without being a staff, and if you continue to support the community, maybe you can become a "Helpers" Link : Helpers
-
function disableNickChange() cancelEvent() end addEventHandler("onPlayerChangeNick",root,disableNickChange)
-
server-side : -- server-side addEvent("onHeadLightsRotate", true) addEventHandler("onHeadLightsRotate", root, function(rx, ry, rz) local theVeh = getPedOccupiedVehicle(source) if theVeh then setVehicleComponentRotation(theVeh, "misc_a", rx, ry, rz) end end) client-side : -- client.lua local function headLightsOpen() local theVeh = getPedOccupiedVehicle(localPlayer) if theVeh then local rx, ry, rz = getVehicleComponentRotation(theVeh, "misc_a") rx = rx + 5 triggerServerEvent("onHeadLightsRotate", localPlayer, rx, ry, rz) end end local function headLightsClose() local theVeh = getPedOccupiedVehicle(localPlayer) if theVeh then local rx, ry, rz = getVehicleComponentRotation(theVeh, "misc_a") rx = rx - 5 triggerServerEvent("onHeadLightsRotate", localPlayer, rx, ry, rz) end end addCommandHandler("lamp1", headLightsOpen) addCommandHandler("lamp2", headLightsClose) Now, when a player triggers the "lamp1" or "lamp2" command, the client will send the updated rotation values to the server using the "onHeadLightsRotate" remote event. The server will then receive these values and update the vehicle component rotation for all players, ensuring that the rotation is synchronized across the network.
-
Most MTA crashes are caused by something that the user can fix as it depends on their system, server selection or game mods.
-
Try downloading the latest version, which is likely to fix the problem.,You can download the latest version of MTA:SA, talk to the server owner, and upgrade the server if the server belongs to you. https://nightly.mtasa.com/
-
başarılar dilerim, sunucunuzun görsellerine baktığımda harika ve eğlenceli zaman geçirilceğini anlıyorum.