• Changing Bot Playermodel?
    4 replies, posted
I was wondering if there was anyway to either set a bot's playermodel or change the default playermodel. [b]Edit: This is on a listen server[/b]
Using lua_run BotEntity:SetModel("modelname.mdl")
[code] [ERROR] lua_run:1: attempt to index global 'BotEntity' (a nil value) 1. unknown - lua_run:1 [/code] It didn't work ; -;
You're supposed to replace BotEntity with the entity of what you want to change the model for. If you know the name of the entities you're trying to change then you could do something like [code]for k, v in pairs( ents.FindByName( "The name of the Entity" ) do v:SetModel("modelname.mdl) end[/code] Or, on the client-side, you could use LocalPlayer():GetEyeTrace().Entity to get the entity that you're looking at.
[QUOTE=bliptec;42159786]If you know the name of the entities you're trying to change then you could do something like [code]for k, v in pairs( ents.FindByName( "The name of the Entity" ) do v:SetModel("modelname.mdl) end[/code][/QUOTE] Or do all bots [lua]for k, v in pairs( player.GetBots() ) do v:SetModel("modelname.mdl) end[/lua]
Sorry, you need to Log In to post a reply to this thread.