Raised This Month: $ Target: $400
 0% 

Best way to set player model?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eNz0
Member
Join Date: Feb 2010
Location: Lithuania
Old 06-13-2010 , 11:15   Best way to set player model?
Reply With Quote #1

Hi. I can only set player's model in one way (cs_set_user_model), but when i use this in my plugin, and there are more than 20 players, it crashes.

I know, that there is other way to set player's model correctly (https://forums.alliedmods.net/showth...106094&page=26), but i can't get it work.

Can someone give me the example of simple player model code, which is used in Players Models by Connor ( https://forums.alliedmods.net/showth...106094&page=26 ), because i can't understand this code well.

Last edited by eNz0; 06-13-2010 at 11:22.
eNz0 is offline
5c0r-|3i0
Veteran Member
Join Date: Nov 2008
Location: Việt Nam
Old 06-13-2010 , 11:26   Re: Best way to set player model?
Reply With Quote #2

If u're talking about the best way to set user model...My code use this TUT and no more crash when > 20 players .
I think this it the one
5c0r-|3i0 is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 06-13-2010 , 14:50   Re: Best way to set player model?
Reply With Quote #3

Quote:
Originally Posted by 5c0r-|3i0 View Post
If u're talking about the best way to set user model...My code use this TUT and no more crash when > 20 players .
I think this it the one
how many slots do u have?
__________________
I am out of order!
grimvh2 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-13-2010 , 12:09   Re: Best way to set player model?
Reply With Quote #4

The best one is the first link ( PlayerModel by connor ). It uses the CS method to chance models. It's the most reliable.
__________________
Arkshine is offline
5c0r-|3i0
Veteran Member
Join Date: Nov 2008
Location: Việt Nam
Old 06-13-2010 , 18:46   Re: Best way to set player model?
Reply With Quote #5

32.....My server always crash at round start...So I have to use this method
5c0r-|3i0 is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 06-14-2010 , 05:10   Re: Best way to set player model?
Reply With Quote #6

Quote:
Originally Posted by 5c0r-|3i0 View Post
32.....My server always crash at round start...So I have to use this method
I used this method to before. It solves svc_bad. But it has an overflow (console messages : more then 500 temporary ents) and when 28 players it crashes. so I had to change a few things and now it doesnt crash but still get overflow logs but im going to use conners way now.
__________________
I am out of order!
grimvh2 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-14-2010 , 07:35   Re: Best way to set player model?
Reply With Quote #7

Again, use the simple and efficient way as you can see in Player Model by Connor, CS uses this method, it should be the only way to use.
__________________
Arkshine is offline
eNz0
Member
Join Date: Feb 2010
Location: Lithuania
Old 06-14-2010 , 07:40   Re: Best way to set player model?
Reply With Quote #8

I am trying, but this way doesn't work in my plugin. I can't even understand the code...
eNz0 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-14-2010 , 07:45   Re: Best way to set player model?
Reply With Quote #9

It's simple : Hooking FM_SetClientKeyValue and check + set_user_info() with the new model + g_ulModelIndexPlayer offset set with the new model index.
__________________
Arkshine is offline
hzqst
Senior Member
Join Date: Jul 2008
Old 06-14-2010 , 10:49   Re: Best way to set player model?
Reply With Quote #10

What's the difference if you don't set g_ulModelIndexPlayer offset ?
hzqst is offline
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 14:44.


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