model into model\none

Forum concernant ce jeu et les serveurs que j'héberge. (ce sous-forum remplace conseiljedi.com)
Post Reply
User avatar
evan1715
Posts: 95
Joined: Fri Nov 09, 2007 11:51 pm
Location: Florida
Contact:

model into model\none

Post by evan1715 »

hi
i tried to get it to detect model\none as a fake player because even the default in jk2 is model\kyle/default
it doesn't look for it proper because i think, it thinks that model\none the \n is next line :S
i dont want it to search for just "none" in the userinfo i want it to do specifically model\none
How would I make it so that the anti fake players checks if the model is set to none?
Gamall
Hic sunt dracones
Posts: 4174
Joined: Fri May 26, 2006 11:09 pm
Contact:

Re: model into model\none

Post by Gamall »

Assuming char *userinfo contains the userinfo string,

Code: Select all

Info_ValueForKey (userinfo, "model") 
returns a char* containing the model, or "none". (check if Info_ValueForKey has the same name in JK2)

Therefore all you have to do is a check such as

Code: Select all

if(!strcmp(Info_ValueForKey (userinfo, "model"), "none")) {
    // what to do when model is "none"
}
 
t doesn't look for it proper because i think, it thinks that model\none the \n is next line :S
No. You might want to google on "escape sequences".
{<§ Gamall Wednesday Ida §>}
{ Mods and Programs - Mods TES-IV Oblivion }
User avatar
evan1715
Posts: 95
Joined: Fri Nov 09, 2007 11:51 pm
Location: Florida
Contact:

Re: model into model\none

Post by evan1715 »

cool, thanks :D
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 134 guests