^iiEcoo'x_) Posted January 15, 2017 Share Posted January 15, 2017 Hello I've downloaded the latest version of the zombie Scripts https://community.multitheftauto.com/index.php?p=gallery&s=preview&id=347 I want to put a zombie in a dim ? Link to comment
Tekken Posted January 15, 2017 Share Posted January 15, 2017 What's "dim" is it dimension? if yes then just do it like this: createZombie(x, y, z, rot, skin, interior, dimension); Link to comment
^iiEcoo'x_) Posted January 15, 2017 Author Share Posted January 15, 2017 31 minutes ago, Tekken said: What's "dim" is it dimension? if yes then just do it like this: createZombie(x, y, z, rot, skin, interior, dimension); I want the amendment to the original script Link to comment
Rataj Posted January 15, 2017 Share Posted January 15, 2017 There is RanSpawn_Z function (starting on line 385 in zombie_server.lua), you have to use setElementDimension after ped is created. Also if you're using stream method to constantly spawn zombies near players, don't forget to add statement, which will check if player is in that dimension (SpawnZombie function). Link to comment
^iiEcoo'x_) Posted January 15, 2017 Author Share Posted January 15, 2017 11 minutes ago, Rataj said: There is RanSpawn_Z function (starting on line 385 in zombie_server.lua), you have to use setElementDimension after ped is created. Also if you're using stream method to constantly spawn zombies near players, don't forget to add statement, which will check if player is in that dimension (SpawnZombie function). Can you do for me? Please Link to comment
Simple0x47 Posted January 15, 2017 Share Posted January 15, 2017 Here... -- SERVER addEvent( "onZombieSpawn", true ) function RanSpawn_Z ( gx, gy, gz, rot, zDimension) local safezone = 0 local allradars = getElementsByType("radararea") for i = 1, #allradars do local theradar = allradars[ i ] if getElementData(theradar, "zombieProof") == true then if isInsideRadarArea ( theradar, gx, gy ) then safezone = 1 end end end if safezone == 0 then if table.getn ( everyZombie ) < newZombieLimit then if not rot then rot = math.random (1,359) end randomZskin = math.random ( 1, table.getn ( ZombiePedSkins ) ) local zomb = createPed( tonumber( ZombiePedSkins[randomZskin] ), gx, gy, gz ) if zomb ~= false then setElementDimension( zomb, zDimension or 0 ) setElementData ( zomb, "zombie", true ) table.insert( everyZombie, zomb ) setTimer ( function (zomb, rot) if ( isElement ( zomb ) ) then setPedRotation ( zomb, rot ) end end, 500, 1, zomb, rot ) setTimer ( function (zomb) if ( isElement ( zomb ) ) then setPedAnimation ( zomb, "ped", chaseanim, -1, true, true, true ) end end, 1000, 1, zomb ) setTimer ( function (zomb) if ( isElement ( zomb ) ) then setElementData ( zomb, "status", "idle" ) end end, 2000, 1, zomb ) triggerClientEvent ( "Zomb_STFU", getRootElement(), zomb ) end end end end addEventHandler( "onZombieSpawn", getRootElement(), RanSpawn_Z ) -- CLIENT addEvent( "Spawn_Placement", true ) function Spawn_Place(xcoord, ycoord) local x,y,z = getElementPosition( getLocalPlayer() ) local playerDimension = getElementDimension( localPlayer ) local posx = x+xcoord local posy = y+ycoord local gz = getGroundPosition ( posx, posy, z+500 ) triggerServerEvent ("onZombieSpawn", getLocalPlayer(), posx, posy, gz+1, playerDimension ) end addEventHandler("Spawn_Placement", getRootElement(), Spawn_Place) 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now