Jump to content

[REL] Zday, a Zombie Infestation Script


Recommended Posts

Posted
  
local hillArea = createColRectangle ( 392.38784790039, 1784,4426269531, 0, 15, 15 ) 
local hillRadar = createRadarArea ( 392.38784790039, 1784.4426269531,-300,300, 0, 55, 0, 175 ) 
  
ZombieLimit = get("zombies.MaxZombies")-- HOW MANY ZOMBIES SHOULD EXIST AT MAXIMUM? 
ZombieStreaming = get("zombies.StreamMethod") -- 1 to constantly stream zombies, 0 to only allow zombies to spawn via.........and so on  

and now the part with SetElementData

  
function player_Connect() 
    setElementData (hillRadar, "zombieProof", true) 
    setElementData ( source, "dangercount", 0 ) 
end 
addEventHandler ( "onPlayerConnect", getRootElement(), player_Connect ) 

please note that it doesn t matter if i use hillArea or hillRadar..it has the same effect :/

Posted

well, try it and you will see. I think its 10000x faster than waiting for a reply. just set the spawns dimension in map editor or something. But peds i think, will have to be modified in the script to appear in diff dimension (map editor cant do that). Anyway. Dimensions have never worked for me :D

Posted

That doens't helps me at all, do you mean the "Zombies" script can't set their dimensions defined on .map file?

Edit: i've added to set their dimensions, problem fixed.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

I seen that, but no problem, i've added it myself for map spawnpoints :)

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

why do you use onPlayerConnect? this makes no sense for me o_o, put it onResourceStart (i think will be much better)

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

im not sure why your putting it inside the actal zombie resource, or why your setting the elementdata seperate from the creating of the radarareawhile using the local arg. but heres what you would need to do:

local hillRadar = createRadarArea ( 392.38784790039, 1784.4426269531,-300,300, 0, 55, 0, 175 ) 
setElementData (hillRadar, "zombieProof", true) 

Check out my recent work:

ZDay - a zombie script

Slothbot - an AI deathmatch bot

my community profile (all my resources)

Posted

thx very much. Well i did it so, cause it looked like part of the code so i thought i need some kind of function (like IF something happens, then setelementdata...) and so on so i put it to the place where all of this is :D. and thanks again

Posted

bad news....it doesnt wor

EDIT: maybe it is related to the error i have. Whenever i try to restart the script debug tells me ERROR, zombies/zombie_server.lua 230:failed to call scoreboardAddColumn or something. Ive got the right scoreboard

Posted

cant tell dude, but it looks like the game thinks the whole world is zombie proof. and theres nothing bad in any other script/line cause when i delete the lines with the area and setelementdata everything works OK.

Posted

It might be a good idea to send you my script so you can try if it works for you.

http://www.sendspace.com/file/mz1px6

EDIT: Dont waste your time, ive redownloaded zombie script, put those 2 lines into it and it works lol :D. I dont know why the previous didnt (perhaps i delted some end or if in the script while i was meesing with the radar) anyway THX fo help.

  • 2 weeks later...
Posted

[2011-02-14 02:52:09] start: Requested by Console 
[2011-02-14 02:52:09] Starting zombie 
[2011-02-14 02:52:09] WARNING: zombie\Zombietown_server.lua:55: Bad 'ped' pointer @ 'isPedOnGround'(1) 
[2011-02-14 02:52:09] WARNING: zombie\Zombietown_server.lua:55: Bad 'ped' pointer @ 'isPedOnGround'(1) 
[2011-02-14 02:52:09] WARNING: zombie\Zombietown_server.lua:55: Bad 'ped' pointer @ 'isPedOnGround'(1) 
[2011-02-14 02:52:09] WARNING: zombie\Zombietown_server.lua:55: Bad 'ped' pointer @ 'isPedOnGround'(1) 
[2011-02-14 02:52:09] WARNING: zombie\Zombietown_server.lua:55: Bad 'ped' pointer @ 'isPedOnGround'(1) 
[2011-02-14 02:52:09] WARNING: zombie\Zombietown_server.lua:55: Bad 'ped' pointer @ 'isPedOnGround'(1) 
[2011-02-14 02:52:09] WARNING: zombie\Zombietown_server.lua:55: Bad 'ped' pointer @ 'isPedOnGround'(1) 
[2011-02-14 02:52:09] WARNING: zombie\Zombietown_server.lua:55: Bad 'ped' pointer @ 'isPedOnGround'(1) 
[2011-02-14 02:52:09] WARNING: zombie\Zombietown_server.lua:55: Bad 'ped' pointer @ 'isPedOnGround'(1) 
[2011-02-14 02:52:09] WARNING: zombie\Zombietown_server.lua:55: Bad 'ped' pointer @ 'isPedOnGround'(1) 
[2011-02-14 02:52:09] WARNING: zombie\Zombietown_server.lua:55: Bad 'ped' pointer @ 'isPedOnGround'(1) 
[2011-02-14 02:52:09] WARNING: zombie\Zombietown_server.lua:55: Bad 'ped' pointer @ 'isPedOnGround'(1) 
[2011-02-14 02:52:09] WARNING: zombie\Zombietown_server.lua:55: Bad 'ped' pointer @ 'isPedOnGround'(1) 
[2011-02-14 02:52:09] WARNING: zombie\Zombietown_server.lua:55: Bad 'ped' pointer @ 'isPedOnGround'(1) 
[2011-02-14 02:52:09] WARNING: zombie\Zombietown_server.lua:55: Bad 'ped' pointer @ 'isPedOnGround'(1) 
[2011-02-14 02:52:09] WARNING: zombie\Zombietown_server.lua:55: Bad 'ped' pointer @ 'isPedOnGround'(1) 
[2011-02-14 02:52:09] WARNING: zombie\Zombietown_server.lua:55: Bad 'ped' pointer @ 'isPedOnGround'(1) 
[2011-02-14 02:52:09] WARNING: zombie\Zombietown_server.lua:55: Bad 'ped' pointer @ 'isPedOnGround'(1) 
[2011-02-14 02:52:09] WARNING: zombie\Zombietown_server.lua:55: Bad 'ped' pointer @ 'isPedOnGround'(1) 
[2011-02-14 02:52:09] WARNING: zombie\Zombietown_server.lua:55: Bad 'ped' pointer @ 'isPedOnGround'(1) 
[2011-02-14 02:52:09] WARNING: zombie\Zombietown_server.lua:55: Bad 'ped' pointer @ 'isPedOnGround'(1) 
[2011-02-14 02:52:09] WARNING: zombie\Zombietown_server.lua:55: Bad 'ped' pointer @ 'isPedOnGround'(1) 
[2011-02-14 02:52:09] WARNING: zombie\Zombietown_server.lua:55: Bad 'ped' pointer @ 'isPedOnGround'(1) 
[2011-02-14 02:52:09] start: Resource 'zombie' started 
  

How can I fix this problem?

  • 3 weeks later...
Posted

Woah, congratulations dude!

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

I was wondering slothman if you could make an admin toggle for zombie free zones so you could zone off a city and give everyone like five minutes to get guns and life then toggle zombie free zone on admin menu so the zombies would come into the city. mabe put a fence around a city and make gates open up win you toggle the zombies? Im not exactly a scripter or id try to do it.

Posted

That's up to the server owner, he already did much giving this wonderfull resource i think ;).

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...