Guest User

ddfhjkgsdfjsdjhfgasdjfd

a guest
Oct 18th, 2012
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 18.08 KB | None | 0 0
  1. Client ...
  2.  
  3. myZombies = { }
  4. helmetzombies = { 27, 51, 52, 99, 27, 137, 153, 167, 205, 260, 277, 278, 279, 284, 285 }
  5. resourceRoot = getResourceRootElement()
  6.  
  7. --FORCES ZOMBIES TO MOVE ALONG AFTER THEIR TARGET PLAYER DIES
  8. function playerdead ()
  9.     setTimer ( Zomb_release, 4000, 1 )
  10. end
  11. addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), playerdead )
  12.  
  13. function Zomb_release ()
  14.     for k, ped in pairs( myZombies ) do
  15.         if (isElement(ped)) then
  16.             if (getElementData (ped, "zombie") == true) then
  17.                 setElementData ( ped, "target", nil )
  18.                 setElementData ( ped, "status", "idle" )
  19.                 table.remove(myZombies,k)
  20.             end
  21.         end
  22.     end
  23. end
  24.  
  25. --REMOVES A ZOMBIE FROM INFLUENCE AFTER ITS KILLED
  26. function pedkilled ( killer, weapon, bodypart )
  27.     if (getElementData (source, "zombie") == true) and (getElementData (source, "status") ~= "dead" ) then
  28.         setElementData ( source, "target", nil )
  29.         setElementData ( source, "status", "dead" )
  30.     end
  31. end
  32. addEventHandler ( "onClientPedWasted", getRootElement(), pedkilled )
  33.  
  34. --THIS CHECKS ALL ZOMBIES EVERY SECOND TO SEE IF THEY ARE IN SIGHT
  35. function zombie_check ()
  36.     if (getElementData (getLocalPlayer (), "zombie") ~= true) and ( isPlayerDead ( getLocalPlayer () ) == false ) then
  37.         local zombies = getElementsByType ( "ped",getRootElement(),true )
  38.         local Px,Py,Pz = getElementPosition( getLocalPlayer () )
  39.         if isPedDucked ( getLocalPlayer ()) then
  40.             local Pz = Pz-1
  41.         end    
  42.         for theKey,theZomb in ipairs(zombies) do
  43.             if (isElement(theZomb)) then
  44.                 local Zx,Zy,Zz = getElementPosition( theZomb )
  45.                 if (getDistanceBetweenPoints3D(Px, Py, Pz, Zx, Zy, Zz) < 45 ) then
  46.                     if (getElementData (theZomb, "zombie") == true) then
  47.                         if ( getElementData ( theZomb, "status" ) == "idle" ) then --CHECKS IF AN IDLE ZOMBIE IS IN SIGHT
  48.                             local isclear = isLineOfSightClear (Px, Py, Pz+1, Zx, Zy, Zz +1, true, false, false, true, false, false, false)
  49.                             if (isclear == true) then
  50.                                 setElementData ( theZomb, "status", "chasing" )
  51.                                 setElementData ( theZomb, "target", getLocalPlayer() )
  52.                                 table.insert( myZombies, theZomb ) --ADDS ZOMBIE TO PLAYERS COLLECTION
  53.                                 table.remove( zombies, theKey)
  54.                                 zombieradiusalert (theZomb)
  55.                             end
  56.                         elseif (getElementData(theZomb,"status") == "chasing") and (getElementData(theZomb,"target") == nil) then --CHECKS IF AN AGGRESSIVE LOST ZOMBIE IS IN SIGHT
  57.                             local isclear = isLineOfSightClear (Px, Py, Pz+1, Zx, Zy, Zz +1, true, false, false, true, false, false, false)
  58.                             if (isclear == true) then
  59.                                 setElementData ( theZomb, "target", getLocalPlayer() )
  60.                                 isthere = "no"
  61.                                 for k, ped in pairs( myZombies ) do
  62.                                     if ped == theZomb then
  63.                                         isthere = "yes"
  64.                                     end
  65.                                 end
  66.                                 if isthere == "no" then
  67.                                     table.insert( myZombies, theZomb ) --ADDS THE WAYWARD ZOMBIE TO THE PLAYERS COLLECTION
  68.                                     table.remove( zombies, theKey)
  69.                                 end
  70.                             end
  71.                         elseif ( getElementData ( theZomb, "target" ) == getLocalPlayer() ) then --CHECKS IF AN ALREADY AGGRESSIVE ZOMBIE IS IN SIGHT
  72.                             local isclear = isLineOfSightClear (Px, Py, Pz+1, Zx, Zy, Zz +1, true, false, false, true, false, false, false)
  73.                             if (isclear == false) then --IF YOUR ZOMBIE LOST YOU, MAKES IT REMEMBER YOUR LAST COORDS
  74.                                 setElementData ( theZomb, "target", nil )
  75.                                 triggerServerEvent ("onZombieLostPlayer", theZomb, oldPx, oldPy, oldPz)
  76.                             end
  77.                         end
  78.                     end
  79.                 end
  80.             end
  81.         end
  82.     --this second half is for checking peds and zombies
  83.    
  84.         local nonzombies = getElementsByType ( "ped",getRootElement(),true )
  85.         for theKey,theZomb in ipairs(zombies) do
  86.             if (isElement(theZomb)) then
  87.                 if (getElementData (theZomb, "zombie") == true) then
  88.                     local Zx,Zy,Zz = getElementPosition( theZomb )
  89.                     for theKey,theNonZomb in ipairs(nonzombies) do
  90.                         if (getElementData (theNonZomb, "zombie") ~= true) then -- if the ped isnt a zombie
  91.                             local Px,Py,Pz = getElementPosition( theNonZomb )
  92.                             if (getDistanceBetweenPoints3D(Px, Py, Pz, Zx, Zy, Zz) < 45 ) then
  93.                                 local isclear = isLineOfSightClear (Px, Py, Pz+1, Zx, Zy, Zz +1, true, false, false, true, false, false, false )
  94.                                 if (isclear == true) and ( getElementHealth ( theNonZomb ) > 0) then
  95.                                     if ( getElementData ( theZomb, "status" ) == "idle" ) then --CHECKS IF AN IDLE ZOMBIE IS IN SIGHT
  96.                                         triggerServerEvent ("onZombieLostPlayer", theZomb, Px, Py, Pz)                                 
  97.                                         setElementData ( theZomb, "status", "chasing" )
  98.                                         setElementData ( theZomb, "target", theNonZomb )
  99.                                         zombieradiusalert (theZomb)
  100.                                     elseif ( getElementData ( theZomb, "status" ) == "chasing" ) and ( getElementData ( theZomb, "target" ) == nil) then
  101.                                         triggerServerEvent ("onZombieLostPlayer", theZomb, Px, Py, Pz)
  102.                                         setElementData ( theZomb, "target", theNonZomb )                                   
  103.                                     end
  104.                                 end                
  105.                             end    
  106.                             if ( getElementData ( theZomb, "target" ) == theNonZomb ) then --CHECKS IF AN ALREADY AGGRESSIVE ZOMBIE IS IN SIGHT OF THE PED
  107.                                 local Px,Py,Pz = getElementPosition( theNonZomb )
  108.                                 if (getDistanceBetweenPoints3D(Px, Py, Pz, Zx, Zy, Zz) < 45 ) then
  109.                                     local isclear = isLineOfSightClear (Px, Py, Pz+1, Zx, Zy, Zz+1, true, false, false, true, false, false, false)
  110.                                     if (isclear == false) then --IF YOUR ZOMBIE LOST THE PED, MAKES IT REMEMBER the peds LAST COORDS
  111.                                         triggerServerEvent ("onZombieLostPlayer", theZomb, Px, Py, Pz)                         
  112.                                         setElementData ( theZomb, "target", nil )
  113.                                     end
  114.                                 end
  115.                             end
  116.                         end
  117.                     end
  118.                 end
  119.             end
  120.         end
  121.     end
  122.     for k, ped in pairs( myZombies ) do
  123.         if (isElement(ped) == false) then
  124.             table.remove( myZombies, k)
  125.         end
  126.     end
  127.     oldPx,oldPy,oldPz = getElementPosition( getLocalPlayer () )
  128. end
  129.  
  130.  
  131.  
  132.  
  133. function clientsetup()
  134.     oldPx,oldPy,oldPz = getElementPosition( getLocalPlayer () )
  135.  
  136. --ALL ZOMBIES STFU
  137.     local zombies = getElementsByType ( "ped" )
  138.     for theKey,theZomb in ipairs(zombies) do
  139.         if (isElement(theZomb)) then
  140.             if (getElementData (theZomb, "zombie") == true) then
  141.                 setPedVoice(theZomb, "PED_TYPE_DISABLED")
  142.             end
  143.         end
  144.     end
  145.    
  146. --SKIN REPLACEMENTS
  147.     local skin = engineLoadTXD ( "skins/13.txd" ) --bleedin eyes 31 by Slothman
  148.     engineImportTXD ( skin, 13 )
  149.     local skin = engineLoadTXD ( "skins/22.txd" ) -- slashed 12 by Wall-E
  150.     engineImportTXD ( skin, 22 )   
  151.     local skin = engineLoadTXD ( "skins/56.txd" ) --young and blue by Slothman
  152.     engineImportTXD ( skin, 56 )
  153.     local skin = engineLoadTXD ( "skins/67.txd" ) -- slit r* employee
  154.     engineImportTXD ( skin, 67 )
  155.     local skin = engineLoadTXD ( "skins/68.txd" ) -- shredded preist by Deixell
  156.     engineImportTXD ( skin, 68 )
  157.     local skin = engineLoadTXD ( "skins/69.txd" ) --bleedin eyes in denim by Capitanazop
  158.     engineImportTXD ( skin, 69 )
  159.     local skin = engineLoadTXD ( "skins/70.txd" ) --ultra gory scientist by 50p
  160.     engineImportTXD ( skin, 70 )
  161.     local skin = engineLoadTXD ( "skins/84.txd" ) --guitar wolf (nonzombie) by Slothman
  162.     engineImportTXD ( skin, 84 )
  163.     local skin = engineLoadTXD ( "skins/92.txd" ) -- peeled flesh by xbost
  164.     engineImportTXD ( skin, 92 )
  165.     local skin = engineLoadTXD ( "skins/97.txd" ) -- easterboy by Slothman
  166.     engineImportTXD ( skin, 97 )
  167.     local skin = engineLoadTXD ( "skins/105.txd" ) --Scarred Grove Gangster by Wall-E
  168.     engineImportTXD ( skin, 105 )
  169.     local skin = engineLoadTXD ( "skins/107.txd" ) --ripped and slashed grove by Wall-E
  170.     engineImportTXD ( skin, 107 )
  171.     local skin = engineLoadTXD ( "skins/108.txd" ) -- skeleton thug by Deixell
  172.     engineImportTXD ( skin, 108 )
  173.     local skin = engineLoadTXD ( "skins/111.txd" ) --Frank West from dead rising (nonzombie) by Slothman
  174.     engineImportTXD ( skin, 111 )
  175.     local skin = engineLoadTXD ( "skins/126.txd" ) -- bullet ridden wiseguy by Slothman
  176.     engineImportTXD ( skin, 126 )
  177.     local skin = engineLoadTXD ( "skins/127.txd" ) --flyboy from dawn of the dead by Slothman
  178.     engineImportTXD ( skin, 127 )
  179.     local skin = engineLoadTXD ( "skins/128.txd" ) --holy native by Slothman
  180.     engineImportTXD ( skin, 128 )
  181.     local skin = engineLoadTXD ( "skins/152.txd" ) --bitten schoolgirl by Slothman
  182.     engineImportTXD ( skin, 152 )
  183.     local skin = engineLoadTXD ( "skins/162.txd" ) --shirtless redneck by Slothman
  184.     engineImportTXD ( skin, 162 )
  185.     local skin = engineLoadTXD ( "skins/167.txd" ) --dead chickenman by 50p
  186.     engineImportTXD ( skin, 167 )
  187.     local skin = engineLoadTXD ( "skins/188.txd" ) --burnt greenshirt by Slothman
  188.     engineImportTXD ( skin, 188 )
  189.     local skin = engineLoadTXD ( "skins/192.txd" ) --Alice from resident evil (nonzombie) by Slothman
  190.     engineImportTXD ( skin, 192 )
  191.     local skin = engineLoadTXD ( "skins/195.txd" ) --bloody ex by Slothman
  192.     engineImportTXD ( skin, 195 )
  193.     local skin = engineLoadTXD ( "skins/206.txd" ) -- faceless zombie by Slothman
  194.     engineImportTXD ( skin, 206 )
  195.     local skin = engineLoadTXD ( "skins/209.txd" ) --Noodle vendor by 50p
  196.     engineImportTXD ( skin, 209 )
  197.     local skin = engineLoadTXD ( "skins/212.txd" ) --brainy hobo by Slothman
  198.     engineImportTXD ( skin, 212 )
  199.     local skin = engineLoadTXD ( "skins/229.txd" ) --infected tourist by Slothman
  200.     engineImportTXD ( skin, 229 )
  201.     local skin = engineLoadTXD ( "skins/230.txd" ) --will work for brains hobo by Slothman
  202.     engineImportTXD ( skin, 230 )
  203.     local skin = engineLoadTXD ( "skins/258.txd" ) --bloody sided suburbanite by Slothman
  204.     engineImportTXD ( skin, 258 )
  205.     local skin = engineLoadTXD ( "skins/264.txd" ) --scary clown by 50p
  206.     engineImportTXD ( skin, 264 )
  207.     local skin = engineLoadTXD ( "skins/274.txd" ) --Ash Williams (nonzombie) by Slothman
  208.     engineImportTXD ( skin, 274 )
  209.     local skin = engineLoadTXD ( "skins/277.txd" ) -- gutted firefighter by Wall-E
  210.     engineImportTXD ( skin, 277 )
  211.     local skin = engineLoadTXD ( "skins/280.txd" ) --infected cop by Lordy
  212.     engineImportTXD ( skin, 280 )
  213.  
  214. end
  215.  
  216. --UPDATES PLAYERS COUNT OF AGGRESIVE ZOMBIES
  217. addEventHandler ( "onClientElementDataChange", getRootElement(),
  218. function ( dataName )
  219.     if getElementType ( source ) == "ped" and dataName == "status" then
  220.         local thestatus = (getElementData ( source, "status" ))
  221.         if (thestatus == "idle") or (thestatus == "dead") then     
  222.             for k, ped in pairs( myZombies ) do
  223.                 if ped == source and (getElementData (ped, "zombie") == true) then
  224.                     setElementData ( ped, "target", nil )
  225.                     table.remove( myZombies, k)
  226.                     setElementData ( getLocalPlayer(), "dangercount", tonumber(table.getn( myZombies )) )
  227.                 end
  228.             end
  229.         end
  230.     end
  231. end )
  232.  
  233. --MAKES A ZOMBIE JUMP
  234. addEvent( "Zomb_Jump", true )
  235. function Zjump ( ped )
  236.     if (isElement(ped)) then
  237.         setPedControlState( ped, "jump", true )
  238.         setTimer ( function (ped) if ( isElement ( ped ) ) then setPedControlState ( ped, "jump", false) end end, 800, 1, ped )
  239.     end
  240. end
  241. addEventHandler( "Zomb_Jump", getRootElement(), Zjump )
  242.  
  243. --MAKES A ZOMBIE PUNCH
  244. addEvent( "Zomb_Punch", true )
  245. function Zpunch ( ped )
  246.     if (isElement(ped)) then
  247.         setPedControlState( ped, "fire", true )
  248.         setTimer ( function (ped) if ( isElement ( ped ) ) then setPedControlState ( ped, "fire", false) end end, 800, 1, ped )
  249.     end
  250. end
  251. addEventHandler( "Zomb_Punch", getRootElement(), Zpunch )
  252.  
  253. --MAKES A ZOMBIE STFU
  254. addEvent( "Zomb_STFU", true )
  255. function Zstfu ( ped )
  256.     if (isElement(ped)) then
  257.         setPedVoice(ped, "PED_TYPE_DISABLED")
  258.     end
  259. end
  260. addEventHandler( "Zomb_STFU", getRootElement(), Zstfu )
  261.  
  262. --MAKES A ZOMBIE MOAN
  263. addEvent( "Zomb_Moan", true )
  264. function Zmoan ( ped, randnum )
  265.     if (isElement(ped)) then
  266.         local Zx,Zy,Zz = getElementPosition( ped )
  267.         local sound = playSound3D("sounds/mgroan"..randnum..".ogg", Zx, Zy, Zz, false)
  268.         setSoundMaxDistance(sound, 20)
  269.     end
  270. end
  271. addEventHandler( "Zomb_Moan", getRootElement(), Zmoan )
  272.  
  273. --ZOMBIE HEADSHOTS TO ALL BUT HELMETED ZOMBIES
  274. function zombiedamaged ( attacker, weapon, bodypart )
  275.     if getElementType ( source ) == "ped" then
  276.         if (getElementData (source, "zombie") == true) then
  277.             if ( bodypart == 9 ) then
  278.                 helmeted = "no"
  279.                 local zskin = getElementModel ( source )
  280.                 for k, skin in pairs( helmetzombies ) do
  281.                     if skin == zskin then
  282.                         helmeted = "yes"
  283.                     end
  284.                 end
  285.                 if helmeted == "no" then
  286.                     triggerServerEvent ("headboom", source, source, attacker, weapon, bodypart )
  287.                 end
  288.             end
  289.         end
  290.     end
  291. end
  292. addEventHandler ( "onClientPedDamage", getRootElement(), zombiedamaged )
  293.  
  294. function zombiedkilled(killer, weapon, bodypart)
  295.     if getElementType ( source ) == "ped" then
  296.         if (getElementData (source, "zombie") == true) then
  297.             setElementCollisionsEnabled(source, false)
  298.         end
  299.     end
  300. end
  301. addEventHandler ( "onClientPedWasted", getRootElement(), zombiedkilled )
  302.  
  303. --CAUSES MORE DAMAGE TO PLAYER WHEN ATTACKED BY A ZOMBIE
  304. function zombieattack ( attacker, weapon, bodypart )
  305.     if (attacker) then
  306.         if getElementType ( attacker ) == "ped" then
  307.             if (getElementData (attacker, "zombie") == true) then
  308.                 local playerHealth = getElementHealth ( getLocalPlayer() )
  309.                 if playerHealth > 15 then
  310.                     setElementHealth ( source, playerHealth - 15 )
  311.                 else
  312.                     triggerServerEvent ("playereaten", source, source, attacker, weapon, bodypart )
  313.                 end
  314.             end
  315.         end
  316.     end
  317. end
  318. addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), zombieattack )
  319.  
  320. --WOOD GUI
  321.  
  322.  
  323.  
  324.  
  325. --ZOMBIES ATTACK FROM BEHIND AND GUI STUFF
  326. function movethroatcol ()
  327.     local screenWidth, screenHeight = guiGetScreenSize()
  328.     local dcount = tostring(table.getn( myZombies ))
  329.    
  330. end
  331. addEventHandler ( "onClientRender", getRootElement(), movethroatcol )
  332.  
  333. function choketheplayer ( theElement, matchingDimension )
  334.     if getElementType ( theElement ) == "ped" and ( isPlayerDead ( getLocalPlayer () ) == false ) then
  335.         if ( getElementData ( theElement, "target" ) == getLocalPlayer () ) and (getElementData (theElement, "zombie") == true) then
  336.             local px,py,pz = getElementPosition( getLocalPlayer () )
  337.             setTimer ( checkplayermoved, 600, 1, theElement, px, py, pz)
  338.         end
  339.     end
  340. end
  341. addEventHandler ( "onClientColShapeHit", getRootElement(), choketheplayer )
  342.  
  343. function checkplayermoved (zomb, px, py, pz)
  344.     if (isElement(zomb)) then
  345.         local nx,ny,nz = getElementPosition( getLocalPlayer () )
  346.         local distance = (getDistanceBetweenPoints3D (px, py, pz, nx, ny, nz))
  347.         if (distance < .7) and ( isPlayerDead ( getLocalPlayer () ) == false ) then
  348.             setElementData ( zomb, "status", "throatslashing" )
  349.         end
  350.     end
  351. end
  352.  
  353. --ALERTS ANY IDLE ZOMBIES WITHIN A RADIUS OF 10 WHEN GUNSHOTS OCCUR OR OTHER ZOMBIES GET ALERTED
  354. function zombieradiusalert (theElement)
  355.     local Px,Py,Pz = getElementPosition( theElement )
  356.     local zombies = getElementsByType ( "ped" )
  357.     for theKey,theZomb in ipairs(zombies) do
  358.         if (isElement(theZomb)) then
  359.             if (getElementData (theZomb, "zombie") == true) then
  360.                 if ( getElementData ( theZomb, "status" ) == "idle" ) then
  361.                     local Zx,Zy,Zz = getElementPosition( theZomb )
  362.                     local distance = (getDistanceBetweenPoints3D (Px, Py, Pz, Zx, Zy, Zz))
  363.                     if (distance < 10) and ( isPlayerDead ( getLocalPlayer () ) == false ) then
  364.                         isthere = "no"
  365.                         for k, ped in pairs( myZombies ) do
  366.                             if ped == theZomb then
  367.                                 isthere = "yes"
  368.                             end
  369.                         end
  370.                         if isthere == "no" and (getElementData (getLocalPlayer (), "zombie") ~= true) then
  371.                             if (getElementType ( theElement ) == "ped") then
  372.                                 local isclear = isLineOfSightClear (Px, Py, Pz, Zx, Zy, Zz, true, false, false, true, false, false, false)
  373.                                 if (isclear == true) then
  374.                                     setElementData ( theZomb, "status", "chasing" )
  375.                                     setElementData ( theZomb, "target", getLocalPlayer () )
  376.                                     table.insert( myZombies, theZomb ) --ADDS ZOMBIE TO PLAYERS COLLECTION
  377.                                 end
  378.                             else
  379.                                 setElementData ( theZomb, "status", "chasing" )
  380.                                 setElementData ( theZomb, "target", getLocalPlayer () )
  381.                                 table.insert( myZombies, theZomb ) --ADDS ZOMBIE TO PLAYERS COLLECTION
  382.                             end
  383.                         end
  384.                     end
  385.                 end
  386.             end
  387.         end
  388.     end
  389. end
  390.  
  391. function shootingnoise ( weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement)
  392.     if alertspacer ~= 1 then
  393.         if (weapon == 9) then
  394.             alertspacer = 1
  395.             setTimer ( resetalertspacer, 5000, 1 )
  396.             zombieradiusalert(getLocalPlayer ())
  397.         elseif (weapon > 21) and (weapon ~= 23) then
  398.             alertspacer = 1
  399.             setTimer ( resetalertspacer, 5000, 1 )
  400.             zombieradiusalert(getLocalPlayer ())
  401.         end
  402.     end
  403.     if hitElement then
  404.         if (getElementType ( hitElement ) == "ped") then
  405.             if (getElementData (hitElement, "zombie") == true) then        
  406.                 isthere = "no"
  407.                 for k, ped in pairs( myZombies ) do
  408.                     if ped == hitElement then
  409.                         isthere = "yes"
  410.                     end
  411.                 end
  412.                 if isthere == "no" and (getElementData (getLocalPlayer (), "zombie") ~= true) then
  413.                     setElementData ( hitElement, "status", "chasing" )
  414.                     setElementData ( hitElement, "target", getLocalPlayer () )
  415.                     table.insert( myZombies, hitElement ) --ADDS ZOMBIE TO PLAYERS COLLECTION
  416.                     zombieradiusalert (hitElement)
  417.                 end
  418.             end
  419.         end
  420.     end
  421. end
  422. addEventHandler ( "onClientPlayerWeaponFire", getLocalPlayer (), shootingnoise )
  423.  
  424. function resetalertspacer ()
  425.     alertspacer = nil
  426. end
  427.  
  428. function choketheplayer ( theElement, matchingDimension )
  429.     if getElementType ( theElement ) == "ped" and ( isPlayerDead ( getLocalPlayer () ) == false ) and (getElementData (theElement , "zombie") == true) then
  430.         if ( getElementData ( theElement, "target" ) == getLocalPlayer () ) then
  431.             local px,py,pz = getElementPosition( getLocalPlayer () )
  432.             setTimer ( checkplayermoved, 600, 1, theElement, px, py, pz)
  433.         end
  434.     end
  435. end
  436.  
  437. addEvent( "Spawn_Placement", true )
  438. function Spawn_Place(xcoord, ycoord)
  439.     local x,y,z = getElementPosition( getLocalPlayer() )
  440.     local posx = x+xcoord
  441.     local posy = y+ycoord
  442.     local gz = getGroundPosition ( posx, posy, z+500 )
  443.     triggerServerEvent ("onZombieSpawn", getLocalPlayer(), posx, posy, gz+1 )
  444. end
  445. addEventHandler("Spawn_Placement", getRootElement(), Spawn_Place)
  446.  
  447. --INITAL SETUP
  448.  
  449. function clientsetupstarter(startedresource)
  450.     if startedresource == getThisResource() then
  451.         setTimer ( clientsetup, 1234, 1)
  452.         MainClientTimer1 = setTimer ( zombie_check, 1000, 0)  --STARTS THE TIMER TO CHECK FOR ZOMBIES
  453.     end
  454. end
  455. addEventHandler("onClientResourceStart", getRootElement(), clientsetupstarter)
Advertisement
Add Comment
Please, Sign In to add comment