• [GMOD LUA] Change view position in specific player model gmod
    4 replies, posted
Hello everyone! I have server in gmod with gamemode Cinema. And i have there player models such as a MLP Princess Celestia and so on. When i activate them, my view angle (or eyes) are inside a model. I dont know how to change position of looking. Here is a screenshot about what i`m talking about [QUOTE][IMG]https://image.prntscr.com/image/305803f7047042d58260277581cdb3ff.jpg[/IMG][/QUOTE] Is anyone know how to change view position?
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/CalcView]GM:CalcView[/url] You'll want to move the eye position with a hook targeting this function to a point relative to the head bone of the model if you want to see the snout and all. If not, it would be simpler to ensure that the model is simply invisible to the player looking through it. Normally players don't see their own playermodel anyway, so I'm not sure what your server has going that makes this issue come up. [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Entity/SetColor]Entity:SetColor[/url] Setting the fourth color parameter to zero makes a model invisible for the person the code runs on; a clientside script could be made for the lua/autorun/client folder that targets the LocalPlayer() entity's model. Simply setting the color on LocalPlayer() might also work.
[QUOTE=bitches;52254213][img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/CalcView]GM:CalcView[/url] You'll want to move the eye position with a hook targeting this function to a point relative to the head bone of the model if you want to see the snout and all. If not, it would be simpler to ensure that the model is simply invisible to the player looking through it. Normally players don't see their own playermodel anyway, so I'm not sure what your server has going that makes this issue come up. [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Entity/SetColor]Entity:SetColor[/url] Setting the fourth color parameter to zero makes a model invisible for the person the code runs on; a clientside script could be made for the lua/autorun/client folder that targets the LocalPlayer() entity's model. Simply setting the color on LocalPlayer() might also work.[/QUOTE] I`m bad in scripting. Can you show me how to do? Maybe other people who will se thread will say thank you for code
[QUOTE=Jengas;52254285]I`m bad in scripting. Can you show me how to do?[/QUOTE] No, that's what [url]https://gmodstore.com[/url] is for. This forum is meant to help developers achieve their goal and make the script they want to, not to spoonfeed people asking for help
[QUOTE=Jengas;52254285]I`m bad in scripting. Can you show me how to do? Maybe other people who will se thread will say thank you for code[/QUOTE] I'm bad at scripting it's not the same thing than "I don't want to code, i were expecting someone to do the job"
Sorry, you need to Log In to post a reply to this thread.