Code checks

Grab your favourite IDE and tinker with the innards of game engines

Code checks

Postby TechieUK on Tue Jun 04, 2013 2:46 pm

This is waaaay beyond me, so I've posted here. Again. :smt021
Heh heh heh.
Anyway, I was thinking about some stuff I could do, and I decided to give all the developers of my mod custom playermodels unique to them. The idea is that they use cl_playermodel to switch to them because they wouldn't normally be on the list. Then I realised people could just use cl_playermodel because they're bound to root through the files. I do that with most mods, naughty me. :)

The idea here is to check what the player's name and SteamID is, and if they have the same SteamID and name as the developer, it returns true, and they can use the model (preferably auto-switching them to it). If it returns false, they are auto-switched to the default model. The check would probably happen every time someone tried to switch to it, or joined the server with it on.

tl;dr:
Can I have a way to only allow a certain playermodel for a certain SteamID and change them to the default model if their ID doesn't match?
Also know as WILLAM; TechieUK is my old name. If you see WILLAM on Steam or ModDB, it's me.
User avatar
TechieUK
Regular
Regular
 
Joined: Sat Apr 13, 2013 4:29 pm

Re: Code checks

Postby LordDz on Tue Jun 04, 2013 2:51 pm

Yes.
Since there are multiple mods who have different playerclasses, I don't see why it wouldn't be possible to just add in a check for what the steamid is of the player. Can be done both in code and server plugins.
User avatar
LordDz
May Contain Skills
May Contain Skills
 
Joined: Mon Sep 01, 2008 12:28 pm
Location: Hammer Crash Logs

Re: Code checks

Postby TechieUK on Tue Jun 04, 2013 3:37 pm

Awesome!
Now to figure out how..
Also know as WILLAM; TechieUK is my old name. If you see WILLAM on Steam or ModDB, it's me.
User avatar
TechieUK
Regular
Regular
 
Joined: Sat Apr 13, 2013 4:29 pm

Re: Code checks

Postby LordDz on Tue Jun 04, 2013 6:02 pm

https://developer.valvesoftware.com/wik ... del_Entity
Google is your friend, use it. A lot.
User avatar
LordDz
May Contain Skills
May Contain Skills
 
Joined: Mon Sep 01, 2008 12:28 pm
Location: Hammer Crash Logs

Return to Programming

Who is online

Users browsing this forum: No registered users