• Thirdperson View
    8 replies, posted
Can someone tell me how i can make it so im in 3rd person in my gamemode? not using the thirdperson sv_cheats command
You need to use [b][url=wiki.garrysmod.com/?title=Gamemode.CalcView]Gamemode.CalcView [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] to modify the position of the players view and use [b][url=wiki.garrysmod.com/?title=Gamemode.ShouldDrawLocalPlayer]Gamemode.ShouldDrawLocalPlayer [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] to enable the drawing of the player. Both of these are clientside. [editline]08:04PM[/editline] A simple example: [lua]function GM:ShouldDrawLocalPlayer() return true; end function GM:CalcView(ply, origin, ang, fov) local view = {}; view.origin = origin - ply:GetAimVector()*400 + Vector(0, 0, 200); view.angles = (view.origin - ply:GetShootPos()):Angle(); view.fov = fov return view; end[/lua] [editline]08:05PM[/editline] I haven't tested the example, so it may not work.
[QUOTE=NullPoint;20746333]You need to use [b][url=wiki.garrysmod.com/?title=Gamemode.CalcView]Gamemode.CalcView [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] to modify the position of the players view and use [b][url=wiki.garrysmod.com/?title=Gamemode.ShouldDrawLocalPlayer]Gamemode.ShouldDrawLocalPlayer [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] to enable the drawing of the player. Both of these are clientside. [editline]08:04PM[/editline] A simple example: [lua]function GM:ShouldDrawLocalPlayer() return true; end function GM:CalcView(ply, origin, ang, fov) local view = {}; view.origin = origin - ply:GetAimVector()*400 + Vector(0, 0, 200); view.angles = (view.origin - ply:GetShootPos()):Angle(); view.fov = fov return view; end[/lua] [editline]08:05PM[/editline] I haven't tested the example, so it may not work.[/QUOTE] Couldn't you of wait-en till your Maker account was unbanned?
[QUOTE=Cubar;20747203]Couldn't you of wait-en till your Maker account was unbanned?[/QUOTE] Why would I do that? [editline]08:41PM[/editline] Couldn't you have wait until your Cub3 account was unbanned, oh wait...
lol! flame wars! but also to the guy that posted the code, i tested it and tried to make it better but your rendering the players model in such a way that rotates it when you look arround. but apart from that you made a nice wall hack :S
[QUOTE=Ningaglio;20747632]lol! flame wars! but also to the guy that posted the code, i tested it and tried to make it better but your rendering the players model in such a way that rotates it when you look arround. but apart from that you made a nice wall hack :S[/QUOTE] Ok, it was just a quick example to give the OP an idea of what needs to be done.
ok! anyways, nice to see you [editline]09:59PM[/editline] now help me with mah problems! lol [editline]10:00PM[/editline] but seriously, please do
[QUOTE=Ningaglio;20747732]ok! anyways, nice to see you [editline]09:59PM[/editline] now help me with mah problems! lol [editline]10:00PM[/editline] but seriously, please do[/QUOTE] What problems?
Physcological! Nah jk , look in newboe questions and look for a problem with loops
Sorry, you need to Log In to post a reply to this thread.