Jimor Posted November 23, 2017 Share Posted November 23, 2017 The resource starts, but the bot does not spawn. function bot () team = createTeam ("AngryBots", 255,255,255) exports [ "slothBot" ]:spawnBot ( 2002.5241699219,1546.9384765625,13.5859375, 90, 124, 0, 0, 29, "waiting", true ) end addCommandHandler("bots",bot) <meta> <info author="Falke" version="2.0.0" type="misc" name="angrybots" description="This script will add Silent Hill to San Andreas" /> <script src="server.lua" type="server" /> <include resource="slothbot" /> </meta> Why does not the bot spawn?? Please, help me! Neither the "nemesi1" script is working now (it worked when i played MTA years ago...). I don't know what is happening ;-; *nemesi1: https://community.multitheftauto.com/index.php?p=resources&s=details&id=5722 Link to comment
JahKno Posted November 23, 2017 Share Posted November 23, 2017 You have to add the export to the meta @Jimor <export function="spawnBot" type="client" /> <export function="spawnBot" type="server" /> Link to comment
Jimor Posted November 24, 2017 Author Share Posted November 24, 2017 I tried, but nothing happens ;-; Link to comment
msyyn Posted November 24, 2017 Share Posted November 24, 2017 31 minutes ago, Jimor said: I tried, but nothing happens ;-; Did you add it to the slothbot resource? Link to comment
Jimor Posted November 24, 2017 Author Share Posted November 24, 2017 Yes... I think my script has something wrong... idk Link to comment
msyyn Posted November 24, 2017 Share Posted November 24, 2017 /debugscript 3, what error it gives? 1 Link to comment
Zorgman Posted November 24, 2017 Share Posted November 24, 2017 Add the team before the weapon, right now you pass 29 as your team. The slothbot resource already exports the function, so no need to worry about that. 1 Link to comment
Jimor Posted November 24, 2017 Author Share Posted November 24, 2017 (edited) ex = createTeam("OMP",255,0,0) local ex = getTeamFromName ( "OMP" ) function boss (player,comando,weaponid,skinid) local x,y,z = getElementPosition(player) slothbot1 = exports [ "slothbot" ]:spawnBot ( 2457.171875,-1644.5861816406,13.457942962646 , 90, 15, 0, 0, ex, 30, "waiting", true ) end addCommandHandler("spawnbot",boss) function rewardOnWasted ( ammo, killer, killerweapon, bodypart ) if ( killer ) and ( killer ~= source ) then givePlayerMoney ( killer, 5 ) end end addEventHandler ( "onPedWasted", getRootElement(), rewardOnWasted ) Now i used this script and it works, but i still don't know why this: createTeam ( "OMP", 0, 0, 0 ) local OMP = getTeamFromName ( "OMP" ) function bot () OMP = getTeamFromName ( "OMP" ) exports [ "slothbot" ]:spawnBot ( 2493.3659667969,-1667.4803466797,13.34375, 0, 15, 0, OMP, 22, "waiting", true ) end addCommandHandler("spawnbot",bot) didn't work. 6 hours ago, msyyn said: /debugscript 3, what error it gives? The script load and it didn't give me an error, but the bot does not appear. 2 hours ago, Zorgman said: Add the team before the weapon, right now you pass 29 as your team. The slothbot resource already exports the function, so no need to worry about that. I used this: createTeam ( "OMP", 0, 0, 0 ) local OMP = getTeamFromName ( "OMP" ) function bot () OMP = getTeamFromName ( "OMP" ) exports [ "slothbot" ]:spawnBot ( 2493.3659667969,-1667.4803466797,13.34375, 0, 15, 0, OMP, 22, "waiting", true ) end addCommandHandler("spawnbot",bot) but the bot still doesn't appear. Edited November 24, 2017 by Jimor Link to comment
Zorgman Posted November 27, 2017 Share Posted November 27, 2017 function spawnBot(x, y, z, rot, skin, interior, dimension, team, weapon, mode, modesubject) Check this ^ against your code, I guess it will be easy to spot the error you made. 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