Jump to content

Make zombies shoot


Soren

Recommended Posts

Posted

Hi all, I found the way to give to the zombies weapons but i want to give them a fire weapon (Ak-47, M4, etc) and make the shoot it. I give them the weapon but they dont shoot. Somebody know how to?

Posted

As I told you before, you must use the "slothbots" for this.

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

Is really simple to use it, here I'll leave a example.

https://wiki.multitheftauto.com/wiki/Slothman/Slothbot

function spawnSlothBot(thePlayer, cmd, skin, weapon, mode, rot, team) 
    local x, y, z = getElementPosition (thePlayer) 
    local rot = tonumber(rot) or 0 
    local team = getTeamFromName(team) 
    local int = getElementInterior(thePlayer) 
    local dim = getElementDimension(thePlayer) 
    local weapon = tonumber(weapon) or 0 
    local skin = tonumber(skin) or 0 
    exports["slothbot"]:spawnBot( x, y+1, z, rot, skin, int, dim, team, weapon, mode or "hunting", true ) 
end 
addCommandHandler ( "spawnbot", spawnSlothBot ) 

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

Ok, thats a example, i dint understand it at all, it suposed to create a ped in the position i put? Any example how to do it with a zombie?

Posted

A slothbot not a ped, and is really easy to understand, what I think is that you aren't even thinking on what do you want to do.

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

ok i take a time to read the wiki again and the script you put there is a hunt slothbot that will hunt you ok,

How can i make to spawn lots of slothbots in the map?

Posted

Use the exported function spawnBot as I'd in that example.

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

it will spawn only 1 both? or many boths? far as i know your script will spawn 1 both in the place the player is?

Posted

You can spawn as much bots as you want to.

Command is: /spawnbot

and yes, it'll spawn the bot at your location.

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 instead of asking such s** question you don't go and test it by yourself?

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

*facepalm*

Please review the script.. As you see in this line

     local x, y, z = getElementPosition (thePlayer) -- We get your coordinates and store them in x,y,z.  

And in this one :

exports["slothbot"]:spawnBot( x, y+1, z, rot, skin, int, dim, team, weapon, mode or "hunting", true ) -- Here we call the x,y,z to spawn them , but , the bot won't spawn where are you because of this "y+1" , he will spawn one y coordinate away from you. 

Happy ? ..

My Projects!

No one.

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