lfnetwork.com mark read register faq members calendar

Thread: serverside: check clientmodel
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 07-04-2008, 09:42 PM   #1
Cohsty243
Rookie
 
Cohsty243's Avatar
 
Join Date: Apr 2007
Posts: 67
serverside: check clientmodel

Is there a function in serverside that returns the name of the model a client is using?
Cohsty243 is offline   you may: quote & reply,
Old 07-05-2008, 09:21 AM   #2
XycaleTh
Rookie
 
XycaleTh's Avatar
 
Join Date: Apr 2006
Location: UK
Posts: 67
This bit of code should do it:
Code:
char* GetClientModelName ( int clientNum )
{
    char userinfo[MAX_INFO_STRING] = { 0 };

    trap_GetUserinfo (clientNum, userinfo, sizeof (userinfo));

    return Info_ValueForKey (userinfo, "model")
}
Haven't tested it though :P
XycaleTh is offline   you may: quote & reply,
Old 07-05-2008, 06:45 PM   #3
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
You might want to make that static. And don't call said function too often in a row or you will likely get corruption.


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 07-07-2008, 04:50 AM   #4
Cohsty243
Rookie
 
Cohsty243's Avatar
 
Join Date: Apr 2007
Posts: 67
Thank you! That helped alot!
Cohsty243 is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > JA Coding > serverside: check clientmodel

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:00 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.