Soren Posted March 9, 2012 Share Posted March 9, 2012 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? Link to comment
Castillo Posted March 9, 2012 Share Posted March 9, 2012 As I told you before, you must use the "slothbots" for this. Link to comment
Soren Posted March 9, 2012 Author Share Posted March 9, 2012 There should be other way to do it, cause i dont understand to slothbot. Link to comment
Castillo Posted March 9, 2012 Share Posted March 9, 2012 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 ) Link to comment
Soren Posted March 9, 2012 Author Share Posted March 9, 2012 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? Link to comment
Castillo Posted March 9, 2012 Share Posted March 9, 2012 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. Link to comment
Soren Posted March 9, 2012 Author Share Posted March 9, 2012 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? Link to comment
Castillo Posted March 9, 2012 Share Posted March 9, 2012 Use the exported function spawnBot as I'd in that example. Link to comment
Soren Posted March 9, 2012 Author Share Posted March 9, 2012 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? Link to comment
Castillo Posted March 9, 2012 Share Posted March 9, 2012 You can spawn as much bots as you want to. Command is: /spawnbot and yes, it'll spawn the bot at your location. Link to comment
Soren Posted March 9, 2012 Author Share Posted March 9, 2012 in the same place you are standing or around you? Link to comment
Castillo Posted March 9, 2012 Share Posted March 9, 2012 Why instead of asking such s** question you don't go and test it by yourself? Link to comment
GanJaRuleZ Posted March 10, 2012 Share Posted March 10, 2012 *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 ? .. 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