• Best Way To Set Playermodel
    15 replies, posted
What function should i use to set the players model, or what hook should i use? The model could change only once a round so what is the best hook to use for this? should i just do [lua]hook.Add("PlayerSpawn", function(ply) ply:SetModel(ply:GetPData("model")) end)[/lua]
That's perfect, yeah.
Ok thank you. I was wondering if there was a special function for it but thank you.
Well there's [b][url=wiki.garrysmod.com/?title=Gamemode.PlayerSetModel]Gamemode.PlayerSetModel [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] but it's called same time as PlayerSpawn, so it doesn't matter.
[QUOTE=Donkie;29512069]Well there's [b][url=wiki.garrysmod.com/?title=Gamemode.PlayerSetModel]Gamemode.PlayerSetModel [img_thumb]http://wiki.garrysmod.com/favicon.ico[/img_thumb][/url][/b] but it's called same time as PlayerSpawn, so it doesn't matter.[/QUOTE] Wrong. PlayerSpawn calls PlayerSetModel, so PlayerSetModel is actually called after PlayerSpawn.
[QUOTE=Donkie;29512069]Well there's [b][url=wiki.garrysmod.com/?title=Gamemode.PlayerSetModel]Gamemode.PlayerSetModel [img_thumb]http://wiki.garrysmod.com/favicon.ico[/img_thumb][/url][/b] but it's called same time as PlayerSpawn, so it doesn't matter.[/QUOTE] Actually, it does matter. Gamemodes usually set the player models there, so if you set yours in PlayerSpawn, the gamemode could override it.
Also its better practice since it calls util.PrecacheModel for you [editline]29th April 2011[/editline] [QUOTE=raBBish;29512367]Actually, it does matter. Gamemodes usually set the player models there, so if you set yours in PlayerSpawn, the gamemode could override it.[/QUOTE] RTM is most likely making a gamemode he just fails to understand that you shouldnt be using hook.add in a gamemode unless you dont want to override a function
[QUOTE=c-unitV2;29512423]Also its better practice since it calls util.PrecacheModel for you [editline]29th April 2011[/editline] RTM is most likely making a gamemode he just fails to understand that you shouldnt be using hook.add in a gamemode unless you dont want to override a function[/QUOTE] I am not rtmbeastx. Also, i do know not to use Hook.Add unless not wanting to override a function, im not stupid. This is actually a load of small scripts im making for a friend.
[img]http://gyazo.com/1b0fa54fa0a4c603869c2958f387a72b.png[/img] [editline]29th April 2011[/editline] good game
Yes, thats a server i play on css, me and haze both got banned by beast. He sent me the evidence there cause chat was down at the time.
[img]http://gyazo.com/aa3c645b82186219a61ddfb4ebcfe601.png[/img] keep it coming with the excuses bro
Also here is some evidence that your PK Owner [url]http://www.facepunch.com/threads/708503-SlobBot-V1-Public-LUA-AimBot-Wallhack-DarkRP-Wallhack-quot-AntiBan-quot-and-more!?p=14184199&viewfull=1#post14184199[/url]
[QUOTE=c-unitV2;29513045][img_thumb]http://gyazo.com/aa3c645b82186219a61ddfb4ebcfe601.png[/img_thumb] keep it coming with the excuses bro[/QUOTE] Errrrr. Hacked :\ But yea, i came with a new name and a new way of thinking about things. Im still learning but at least i am trying harder.
[QUOTE=Science;29513099]Errrrr. Hacked :\.[/QUOTE] "Game set match"
[QUOTE=Science;29513099]Errrrr. Hacked :\ But yea, i came with a new name and a new way of thinking about things. Im still learning but at least i am trying harder.[/QUOTE] How did you think you could hide from the internet king known as Inspector Flawless
[QUOTE=King Flawless;29513141]How did you think you could hide from the internet king known as Inspector Flawless[/QUOTE] Well you sir are flawless.
Sorry, you need to Log In to post a reply to this thread.