AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Best way to set player model? (https://forums.alliedmods.net/showthread.php?t=129489)

eNz0 06-13-2010 11:15

Best way to set player model?
 
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.

5c0r-|3i0 06-13-2010 11:26

Re: Best way to set player model?
 
If u're talking about the best way to set user model...My code use this TUT and no more crash when > 20 players :D .
I think this it the one

Arkshine 06-13-2010 12:09

Re: Best way to set player model?
 
The best one is the first link ( PlayerModel by connor ). It uses the CS method to chance models. It's the most reliable.

grimvh2 06-13-2010 14:50

Re: Best way to set player model?
 
Quote:

Originally Posted by 5c0r-|3i0 (Post 1207615)
If u're talking about the best way to set user model...My code use this TUT and no more crash when > 20 players :D .
I think this it the one

how many slots do u have?

5c0r-|3i0 06-13-2010 18:46

Re: Best way to set player model?
 
32.....My server always crash at round start...So I have to use this method

grimvh2 06-14-2010 05:10

Re: Best way to set player model?
 
Quote:

Originally Posted by 5c0r-|3i0 (Post 1208005)
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.

Arkshine 06-14-2010 07:35

Re: Best way to set player model?
 
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.

eNz0 06-14-2010 07:40

Re: Best way to set player model?
 
I am trying, but this way doesn't work in my plugin. I can't even understand the code...

Arkshine 06-14-2010 07:45

Re: Best way to set player model?
 
It's simple : Hooking FM_SetClientKeyValue and check + set_user_info() with the new model + g_ulModelIndexPlayer offset set with the new model index.

hzqst 06-14-2010 10:49

Re: Best way to set player model?
 
What's the difference if you don't set g_ulModelIndexPlayer offset ?


All times are GMT -4. The time now is 14:44.

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