-
Posts
503 -
Joined
-
Last visited
Everything posted by TorNix~|nR
-
the zombies have their script, of @Slothman https://community.multitheftauto.com/index.php?p=resources&s=details&id=347
-
I'm using slothbot only for boss script, but the zombies are without slothbot Before this post, I sent you a wrong script, here it is the working one, if you want try it, you will see a green map on F11, sorry for taking your time. local aSavePlaces = { Circle = { -- x, y, radius }, Cuboid = { -- x, y, z, Width, Depth, Height }, Rectangle = { -- X, Y, Width, Height { 1155.28, -1350.23, 65, 58, 0, 255, 0, 0 }, }, Sphere = { -- X, Y, Z, Radius }, Tube = { -- X, Y, Z, Radius, Height }, Polygon = { -- X, Y, X1, Y1, X2, Y2, X3, Y3, ... -- You can add like X4, Y4 .. } } local aRadarAreaPlaces = { { 1155.28, -1350.23, 65, 58, 0, 255, 0, 70 }, } local sResourceName = getResourceName ( resource ) local bUseGunsInSavePlace = get( sResourceName .. '.UseGunsInSaveZone' ) local bUseRadarArea = get( sResourceName .. '.UseRadarArea' ) local pColshape, pRadarArea local bUseRunInSaveZone = get( sResourceName .. '.UseRunInSaveZone' ) local bUseJumpInSaveZone = get( sResourceName .. '.UseJumpInSaveZone' ) local bUseWeaponHudInSaveZone = get( sResourceName .. '.UseWeaponHudInSaveZone' ) local bUseAmmoHudInSaveZone = get( sResourceName .. '.UseAmmoHudInSaveZone' ) local bUseDamageInSaveZone = get( sResourceName .. '.UseDamageInSaveZone' ) addEventHandler ( 'onResourceStart', resourceRoot, function ( ) local display = textCreateDisplay () local text = textCreateTextItem("", 0.15, 0.53, "high", 150, 0, 0, 255, 2, "right", "bottom") textDisplayAddText(display, text) for s, _ in pairs( aSavePlaces ) do for _, a in pairs( aSavePlaces[ s ] ) do pColshape = _G[ 'createCol' .. s ]( unpack( a ) ) setElementData( pColshape, 'zombieProof', false ) addEventHandler ( 'onColShapeHit', pColshape, function ( pHitElement, ped ) triggerClientEvent (pHitElement, "welcome88", pHitElement) triggerClientEvent (pHitElement, "yes1", pHitElement) if getElementType( pHitElement ) == 'player' then if getElementData(pHitElement,"boss") ~= true then textDisplayAddObserver(display, pHitElement) if not bUseGunsInSavePlace then end if not bUseDamageInSaveZone then setElementData( pHitElement, 'damage', 'no' ) end end elseif getElementType( pHitElement ) == 'ped' then -- check if the entered ped kill it local aa = getElementData(pHitElement, "zombie") if getElementData(pHitElement, "zombie") then if getElementData(pHitElement,"boss") ~= true then destroyElement(pHitElement, aa) end end-- end-- end-- ) addEventHandler ( 'onColShapeLeave', pColshape, function ( pLeaveElement ) triggerClientEvent (pLeaveElement, "fail88", pLeaveElement) triggerClientEvent (pLeaveElement, "no1", pLeaveElement) if getElementType( pLeaveElement ) == 'player' then textDisplayRemoveObserver(display, pLeaveElement) if not bUseGunsInSavePlace then end if not bUseDamageInSaveZone then setElementData( pLeaveElement, 'damage', 'yes' ) end elseif getElementType( pLeaveElement ) == 'ped' then -- check if the entered ped kill it end end ) end end if bUseRadarArea then for _, a in ipairs( aRadarAreaPlaces ) do pRadarArea = createRadarArea ( unpack( a ) ) setElementData( pRadarArea, 'zombieProof', true ) end end end )
-
Still the same, when I am inside the safe zone, the zombies spawn
-
yes, when a player enter to the safe zone, kill all the zombies (like the zombies who are coming to him) when I am in safe zone, the zombies come, they annoy, but they get killed if they join the safe zone so the point is, I will if a player enter the safe zone, kill the zombies
-
Hello guys, I have this little problem, it makes me crazy I already set when a zombie enter to the safe zone, he will disappear (destroyElement) I want to make when the player enter to the safe zone, any zombies disappear, any help please? addEventHandler ( 'onColShapeHit', pColshape, function ( pHitElement, ped ) if getElementType( pHitElement ) == 'player' then if getElementData(pHitElement,"boss") ~= true then textDisplayAddObserver(display, pHitElement) if not bUseGunsInSavePlace then end if not bUseDamageInSaveZone then setElementData( pHitElement, 'damage', 'no' ) end end elseif getElementType( pHitElement ) == 'ped' then -- check if the entered ped kill it local aa = getElementData(pHitElement, "zombie") if getElementData(pHitElement, "zombie") then if getElementData(pHitElement,"boss") ~= true then destroyElement(pHitElement, aa) -- THIS ONE DISAPPEAR THE ZOMBIE WHEN JOIN THE SAFE ZONE end end-- end-- end-- )
-
Thank you guys, it's working fine
-
Hello guys, I'm wondering how to make a dxDrawText flashing, appear and disappear for example like the radar have setRadarAreaFlashing how to make it on dxDrawText
-
Yeah you're right, also I'm playing GTA V
-
You mean when a zombie kill a player or a player kill a zombie? because your photo shows that when a Zombie kill a player
-
I fixed it, by installing the 64 bits files (mta), thank you so much Problem solved!
-
Guys can you help me please? my server is stopped because of this problem
-
I got a problem on installing the mta server ( Debian OS ) when I start the server it said libncursesw.so.5: cannot open shared object file: No such file or directory ERROR: Could not load ./core.so * Check installed data files. Press enter to continue... help please?
-
@kieran, finally it worked, in the place of command, I made the event handler of marker, and I added the marker, and I added the team access, and it working, ty
-
the same here is the full code mark = createMarker( x,y,z, "cylinder", 2, 169, 199, 29, 150 ) vehicles99ui = {} function fun(hitPlayer) local x, y, z = getElementPosition(source) if hitPlayer and getElementType(hitPlayer) == "player" and not isPedInVehicle (hitPlayer) then if ( getPlayerTeam ( hitPlayer ) == getTeamFromName ( "team" ) ) then if isElement(vehicles99ui) then destroyElement(vehicles99ui) end vehicles99ui = createVehicle(522, 1680.89, 957.67, 10.70) setVehicleColor (vehicles99ui, 169, 199, 29, 169, 199, 29) warpPedIntoVehicle(hitPlayer, vehicles99ui) else outputChatBox ("fail",hitPlayer, 169, 199, 29, true) end end end addEventHandler("onMarkerHit",mark,fun) addEventHandler("onPlayerWasted", root, function() if isElement(vehicles99ui) then destroyElement(vehicles99ui) vehicles99ui = nil end end)
-
I want only for the player it destroy the vehicle the problem is when I get the vehicle and when any player died, it destroy, I want it to be destroyed only if the player (source) died if you want, I can post the full code
-
Thank you so much @Awang, I appreciate your help, but I want to use it only for server side, I will wait for someone, thank alot Any help please?
-
Yes, I will, I'm sorry I told that because I'm using this script so many times for other teams, if your script works, I should take a long time to add them all I will try it, ty
-
Thank you guys, @Dimos7, it's the same, when any player dead, it destroy Awang, I think there is a way on the server-side, help please?
-
Hello guys, I have a marker of spawning a car, I made when a player wasted, it destroy, but I want to make it only for source not for all players, please help, I already used the destroyElement(source, vehicles99ui) but it didn't work, help please Code: addEventHandler("onPlayerWasted", root, function() if isElement(vehicles99ui) then destroyElement(source, vehicles99ui) vehicles99ui = nil end end)
-
Thank you so much, it's working fine
-
Hello guys, I have a draw text when a player wasted, it's like GTA V but I have a little problem, it shows only when a player dead or someone (player) killed him, but the ped no (like zombies) it doesn't show the text, I tried so many attempts, please help --- Script local TIME_TO_WAIT = 9000 --The milliseconds to wait before spectating the person --who killed us, the :O local KILLER_TEXT_COLOR = tocolor(255, 255, 255, 200) local KILL_TEXT_X = 0.5 --Where the text starts to the left of the screen local KILL_TEXT_Y = 0.535 --How far down the screen comes before we have text local KILL_TEXT_COLOR = tocolor(255, 255, 255, 200) --The color of the text local KILL_TEXT_SIZE = 1.5 --The size of our text local KILL_TEXT_FONT = "font/ARLRDBD.ttf" --The font face of our text local KILL_TEXT_ALIGN_X = "center" --The font alignment on the x axis local KILL_TEXT_ALIGN_Y = "center" --The font alignment on the y axis local KILL_TEXT_CLIP = false --Clip text outside of box local KILL_TEXT_WRAP = false --Wrap text if it reaches end of box local KILL_TEXT_ONTOP = true --Render on top of the gui local WASTED_TEXT_X = 0.5 --Where the text starts to the left of the screen local WASTED_TEXT_Y = 0.5 --How far down the screen comes before we have text local WASTED_TEXT_COLOR = tocolor(255, 0, 0, 200) --The color of the text local WASTED_TEXT_SIZE = 2.5 --The size of our text local WASTED_TEXT_FONT = "pricedown" --The font face of our text local WASTED_TEXT_ALIGN_X = "center" --The font alignment on the x axis local WASTED_TEXT_ALIGN_Y = "center" --The font alignment on the y axis local WASTED_TEXT_CLIP = false --Clip text outside of box local WASTED_TEXT_WRAP = false --Wrap text if it reaches end of box local WASTED_TEXT_ONTOP = true --Render on top of the gui function playerDied(killer, weapon, bodypart) wastedSound() local playerX, playerY, playerZ = getElementPosition(source) displayKillText(getKillString(source, killer, weapon, bodypart)) local spectate if killer then local killerX, killerY, killerZ = getElementPosition(killer) spectate = killer else end end addEventHandler("onClientPlayerWasted", getLocalPlayer(), playerDied) function getKillString(player, killer, ped, weapon, bodypart) local killText = "" if player then killText = killText .. "" end --if if killer then killText = getPlayerName(killer) .. " killed you" else killText = killText .. " commit suicide " end if weapon then local weapName = getWeaponNameFromID(weapon) if weapname ~= false then end end return killText end local killText = "" function displayKillText(text) killText = text addEventHandler("onClientRender", getRootElement(), drawKillText) setTimer(stopDisplayDrawKillText, TIME_TO_WAIT, 1) end function stopDisplayDrawKillText() removeEventHandler("onClientRender", getRootElement(), drawKillText) end function drawKillText() local sX, sY = guiGetScreenSize() local left, top left = KILL_TEXT_X * sX top = KILL_TEXT_Y * sY dxDrawText(killText, left, top, left, top, KILL_TEXT_COLOR, KILL_TEXT_SIZE, KILL_TEXT_FONT, KILL_TEXT_ALIGN_X, KILL_TEXT_ALIGN_Y, KILL_TEXT_CLIP, KILL_TEXT_WRAP, KILL_TEXT_ONTOP) left = WASTED_TEXT_X * sX top = WASTED_TEXT_Y * sY dxDrawBorderedText("You are dead", left, top, left, top, WASTED_TEXT_COLOR, WASTED_TEXT_SIZE, WASTED_TEXT_FONT, WASTED_TEXT_ALIGN_X, WASTED_TEXT_ALIGN_Y, WASTED_TEXT_CLIP, WASTED_TEXT_WRAP, WASTED_TEXT_ONTOP) end function dxDrawBorderedText( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) dxDrawText ( text, x - 1, y - 1, w - 1, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false ) -- black dxDrawText ( text, x + 1, y - 1, w + 1, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x - 1, y + 1, w - 1, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x + 1, y + 1, w + 1, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x - 2, y, w - 2, h, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x + 2, y, w + 2, h, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y - 2, w, h - 2, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y + 2, w, h + 2, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) end function wastedSound() if true then local wasted = playSound("wasted.mp3"); setSoundVolume(sound, 0.1); end end -- OLD Film local screenWidth, screenHeight = guiGetScreenSize() local myScreenSource = dxCreateScreenSource(screenWidth, screenHeight) local flickerStrength = 0 addEventHandler("onClientPlayerWasted", getLocalPlayer(), function() if getVersion ().sortable < "1.1.0" then return else createShader() end end) function createShader() oldFilmShader, oldFilmTec = dxCreateShader("shaders/old_film.fx") setTimer(function() destroyElement(oldFilmShader) end, 9000, 1) if (not oldFilmShader) then else end end function updateShader() upDateScreenSource() if (oldFilmShader) then local flickering = math.random(100 - flickerStrength, 100)/100 dxSetShaderValue(oldFilmShader, "ScreenSource", myScreenSource); dxSetShaderValue(oldFilmShader, "Flickering", flickering); dxDrawImage(0, 0, screenWidth, screenHeight, oldFilmShader) end end addEventHandler("onClientPreRender", root, updateShader) function upDateScreenSource() dxUpdateScreenSource(myScreenSource) end -- Tarja function showClientImage() local img = guiCreateStaticImage( 0, 0, 1921, 221, "starja.png", true ) setTimer(function() destroyElement(img) end, 9000, 1) local img = guiCreateStaticImage( 0, 0, 1920, 1080, "images/vignette1.dds", true ) setTimer(function() destroyElement(img) end, 9000, 1) end addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), showClientImage)
-
Thank you, but it's the same
-
Hello guys, I have this code, I don't know why it's not working correctly when I have 2999 zombie kills, I can't join the clan, and when I have 3001 zombie kils, I can't join the clan too help please? local account = getPlayerAccount(source) if getAccountData(account, "Zombie kills") < 3000 then ------------- outputChatBox("fail", source) return end