Raised This Month: $ Target: $400
 0% 

Check model?!?!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LynX
Veteran Member
Join Date: Oct 2004
Old 03-24-2005 , 16:15   Check model?!?!
Reply With Quote #1

Okay this is mine script:

Code:
// Don't pay attention to these includes - I have more stuff that requires this modules #include <amxmodx> #include <core> #include <engine> #include <fun> public plugin_init() {     register_plugin("CheckModel_GiveFunction","dunno","LynX")     register_clcmd("check","check_function")     return PLUGIN_CONTINUE } new model[33][33] public check_function(id) {     if ((get_user_info(id,"model","gign",32) = 1)     {     client_print(id, print_center, "Using Gign")     return PLUGIN_HANDLED     }     if ((get_user_info(id,"models","arctic",32) = 1)     {     client_print(id, print_center, "Using Arctic")     return PLUGIN_HANDLED     } client_print(id, print_center, "Not using two predefined models") return PLUGIN_HANDLED } public plugin_precache() { precache_model("models/player/arctic/arctic.mdl") precache_model("models/player/gign/gign.mdl") return PLUGIN_HANDLED }

I need that if its model 1 ( in this case gign.mdl ) is current player model - player gets function number one.
But, if its model 2 ( in this case arctic.mdl ) current player model - player gets function number two.
BUT, if it isn't neither gign or arctic as players model - script does different function.
But, I cannot affor myself to user natives like cs_get_user_model coz that would not work.
Any help?
So, can you fix this code and add/remove things needed to get this stuff working?
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
Jinto
Member
Join Date: Jun 2004
Location: Seattle, WA
Old 03-24-2005 , 23:03  
Reply With Quote #2

Get the model and see if it contains a certain string.

Code:
// Don't pay attention to these includes - I have more stuff that requires this modules #include <amxmodx> #include <core> #include <engine> #include <fun> public plugin_init() {     register_plugin("CheckModel_GiveFunction","dunno","LynX")     register_clcmd("check","check_function")     return PLUGIN_CONTINUE; } public check_function(id) {     new model[32];     entity_get_string( id, EV_SZ_model, model, 32 );         if( containi( model, "gign" ) != -1 ) {         client_print( id, print_center, "Using Gign" );     } else if( containi( model, "arctic" ) != -1 ) {         client_print( id, print_center, "Using Arctic" );     } else {         client_print( id, print_center, "Not using two predefined models" );     }         return PLUGIN_HANDLED; } public plugin_precache() {     precache_model("models/player/arctic/arctic.mdl");     precache_model("models/player/gign/gign.mdl");     return PLUGIN_HANDLED; }
Jinto is offline
Send a message via ICQ to Jinto Send a message via AIM to Jinto Send a message via MSN to Jinto Send a message via Yahoo to Jinto
LynX
Veteran Member
Join Date: Oct 2004
Old 03-25-2005 , 02:03  
Reply With Quote #3

Thnx! Gonna try that ASAP!
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
LynX
Veteran Member
Join Date: Oct 2004
Old 03-25-2005 , 03:14  
Reply With Quote #4

Doesn't work... Always gives "Not using two predefined models" message...
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
knekter
Senior Member
Join Date: Mar 2004
Location: PA
Old 03-25-2005 , 12:14   or
Reply With Quote #5

Why don't you try the cstrike module, cs_get_user_model.....?
__________________
More updates for Matrix Mod!
knekter is offline
Send a message via AIM to knekter Send a message via MSN to knekter
LynX
Veteran Member
Join Date: Oct 2004
Old 03-25-2005 , 13:13  
Reply With Quote #6

I tried that be4 one month - also didn't worked... But can you post a code snippet made by you, so if I was mistaken in it?
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 03-26-2005 , 01:40  
Reply With Quote #7

EV_SZ_model will most likely be player.mdl for players. Use cs_get_user_model.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
LynX
Veteran Member
Join Date: Oct 2004
Old 03-26-2005 , 03:32  
Reply With Quote #8

Hmm, but I don't wanna use cs_get_user_model ( I'm aware of it ) - because I need the snippet which will work on almost all HL modifications. I doub't that the Specialists will have CS module on... But, if its the only way, let be it...
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 03-26-2005 , 04:04  
Reply With Quote #9

Apparently cs_get_user_model just returns the model keyvalue. I can't seem to find where the source code for get_user_model is. For models that support model changing through the customize menu, you can use get_user_info(id,"model",text[],maxLength)
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
LynX
Veteran Member
Join Date: Oct 2004
Old 03-26-2005 , 06:11  
Reply With Quote #10

Yes, I tried that - but the model can't be changed in few mods I'm making plugins for ( Jumbot xPanded , ESF... ).
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
Reply



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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:53.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode