kurubay Posted November 24, 2015 Posted November 24, 2015 hey i ve got an error Bad argument @ 'getPlayerTeam' [Expected player at argument 1, got boolean] function Boss_ini() boss=exports [ "slothBot" ]:spawnBot(-451.30627441406,2593.0285644531,48.308349609375,90,boss_skin,0,0,botT,7,"hunting") setElementData(boss,"PedExtraHealth",boss_extraH) outputChatBox(idioma[12],root) triggerClientEvent("CreateNinjaSound",root,boss,"1.mp3") madarsT1 = setTimer(bot_app_jutsus,boss_jutsusTimer,0) madarsT2 = setTimer(bot_app_jutsusCombo,boss_jutsusTimer2,0) setElementData(boss,"Boss",true) addEventHandler("onPedWasted",boss,Boss_wasted) local x,y,z = getElementPosition(boss) local r=getRandomPlayer() for i=1,180,18 do local _i = i*(math.pi/180) exports [ "slothBot" ]:spawnBot(math.cos(_i)*8+x,math.sin(_i)*8+y,z,90,115,0,0,getPlayerTeam(r),8,"chasing",boss) ==> error here end for b=180,360,18 do local _b = b*(math.pi/180) exports [ "slothBot" ]:spawnBot(math.cos(_b)*8+x,math.sin(_b)*8+y,z,90,118,0,0,getPlayerTeam(r),4,"chasing",boss) end end
Moderators IIYAMA Posted November 24, 2015 Moderators Posted November 24, 2015 The random player has no team.
Addlibs Posted November 24, 2015 Posted November 24, 2015 “Bad argument @ 'getPlayerTeam' [Expected player at argument 1, got boolean]” r=getRandomPlayer() probably returns false for you, hence 'got boolean' [divbox=white]Returns Returns a random player, or false if the server is empty. — Wiki
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