Jump to content

Okumura

Members
  • Posts

    17
  • Joined

  • Last visited

Everything posted by Okumura

  1. Sorry me equivoque abia puesto eso en el client y ahora si aparecen de fuego
  2. function onZombieWasted (killer) if (getElementModel( source) == 264) then local pX, pY, pZ = getElementPosition ( source ) createExplosion ( pX, pY, pZ, 0, source ) end end addEvent("onZombieWasted",true) addEventHandler ("onZombieWasted", root, onZombieWasted) function onZombieWasted (killer) if (getElementModel( source) == 127) then local pX, pY, pZ = getElementPosition ( source ) createExplosion ( pX, pY, pZ, 0, source ) end end addEvent("onZombieWasted",true) addEventHandler ("onZombieWasted", root, onZombieWasted) function onZombieWasted (killer) if (getElementModel( source) == 105) then local pX, pY, pZ = getElementPosition ( source ) createExplosion ( pX, pY, pZ, 0, source ) end end addEvent("onZombieWasted",true) addEventHandler ("onZombieWasted", root, onZombieWasted) function onZombieWasted (killer) if (getElementModel( source) == 258) then local pX, pY, pZ = getElementPosition ( source ) createExplosion ( pX, pY, pZ, 0, source ) end end addEvent("onZombieWasted",true) addEventHandler ("onZombieWasted", root, onZombieWasted) function onZombieWasted (killer) if (getElementModel( source) == 264) then local pX, pY, pZ = getElementPosition ( source ) createExplosion ( pX, pY, pZ, 0, source ) end end addEvent("onZombieWasted",true) addEventHandler ("onZombieWasted", root, onZombieWasted) function onZombieWasted (killer) if (getElementModel( source) == 277) then local pX, pY, pZ = getElementPosition ( source ) createExplosion ( pX, pY, pZ, 0, source ) end end addEvent("onZombieWasted",true) addEventHandler ("onZombieWasted", root, onZombieWasted) eso es todo lo que e agregado y con eso me aparecen los zombies
  3. myZombies = { } helmetzombies = { 27, 51, 52, 99, 27, 137, 153, 167, 205, 260, 277, 278, 279, 284, 285 } resourceRoot = getResourceRootElement() --FORCES ZOMBIES TO MOVE ALONG AFTER THEIR TARGET PLAYER DIES function playerdead () setTimer ( Zomb_release, 4000, 1 ) end addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), playerdead ) function Zomb_release () for k, ped in pairs( myZombies ) do if (isElement(ped)) then if (getElementData (ped, "zombie") == true) then setElementData ( ped, "target", nil ) setElementData ( ped, "status", "idle" ) table.remove(myZombies,k) end end end end --REMOVES A ZOMBIE FROM INFLUENCE AFTER ITS KILLED function pedkilled ( killer, weapon, bodypart ) if (getElementData (source, "zombie") == true) and (getElementData (source, "status") ~= "dead" ) then setElementData ( source, "target", nil ) setElementData ( source, "status", "dead" ) end end addEventHandler ( "onClientPedWasted", getRootElement(), pedkilled ) --THIS CHECKS ALL ZOMBIES EVERY SECOND TO SEE IF THEY ARE IN SIGHT function zombie_check () if (getElementData (getLocalPlayer (), "zombie") ~= true) and ( isPlayerDead ( getLocalPlayer () ) == false ) then local zombies = getElementsByType ( "ped",getRootElement(),true ) local Px,Py,Pz = getElementPosition( getLocalPlayer () ) if isPedDucked ( getLocalPlayer ()) then local Pz = Pz-1 end for theKey,theZomb in ipairs(zombies) do if (isElement(theZomb)) then local Zx,Zy,Zz = getElementPosition( theZomb ) if (getDistanceBetweenPoints3D(Px, Py, Pz, Zx, Zy, Zz) < 45 ) then if (getElementData (theZomb, "zombie") == true) then if ( getElementData ( theZomb, "status" ) == "idle" ) then --CHECKS IF AN IDLE ZOMBIE IS IN SIGHT local isclear = isLineOfSightClear (Px, Py, Pz+1, Zx, Zy, Zz +1, true, false, false, true, false, false, false) if (isclear == true) then setElementData ( theZomb, "status", "chasing" ) setElementData ( theZomb, "target", getLocalPlayer() ) table.insert( myZombies, theZomb ) --ADDS ZOMBIE TO PLAYERS COLLECTION table.remove( zombies, theKey) zombieradiusalert (theZomb) end elseif (getElementData(theZomb,"status") == "chasing") and (getElementData(theZomb,"target") == nil) then --CHECKS IF AN AGGRESSIVE LOST ZOMBIE IS IN SIGHT local isclear = isLineOfSightClear (Px, Py, Pz+1, Zx, Zy, Zz +1, true, false, false, true, false, false, false) if (isclear == true) then setElementData ( theZomb, "target", getLocalPlayer() ) isthere = "no" for k, ped in pairs( myZombies ) do if ped == theZomb then isthere = "yes" end end if isthere == "no" then table.insert( myZombies, theZomb ) --ADDS THE WAYWARD ZOMBIE TO THE PLAYERS COLLECTION table.remove( zombies, theKey) end end elseif ( getElementData ( theZomb, "target" ) == getLocalPlayer() ) then --CHECKS IF AN ALREADY AGGRESSIVE ZOMBIE IS IN SIGHT local isclear = isLineOfSightClear (Px, Py, Pz+1, Zx, Zy, Zz +1, true, false, false, true, false, false, false) if (isclear == false) then --IF YOUR ZOMBIE LOST YOU, MAKES IT REMEMBER YOUR LAST COORDS setElementData ( theZomb, "target", nil ) triggerServerEvent ("onZombieLostPlayer", theZomb, oldPx, oldPy, oldPz) end end end end end end --this second half is for checking peds and zombies local nonzombies = getElementsByType ( "ped",getRootElement(),true ) for theKey,theZomb in ipairs(zombies) do if (isElement(theZomb)) then if (getElementData (theZomb, "zombie") == true) then local Zx,Zy,Zz = getElementPosition( theZomb ) for theKey,theNonZomb in ipairs(nonzombies) do if (getElementData (theNonZomb, "zombie") ~= true) then -- if the ped isnt a zombie local Px,Py,Pz = getElementPosition( theNonZomb ) if (getDistanceBetweenPoints3D(Px, Py, Pz, Zx, Zy, Zz) < 45 ) then local isclear = isLineOfSightClear (Px, Py, Pz+1, Zx, Zy, Zz +1, true, false, false, true, false, false, false ) if (isclear == true) and ( getElementHealth ( theNonZomb ) > 0) then if ( getElementData ( theZomb, "status" ) == "idle" ) then --CHECKS IF AN IDLE ZOMBIE IS IN SIGHT triggerServerEvent ("onZombieLostPlayer", theZomb, Px, Py, Pz) setElementData ( theZomb, "status", "chasing" ) setElementData ( theZomb, "target", theNonZomb ) zombieradiusalert (theZomb) elseif ( getElementData ( theZomb, "status" ) == "chasing" ) and ( getElementData ( theZomb, "target" ) == nil) then triggerServerEvent ("onZombieLostPlayer", theZomb, Px, Py, Pz) setElementData ( theZomb, "target", theNonZomb ) end end end if ( getElementData ( theZomb, "target" ) == theNonZomb ) then --CHECKS IF AN ALREADY AGGRESSIVE ZOMBIE IS IN SIGHT OF THE PED local Px,Py,Pz = getElementPosition( theNonZomb ) if (getDistanceBetweenPoints3D(Px, Py, Pz, Zx, Zy, Zz) < 45 ) then local isclear = isLineOfSightClear (Px, Py, Pz+1, Zx, Zy, Zz+1, true, false, false, true, false, false, false) if (isclear == false) then --IF YOUR ZOMBIE LOST THE PED, MAKES IT REMEMBER the peds LAST COORDS triggerServerEvent ("onZombieLostPlayer", theZomb, Px, Py, Pz) setElementData ( theZomb, "target", nil ) end end end end end end end end end for k, ped in pairs( myZombies ) do if (isElement(ped) == false) then table.remove( myZombies, k) end end oldPx,oldPy,oldPz = getElementPosition( getLocalPlayer () ) end --INITAL SETUP function clientsetupstarter(startedresource) if startedresource == getThisResource() then setTimer ( clientsetup, 1234, 1) MainClientTimer1 = setTimer ( zombie_check, 1000, 0) --STARTS THE TIMER TO CHECK FOR ZOMBIES end end addEventHandler("onClientResourceStart", getRootElement(), clientsetupstarter) function clientsetup() oldPx,oldPy,oldPz = getElementPosition( getLocalPlayer () ) throatcol = createColSphere ( 0, 0, 0, .3) woodpic = guiCreateStaticImage( .65, .06, .1, .12, "zombiewood.png", true ) guiSetVisible ( woodpic, false ) --ALL ZOMBIES STFU local zombies = getElementsByType ( "ped" ) for theKey,theZomb in ipairs(zombies) do if (isElement(theZomb)) then if (getElementData (theZomb, "zombie") == true) then setPedVoice(theZomb, "PED_TYPE_DISABLED") end end end --SKIN REPLACEMENTS local skin = engineLoadTXD ( "skins/13.txd" ) --bleedin eyes 31 by Slothman engineImportTXD ( skin, 13 ) local skin = engineLoadTXD ( "skins/22.txd" ) -- slashed 12 by Wall-E engineImportTXD ( skin, 22 ) local skin = engineLoadTXD ( "skins/56.txd" ) --young and blue by Slothman engineImportTXD ( skin, 56 ) local skin = engineLoadTXD ( "skins/67.txd" ) -- slit r* employee engineImportTXD ( skin, 67 ) local skin = engineLoadTXD ( "skins/68.txd" ) -- shredded preist by Deixell engineImportTXD ( skin, 68 ) local skin = engineLoadTXD ( "skins/69.txd" ) --bleedin eyes in denim by Capitanazop engineImportTXD ( skin, 69 ) local skin = engineLoadTXD ( "skins/70.txd" ) --ultra gory scientist by 50p engineImportTXD ( skin, 70 ) local skin = engineLoadTXD ( "skins/84.txd" ) --guitar wolf (nonzombie) by Slothman engineImportTXD ( skin, 84 ) local skin = engineLoadTXD ( "skins/92.txd" ) -- peeled flesh by xbost engineImportTXD ( skin, 92 ) local skin = engineLoadTXD ( "skins/97.txd" ) -- easterboy by Slothman engineImportTXD ( skin, 97 ) local skin = engineLoadTXD ( "skins/105.txd" ) --Scarred Grove Gangster by Wall-E engineImportTXD ( skin, 105 ) local skin = engineLoadTXD ( "skins/107.txd" ) --ripped and slashed grove by Wall-E engineImportTXD ( skin, 107 ) local skin = engineLoadTXD ( "skins/108.txd" ) -- skeleton thug by Deixell engineImportTXD ( skin, 108 ) local skin = engineLoadTXD ( "skins/111.txd" ) --Frank West from dead rising (nonzombie) by Slothman engineImportTXD ( skin, 111 ) local skin = engineLoadTXD ( "skins/126.txd" ) -- bullet ridden wiseguy by Slothman engineImportTXD ( skin, 126 ) local skin = engineLoadTXD ( "skins/127.txd" ) --flyboy from dawn of the dead by Slothman engineImportTXD ( skin, 127 ) local skin = engineLoadTXD ( "skins/128.txd" ) --holy native by Slothman engineImportTXD ( skin, 128 ) local skin = engineLoadTXD ( "skins/152.txd" ) --bitten schoolgirl by Slothman engineImportTXD ( skin, 152 ) local skin = engineLoadTXD ( "skins/162.txd" ) --shirtless redneck by Slothman engineImportTXD ( skin, 162 ) local skin = engineLoadTXD ( "skins/167.txd" ) --dead chickenman by 50p engineImportTXD ( skin, 167 ) local skin = engineLoadTXD ( "skins/188.txd" ) --burnt greenshirt by Slothman engineImportTXD ( skin, 188 ) local skin = engineLoadTXD ( "skins/192.txd" ) --Alice from resident evil (nonzombie) by Slothman engineImportTXD ( skin, 192 ) local skin = engineLoadTXD ( "skins/195.txd" ) --bloody ex by Slothman engineImportTXD ( skin, 195 ) local skin = engineLoadTXD ( "skins/206.txd" ) -- faceless zombie by Slothman engineImportTXD ( skin, 206 ) local skin = engineLoadTXD ( "skins/209.txd" ) --Noodle vendor by 50p engineImportTXD ( skin, 209 ) local skin = engineLoadTXD ( "skins/212.txd" ) --brainy hobo by Slothman engineImportTXD ( skin, 212 ) local skin = engineLoadTXD ( "skins/229.txd" ) --infected tourist by Slothman engineImportTXD ( skin, 229 ) local skin = engineLoadTXD ( "skins/230.txd" ) --will work for brains hobo by Slothman engineImportTXD ( skin, 230 ) local skin = engineLoadTXD ( "skins/258.txd" ) --bloody sided suburbanite by Slothman engineImportTXD ( skin, 258 ) local skin = engineLoadTXD ( "skins/264.txd" ) --scary clown by 50p engineImportTXD ( skin, 264 ) local skin = engineLoadTXD ( "skins/274.txd" ) --Ash Williams (nonzombie) by Slothman engineImportTXD ( skin, 274 ) local skin = engineLoadTXD ( "skins/277.txd" ) -- gutted firefighter by Wall-E engineImportTXD ( skin, 277 ) local skin = engineLoadTXD ( "skins/280.txd" ) --infected cop by Lordy engineImportTXD ( skin, 280 ) local skin = engineLoadTXD ( "skins/287.txd" ) --torn army by Deixell engineImportTXD ( skin, 287 ) end --UPDATES PLAYERS COUNT OF AGGRESIVE ZOMBIES addEventHandler ( "onClientElementDataChange", getRootElement(), function ( dataName ) if getElementType ( source ) == "ped" and dataName == "status" then local thestatus = (getElementData ( source, "status" )) if (thestatus == "idle") or (thestatus == "dead") then for k, ped in pairs( myZombies ) do if ped == source and (getElementData (ped, "zombie") == true) then setElementData ( ped, "target", nil ) table.remove( myZombies, k) setElementData ( getLocalPlayer(), "dangercount", tonumber(table.getn( myZombies )) ) end end end end end ) --MAKES A ZOMBIE JUMP addEvent( "Zomb_Jump", true ) function Zjump ( ped ) if (isElement(ped)) then setPedControlState( ped, "jump", true ) setTimer ( function (ped) if ( isElement ( ped ) ) then setPedControlState ( ped, "jump", false) end end, 800, 1, ped ) end end
  4. unction Spawn_Place(xcoord, ycoord) local x,y,z = getElementPosition( getLocalPlayer() ) local posx = x+xcoord local posy = y+ycoord local gz = getGroundPosition ( posx, posy, z+500 ) triggerServerEvent ("onZombieSpawn", getLocalPlayer(), posx, posy, gz+1 ) end addEventHandler("Spawn_Placement", getRootElement(), Spawn_Place) Alli mismo en esa script dice "onZombieSpawn
  5. Si gracias, create fire ya se q es client side por eso lo puse en el zombie_client edit: Entonces si no tiene source tendria a un ped.?
  6. Nah ya lo solucione Era solo q me faltaba una " perdon por molestarlos
  7. Bueno asta ahora tengo esto. function onZombieSpawn (burn, theSize) if (getElementModel (source) == 87) then local (x, z, y, 5 , source) createFire (x, z, y, 5 , source) end end addEvent ("onZombieSpawn" , true) addEventHandler ("onZombieSpawn", root, onZombieSpawn) Pero los zombies no aparecen >.< me podrian ayudar? esto lo puse en el zombie_client.lua porq la funcion createFire es para el client
  8. Gracias castillo espero no andarte molestando :c
  9. Hola espero que no les sea mucha molestia ayudarme con esto Trato de que zombies con una skin exploten y que otros tengan fuego. bueno estoy trabajando en los de explotar y tengo esto: Pero la cosa es que no funciona Ayudenme plis
  10. Hola bueno estaba intentando reemplazzar los peds pero no me funciona descarga y todo pero no se ven aqui les dejo los archivos
  11. Tambien si podrian correjir mi script: Que es cuando mate un tipo de zombie en una parte del cuerpo explote. function onZombieWasted element attacker, float weapon, float bodypart local pX, pY, pZ = getElementPosition ( source ) createExplosion ( pX, pY, pZ, 6, source ) end addEventHandler ( "onZombieWasted", getRootElement(), explosiononZombieWasted
  12. Hola pues estoy haciendo un gamemode zombie y soy nuevo en el script. que funciones puedo usar para ponerle armas a los zombies?
  13. Hola bueno soy nuevo en esto del script y quiero hacer un gamemode zombie pero primero empeze por scripts simples y bueno hice una script pero la cosa no me funciona alguien podria ver que esta mal.. porfavor de antemano gracias aqui les dejo el script Meta.xml: "Okumura" type="gamemode" version="1.0" description="Zombie Gamemode By okumura" /> Script.lua: function crearAutoParaJugador(elJugador, Nombrecomando, 602, 545, 496, 517, 401, 410, 518, 600, 527, 436, 589, 580, 419, 439, 533, 549, 526, 491, 474, 445, 467, 604, 426, 507, 547, 585, 405, 587, 409, 466, 550, 492, 566, 546, 540, 551, 421, 516, 529, 592, 553, 577, 488, 511, 497, 548, 563, 512, 476, 593, 447, 425, 519, 520, 460, 417, 469, 487, 513, 581, 510, 509, 522, 481, 461, 462, 448, 521, 468, 463, 586, 472, 473, 493, 595, 484, 430, 453, 452, 446, 454, 485, 552, 431, 438, 437, 574, 420, 525, 408, 416, 596, 433, 597, 427, 599, 490, 432, 528, 601, 407, 428, 544, 523, 470, 598, 499, 588, 609, 403, 498, 514, 524, 423, 532, 414, 578, 443, 486, 515, 406, 531, 573, 456, 455, 459, 543, 422, 583, 482, 478, 605, 554, 530, 418, 572, 582, 413, 440, 536, 575, 534, 567, 535, 576, 412, 402, 542, 603, 475, 449, 537, 538, 441, 464, 501, 465, 564, 568, 557, 424, 471, 504, 495, 457, 539, 483, 508, 571, 500, 444, 556, 429, 411, 541, 559, 415, 561, 480, 560, 562, 506, 565, 451, 434, 558, 494, 555, 502, 477, 503, 579, 400, 404, 489, 505, 479, 442, 458, 606, 607, 610, 590, 569, 611, 584, 608, 435, 450, 591, 594) local x,y,z = getElementPosition(elJugador) x = x + 5 if (vehiculoCreado == false) then outputChatBox("Error al crear tu auto.",elJugador) end end addCommandHandler ("crearauto", crearAutoParaJugador)
×
×
  • Create New...