Jump to content

Need help


Timoow13

Recommended Posts

Hello,

How do i put zombies in 1 area, and not everywhere? I only want zombies in that little spooky village in LV desert, but i don't know how to do that. Can someone give me a script for that? (if it's possible :D) And is there also a script to get $100 for each zombie you kill?

Link to comment

This script will give $100 each time you kill a zombie.

addEvent ( "onZombieWasted", true ) 
addEventHandler ( "onZombieWasted", root, 
    function ( killer ) 
        if ( killer and getElementType ( killer ) == "player" ) then 
            givePlayerMoney ( killer, 100 ) 
        end 
    end 
) 

About the zombies just in one zone, you could set the spawn method to spawnpoints and then create them where you want.

Link to comment
posX="" posY="" posZ="" these are the spawn points you can make it like this

posX="Here Your Pos X" posY="Here Your Pos Y" posZ="Here Your Pos Z"

and you can get them form admin Panel

I already did that, i was a bit late with editing my comment :D But thanks for responding! But that money-thing doesn't work, where do i have to put it?

Link to comment

server.lua

addEvent("onZombieWasted",true) 
addEventHandler("onZombieWasted",getRootElement(), 
function (killer) 
givePlayerMoney(killer,math.random(100,200)) 
end) 

meta.xml

<meta> 
    <info author="mtafourm" version="1.0" type="script" name="MoneyReward" /> 
    <script src="server.lua" type="server"/> 
</meta> 

Link to comment

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...