-
Posts
864 -
Joined
-
Last visited
-
Days Won
57
Everything posted by Shady1
-
As I said before, this was just a test code, you can do it for the vehicle by looking at it.
-
there was no problem when i tested it
-
client-side : local godMode = false --godmode status function stopDamage() if(godMode) then --cancel damage if godmode is on cancelEvent() end end addEventHandler("onClientPlayerDamage", root, stopDamage) addEventHandler("onClientPlayerStealthKill", root, stopDamage) addEventHandler("onClientPedDamage", root, stopDamage) addEvent("setGodMode",true) --an event to set godmode addEventHandler("setGodMode",root, function(value) godMode = value end ) server-side: addEventHandler("onPlayerLogin", root, function(_,account) local accName = getAccountName(account) if isObjectInACLGroup("user."..accName, aclGetGroup("Admin")) then --if player's account is in Admin group make it godmode triggerClientEvent(source, "setGodMode", source, true) else triggerClientEvent(source, "setGodMode", source, false) --if not, turn off godmode end end )
-
welcome forum, check this page: https://wiki.multitheftauto.com/wiki/Animate
-
Hi @#nofear Welcome to the forum!, you can tell me or other community your new questions and requests as you wish, I will help you with your problem, server-side : local rocketDamage = 50 --Fixed amount of damage for rocket damage addEvent("handleDamage",true) addEventHandler("handleDamage", root, function(attacker, damage_causing, bodypart, loss) if(getElementHealth(client) - rocketDamage <= 0) then --if the damage done leaves the player's hp at or below 0 then kill him directly killPed(client, attacker, damage_causing, bodypart) else setElementHealth(client, getElementHealth(client) - rocketDamage) --if it doesn't kill then reduce health end end ) client-side : function damageHandler(attacker, damage_causing, bodypart, loss) if(damage_causing == 19) then cancelEvent() --cancel current damage because we will give triggerServerEvent("handleDamage", source, attacker, damage_causing, bodypart, loss) --Send the information to the server side, here we will process the damage end end addEventHandler("onClientPlayerDamage", root, damageHandler) As an example, I can recommend these codes to you, I tested them and they are working, you can develop them through these codes.
-
To convert pixel size to scale, you can use the following formula: scale = pixel size / 12 In this formula, "pixel size" represents the font size in pixels that you want to convert, and "12" represents 12 pixels which correspond to the default dpi/ppi value. For example, a font size of 12 pixels would have a scale value of 1: scale = 12 / 12 = 1 A font size of 15 pixels would have a scale value calculated as follows: scale = 15 / 12 = 1.25 The actual conversion can vary depending on the dpi/ppi value used, but a default value of 96 is typically assumed. -- define the default dpi/ppi value local dpi = 96 -- enter the pixel size you want to convert local pixelSize = 12 -- use the formula to convert pixel size to scale value local scale = pixelSize / (dpi / 12) -- print the scale value print("Scale value: ", scale)
-
Hi @Sour01 Welcome to the MTA Forum, 0xE06D7363 code means out of memory and it is usually caused if you have low RAM on your computer or the server you are playing is abusing memory (either poorly optimized scripts/mods). So, there are some solutions, like optimizing your setup or find for another server to play (unfortunately). Edit: I just noticed that I replied to you on discord as well, so you may check it for more information about your error too: https://discord.com/channels/278474088903606273/278521065435824128/922488018001092661
-
function onBotWasted(totalAmmo, killer, killerWeapon, bodypart, stealth) -- This function will be triggered when the bot dies. -- totalAmmo: total ammo of the bot at the time of death -- killer: the player who killed the bot -- killerWeapon: the weapon used by the player to kill the bot -- bodypart: the body part of the bot that was hit by the killing shot -- stealth: whether the bot was killed while in stealth mode -- Get the source element of the bot local bot = source -- React to the bot's death -- For example, you can create an object or pickup after the bot dies -- You can use the createPickup function to create a pickup createPickup(bot.position.x, bot.position.y, bot.position.z, 3, 2, 100) end -- Define the "onBotWasted" event to listen for bot deaths addEvent("onBotWasted", true) addEventHandler("onBotWasted", getRootElement(), onBotWasted) For the second code snippet: -- Define a table for bots local bots = {} -- Bot creation function function createBot(x, y, z) -- Create a bot local bot = createPed(0, x, y, z) -- Set the bot's health value setElementHealth(bot, 100) -- Add the bot's ID to a table bots[bot] = true --
- 2 replies
-
- bots
- onbotwasted
-
(and 2 more)
Tagged with:
-
for example : addEventHandler("onClientResourceStart", resourceRoot, function() setWorldSpecialPropertyEnabled("randomfoliage", false) end ) meta.xml : client-side
-
Hello @Andosius welcome to the MTA Forum-site, I couldn't look into your problem in detail, but there are some things I need to say, when I checked your pastebin, I saw that you have some non-standard effects or txd files, so you may be having problems. What you should do: 1- If there are different external Mods on the GTA:SA and MTA:SA sides, remove them. 2-Make a new installation again (Try to a different folder and cleanly / without mods). 3-Try installing to a different disk. 4-You should check this link address. 5- You can try the latest version of Nightly (https://nightly.multitheftauto.com/) If you are still having problems after trying these, can you contact me again? https://github.com/multitheftauto/mtasa-blue/issues/1103
-
ban sebepsizce trainer tarafından banlandın yazıyor nedenini anlamış değilim.
Shady1 replied to alp babacan's question in Yardım
süreli yasaklarda kaldırılmıyor, 2 gün beklemelisiniz. -
ban sebepsizce trainer tarafından banlandın yazıyor nedenini anlamış değilim.
Shady1 replied to alp babacan's question in Yardım
banlar konusunda fazla bi fikrim yok ama sanırım yasaklı yada kötü bir yazılım programı yüzünden olabilir, başka bir oyunun yada programının bir eklentisi olabilir yada hile programı olabilir. NOT : Türkçe yazacağınız zaman türk tarafından konu açmanızı öneririm. https://forum.multitheftauto.com/forum/95-turkish-türkçe/ -
if you only have this problem on one server, you should contact the server admin.
-
GUIEditor = { button = {} } local spaaa addEventHandler("onClientResourceStart", resourceRoot, function() spaaa = guiCreateButton(494, 849, 309, 73, "spawn", false) addEventHandler("onClientGUIClick", spaaa, spaw, false) guiSetVisible ( spaaa,false) end ) function ahmed() guiSetVisible (spaaa,true) showCursor(true) end addCommandHandler("aa",ahmed) --addEventHandler("onClientPlayerWasted",root,ahmed) -- onClientPlayerWasted soon function spaw(button) --local x, y , z = getElementPosition (theplayer) if button == "left" then setElementHealth(localPlayer,100) local a,z,y = 1182.58582, -1323.69434, 13.57902 setElementPosition (localPlayer,1182.58582, -1323.69434, 13.57902) guiSetVisible ( spaaa,false) showCursor(false) end end --addCommandHandler("bb",spaw) --1182.58582, -1323.69434, 13.57902 function createMinigunWeapon() -- Create the weapon 1 meter above the player local x, y, z = getElementPosition(localPlayer) local weapon = createWeapon("minigun", x + 1, y, z) -- Give it some ammo and fire it setWeaponClipAmmo(weapon, 99999) setWeaponState(weapon, "firing") -- Optionally adjust for model rotation (this value will be different for other weapons) setWeaponProperty(weapon, "fire_rotation", 0, -30, 0) end addCommandHandler("createminigun", createMinigunWeapon) --[[GUIEditor = { button = {}, window = {} } GUIEditor.window[1] = guiCreateWindow(174, 135, 490, 299, "", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], true) showCursor (true) GUIEditor.button[1] = guiCreateButton(449, 29, 27, 35, "X", false, GUIEditor.window[1]) function hidegui() guiSetVisible(GUIEditor.window[1], false) showCursor ( false ) end addEventHandler ( "onClientGUIClick", GUIEditor.button[1], hidegui, false ) ]]
-
hello i have a message about your problem,You can try to install MTA correctly, try to keep your drivers up to date.,You can check the MTA settings section. I will ask you to reinstall MTA:SA https://mirror-cdn.multitheftauto.com/mtasa/main/mtasa-1.5.9.exe
-
"CC23" is connection timed out, there is an issue with either the server's connection or your own,there are many reasons eg only you can't login to the server then it's your network problem. I made a script at the time and when I connected to the server again, I couldn't log in anymore and I was getting this type of error all the time, then I did the complete MTA:SA setup again. and my problem was fixed, I had these problems because of 1 script
-
Can you check the script or models you made before you got the error.
-
make sure you have installed correctly, if you still have problems avoid using GTA:SA crack version.
-
welcome 1.6, cya 1.5.9
- 32 replies
-
- mtasa
- mtasa 1.6.x
-
(and 3 more)
Tagged with:
-
you're having multiple non-standard issues, reinstall GTA:SA and MTA:SA and cleanly, you're having problems with your changes and few changes on the maps side
-
I suggest you to install your GTA:SA and MTA:SA folders on your hard disk, ie local Disk side, so you can avoid your problems. MTA path: G:\mta sa GTA path: D:\GTA San Andreas
-
You have too many non Standard issues, reinstall without mods and clean folder