Jump to content

Kenix

Retired Staff
  • Posts

    4,121
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Kenix

  1. script not work. I sometimes frequent problems with the "if" "elseif" "else" please help guys addEventHandler( "onClientPlayerWasted", getRootElement( ), function(killerweapon, killer) if ( killerweapon == 54 ) then -- чел упал playSound( 'sounds/humans/EndScream.mp3', false) outputChatBox("1") elseif ( killerweapon == 56 ) then -- убит из кулаков playSound( 'sounds/humans/PlayerPainBreathing.mp3', false) outputChatBox("2") elseif ( killerweapon == 53 ) then -- умер в воде playSound( 'sounds/humans/hurt.mp3', false) outputChatBox("3") elseif ( killerweapon or killer == 57 ) then survivorkillsounds = playSound( "sounds/humans/attack" .. tostring( math.random( 1, 4 ) ) .. ".mp3", x,y,z, false ) setSoundVolume(survivorkillsounds, 0.9) setSoundMaxDistance(survivorkillsounds, 10) outputChatBox("4") else zombiekillsounds = playSound( "sounds/zombies/attack" .. tostring( math.random( 1, 5 ) ) .. ".mp3", x,y,z, false ) setSoundVolume(zombiekillsounds, 0.9) setSoundMaxDistance(zombiekillsounds, 10) outputChatBox("5") end if ( killerweapon or source == 57 ) then local pTeam = getPlayerTeam" class="kw2">getPlayerTeam(source) if not pTeam then return end local pTeamName = getTeamName(pTeam) if type(pTeamName) ~= "string" then return end if pTeamName == "Zombies" then -- еси умер зомби zombiediesounds = playSound( "sounds/zombies/die" .. tostring( math.random( 1, 3 ) ) .. ".mp3", x,y,z, false ) setSoundVolume(zombiediesounds, 0.9) setSoundMaxDistance(zombiediesounds, 10) outputChatBox("6") elseif pTeamName == "Survivors" then -- еси умер игрок survivordiesounds = playSound( "sounds/humans/dead" .. tostring( math.random( 1, 4 ) ) .. ".mp3", x,y,z, false ) setSoundVolume(survivordiesounds, 0.9) setSoundMaxDistance(survivordiesounds, 10) outputChatBox("7") end end end )
  2. dude, my advice to you redo or modify someone else's.
  3. было бы классно я про 1.
  4. function createTheGate () myGate = createObject( 988, 96.722534179688, 1920.3703613281, 18.158107757568, 0, 0, 270 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate ) function openMyGate (player, command ) if (getTeamName(getPlayerTeam(source)) == "Army") then moveObject( myGate, 5000, 96.722534179688, 1915.8951416016, 18.158107757568 ) outputChatBox(""..getPlayerName(player).." opened the Armybase", 255, 255, 0, true) end end addCommandHandler("armyo",openMyGate) function movingMyGateBack (player, command) if (getTeamName(getPlayerTeam(source)) == "Army") then moveObject( myGate, 5000, 96.722534179688, 1920.3703613281, 18.158107757568 ) outputChatBox(""..getPlayerName(player).." closed the Armybase", 255, 255, 0, true) end end addCommandHandler("armyc", movingMyGateBack)
  5. try this function createTheGate () myGate = createObject( 988, 96.722534179688, 1920.3703613281, 18.158107757568, 0, 0, 270 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate ) function openMyGate (player, command ) if (getTeamName(getPlayerTeam(player)) == "Army") then moveObject( myGate, 5000, 96.722534179688, 1915.8951416016, 18.158107757568 ) outputChatBox(""..getPlayerName(player).." opened the Armybase", 255, 255, 0, true) end end addCommandHandler("armyo",openMyGate) function movingMyGateBack (player, command) if (getTeamName(getPlayerTeam(player)) == "Army") then moveObject( myGate, 5000, 96.722534179688, 1920.3703613281, 18.158107757568 ) outputChatBox(""..getPlayerName(player).." closed the Armybase", 255, 255, 0, true) end end addCommandHandler("armyc", movingMyGateBack)
  6. юзай ... bindKey ("E", "down", cspeed) function csped() setGameSpeed(0.5) end возможно ты это имел ввиду
  7. it works great thanks brother
  8. not work guys Citizen : bad argument 14 -15 line Antibird : bad argument 15 line
  9. thx function anomalys( thePlayer, matchingDimension ) WORKS Now how do I do that when you come into colShape table * anomalstp1 obtain a function outputChatBox? here I am done but not working local anomalstp1 = { {286.05, 1319.48, 3}, } function anomalys( thePlayer, matchingDimension ) local fX = anomalstp1[1] local fY = anomalstp1[2] local radius = anomalstp1[3] createColCircle ( fX, fY, radius ) outputChatBox("1") end addEventHandler ( "onResourceStart", getRootElement(), anomalys ) function onAnomalyHit() if anomalstp1 == true then outputChatBox("1") end addEventHandler ( "onColShapeHit", getRootElement(), onAnomalyHit ) 300 post
  10. script does not work local anomalstp1 = { {286.05, 1319.48, 3}, } function anomalys( thePlayer, matchingDimension ) local fX = anomalstp1[1] local fY = anomalstp1[2] local radius = anomalstp1[3] colShape[id] = createColCircle ( fX, fY, radius ) outputChatBox("1") end addEventHandler ( "onResourceStart", getRootElement(), anomalys ) function onAnomalyHit() outputChatBox("1") end addEventHandler ( "onColShapeHit", anomalstp1, onAnomalyHit )
  11. help please how to fix it??
  12. it works but it is only the function and everything else is not working and then it worked but worked in the next round: |
  13. the same, nothing has changed,now does not work
  14. I deleted but still only in the next round included
  15. script works finally but not quite as it should All I could do but the problem of change triggered after the opening event that is in the next / Round Here's the script: function loadmap(startmap, player) local total_spawns = getElementChildrenCount( getElementByID( "spawns" ) ) local num = math.random( 0, total_spawns - 1 ) local spawn_random = getElementChild ( getElementByID( "spawns" ), num ) local x = getElementData ( spawn_random, "posX" ) local y = getElementData ( spawn_random, "posY" ) local z = getElementData ( spawn_random, "posZ" ) local rot = getElementData ( spawn_random, "rot" ) setTimer( setPedSkin , 500 , 1 , source, SurvivorsElements[math.random(1, #SurvivorsElements)]) for i, v in ipairs( getElementsByType( "player" ) ) do setTimer (createZombieClass( v ),20000,1); end; spawnPlayer( source, x, y, z, rot); setCameraTarget (source, source ); fadeCamera( source, true ); end end addEventHandler("onGamemodeMapStart",getRootElement(), loadmap) zombie classes: broneskins = { [167]=true, [277]=true, [264]=true } -- бронерованные зомби noheadskins = { [70]=true, [108]=true, [128]=true, [188]=true, [259]=true } -- без головные зомби speedskins = { [92]=true, [162]=true, [206]=true, [209]=true, [212]=true, [229]=true, [230]=true } -- скоростные зомби fireskins = { [105]=true, [107]=true, [127]=true, [280]=true, [287]=true } -- огненные зомби function createZombieClass( player ) local idSkin = getElementModel( player ) if broneskins[ idSkin ] then triggerClientEvent( player,"onbronezombies", player ) outputChatBox ( "1" ) elseif noheadskins[ idSkin ] then setPedHeadless( player, true ) outputChatBox ( "2" ) elseif speedskins[ idSkin ] then triggerClientEvent( player,"onspeedzombies", player ) setPedStat( player, 24, 1000 ) -- но меньше жизек setElementHealth( player, 200 - ( 180 - getElementHealth( player ) ) ) outputChatBox ( "3" ) elseif fireskins[ idSkin ] then setPedOnFire( player, true ) outputChatBox ( "4" ) end end
  16. function calls from the opening event onResourceStart. function zm_onResourceStart( resourcename, res ) zombiewinsdisplay = textCreateDisplay() local zombietext = textCreateTextItem ( "Выживших не осталось. Зомби победили!", 0.5, 0.5, "low", 255, 0, 0, 255, 3, "center", "center" ) textDisplayAddText ( zombiewinsdisplay, zombietext ) zombiewinsdisplayeng = textCreateDisplay() local zombietexteng = textCreateTextItem ( "No survivors left. Zombies won!", 0.5, 0.5, "low", 255, 0, 0, 255, 3, "center", "center" ) textDisplayAddText ( zombiewinsdisplayeng, zombietexteng ) Survivorwinsdisplay = textCreateDisplay() local Survivortext = textCreateTextItem ( "Выжившие победили! Они пережили нападение!", 0.5, 0.5, "low", 0, 255, 0, 255, 3, "center", "center" ) textDisplayAddText ( Survivorwinsdisplay, Survivortext ) Survivorwinsdisplayeng = textCreateDisplay() local Survivortexteng = textCreateTextItem ( "Surviving won! They survived the attack!", 0.5, 0.5, "low", 0, 255, 0, 255, 3, "center", "center" ) textDisplayAddText ( Survivorwinsdisplayeng, Survivortexteng ) opsdisplay = textCreateDisplay() local opsdisplaytext = textCreateTextItem ( "Вы зомби , ваша цель убить выживших!", 0.5, 0.5, "low", 255, 0, 0, 255, 3, "center", "center" ) textDisplayAddText ( opsdisplay, opsdisplaytext,source ) opsdisplayeng = textCreateDisplay() local opsdisplaytexteng = textCreateTextItem ( "You are a zombie, your goal is to kill the survivors!", 0.5, 0.5, "low", 255, 0, 0, 255, 3, "center", "center" ) textDisplayAddText ( opsdisplayeng, opsdisplaytexteng,source ) for i, v in ipairs( getElementsByType( "player" ) ) do createZombieClass( v ); end; if isTimer(selectTimer) then killTimer(selectTimer) end if isTimer(rebootTimer ) then killTimer(rebootTimer ) end removeEventHandler("onEndgame", getRootElement( ), Endgame ) removeEventHandler( "onTimeElapsed", getRootElement( ),onTimeElapsed ) removeEventHandler("onTimeProverka", getRootElement( ), setTimer) removeEventHandler("onreboot", getRootElement( ), reboot) removeEventHandler("onChengemap", getRootElement( ), chengemap) selectTimer = setTimer(function() zombieturn(getRndPlayer()) end, 20000, 1) showPlayerHudComponent ( source,"radar", false ) if resourceName == 'mapmanager' then mapmanager = createResourceCallInterface('mapmanager') end end addEventHandler( "onResourceStart", getRootElement(), zm_onResourceStart )
  17. public roleplay https://community.multitheftauto.com/index.php?p= ... ls&id=1819 https://community.multitheftauto.com/index.php?p= ... ls&id=1820 https://community.multitheftauto.com/index.php?p= ... ls&id=1819 https://community.multitheftauto.com/index.php?p= ... ls&id=1789
  18. ну ты подумай мта тогда только создавался , а сейчас это уже готовый мультиплеер . но он продолжает обновляться
  19. спросите лил тоди, ему лучше знать. я у него как раз и спрашивал
  20. С этим я полностью соглашусь. Плюс ко всему, здесь полно отсебятены. Ну какая нафиг кража исходников? Не читайте вообще эту статью и уберите ее отсюда, в ней полно юношеского бреда (ага, я давно ее писал). Такое должен писать знающий человек, а не кто-то там со стороны. дакилла это не брет это на самом деле так было я про историю мта да и вообще в целом.
  21. bindKey ("название кнопки", "down", название функции) и используй [lua=]/lua]
  22. UPDATE 2.2.5 fixed more bugs: -Fixed bug MAP manager (updated MAP manager) 100% -Fixed bug with missiontimer (updated missiontimer) 100% -Corrected some maps that can run for them 100% -corrected gravity 100% -Fixed 2 maps 100% remove: -remove zm-crysis(very long map) -remove zm-fortess(very long map) added: -added money for infection 100% -Added update statistics for the infection in the scoreboard 100% screnns: server name: Advanced Zombie Mod | In Deveploment | On Hosting server ip:109.95.210.20:22043 Welcome
  23. OMG I removed the outside of the function (thePlayer) and the script started to work but not quite yet He wrote "thePlayer element type: resource" on the "player" there is nothing broneskins = { [167]=true, [277]=true, [264]=true } -- бронерованные зомби noheadskins= { [70]=true, [108]=true, [128]=true, [188]=true, [259]=true } -- без головные зомби speedskins = { [92]=true, [162]=true, [206]=true, [209]=true, [212]=true, [229]=true, [230]=true } -- скоростные зомби fireskins = { [105]=true, [107]=true, [127]=true, [280]=true, [287]=true } -- огненные зомби function createZombieClass() --setTimer(createZombieClass,1000,1) if isElement ( source ) then outputChatBox ( "thePlayer element type: "..getElementType (source) ) --If this says player then just delete this line local idSkin = getElementModel (source) if idSkin == broneskins then triggerClientEvent (source,"onbronezombies", source) outputChatBox ( "1") elseif idSkin == noheadskins then setPedHeadless( source, true ) outputChatBox ( "2") elseif idSkin == speedskins then triggerClientEvent (source,"onspeedzombies", source) setPedStat ( source, 24, 200 ) -- но меньше жизек setElementHealth (source, 1000-(800-getElementHealth(source))) outputChatBox ( "3") elseif idSkin == fireskins then setPedOnFire ( source, true ) outputChatBox ( "4") end end end
×
×
  • Create New...