Raised This Month: $32 Target: $400
 8% 

Player model-changer v1.2 [UPDATE 15.02.2012]


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff       
RoaR
Member
Join Date: Dec 2011
Old 02-16-2012 , 11:14   Player model-changer v1.2 [UPDATE 15.02.2012]
Reply With Quote #1

Description:

Plugin will change player models if they got ADMIN_BAN flag.
Very simple, changes models on every spawn.

NOTE: Please, keep an eye on freezetime. This can make the plugin bug because of loading after.

Cvars:

amx_padminonly 1 (0 to make models for all)

Download: Download files at attachments. Models are in .zip files

Changelog:

Code:
1.0 
- Initial Realease
1.1 
- Fixed primary work of the code
1.2
- Added cvar for admin only or not.
- Changed plugin name
- Little fix


I might sumbit one also with "orpheu" module witch would have fixed the freezetime problem.

Bugs report here.

P.S: I can't upload the models.zip it times out the connection while adding to attachments, could i give download link to some of approvers and they could add them?
Attached Files
File Type: sma Get Plugin or Get Source (playermodel-changer.sma - 1457 views - 970 Bytes)

Last edited by RoaR; 02-16-2012 at 12:14.
RoaR is offline
Ex1ne
Senior Member
Join Date: Oct 2011
Location: Norway
Old 02-16-2012 , 11:24   Re: Santa Models v1.1 [UPDATED]
Reply With Quote #2

Suggestions :
  • Rename to "Player-model changer".
  • Make a cvar for directory.
  • Remove indention on the switch. (just do "case CS_TEAM_X: cs_set... "
  • Make a cvar for admin only or not.
__________________
Ex1ne is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 02-16-2012 , 11:36   Re: Santa Models v1.1 [UPDATED]
Reply With Quote #3

http://forums.alliedmods.net/showthread.php?p=958925

Also, using cs_set_user_model( ) is a very bad method.
__________________
You can do anything you set your mind to, man.

Devil259 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-16-2012 , 12:03   Re: Santa Models v1.1 [UPDATED]
Reply With Quote #4

Quote:
Originally Posted by Devil259 View Post
I agree this is redundant, but Connor's plugin does not support by admin flags.
Any change to admins would have to be changed in that player models config.

If Connor's plugin supported admin flags, then it would be complete.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
RoaR
Member
Join Date: Dec 2011
Old 02-16-2012 , 12:16   Re:
Reply With Quote #5

Quote:
Originally Posted by Ex1ne View Post
Suggestions :
  • Rename to "Player-model changer".
  • Make a cvar for directory.
  • Remove indention on the switch. (just do "case CS_TEAM_X: cs_set... "
  • Make a cvar for admin only or not.
Thanks for the suggestion.

Done almost everything of your suggestions.

Also, in next version i should add a ".ini" file witch you can modify the models location, models for specific players or stay or this?

More suggestions?

EDIT: Forgot to add that in the .ini file you can also modify the cvar in next version. ;)

Last edited by RoaR; 02-16-2012 at 12:16.
RoaR is offline
Ex1ne
Senior Member
Join Date: Oct 2011
Location: Norway
Old 02-16-2012 , 13:07   Re: Player model-changer v1.2 [UPDATE 15.02.2012]
Reply With Quote #6

Code:
if(get_user_flags(id) && ADMIN_BAN || is_user_alive(id) & get_pcvar_num(g_pAdminOnly)) {

if (!get_pcvar_num(g_pAdminOnly) && is_user_alive(id))
no need to check if the client is alive twice.
__________________
Ex1ne is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 02-16-2012 , 13:16   Re: Player model-changer v1.2 [UPDATE 15.02.2012]
Reply With Quote #7

Well cs_set_user_model didnt saw errors in server with more than 24 players ?
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 02-16-2012 , 13:16   Re: Player model-changer v1.2 [UPDATE 15.02.2012]
Reply With Quote #8

if(get_user_flags(id) && ADMIN_BAN

It won't works.

Have you tested your code before posting ?

@lucas : That's why it is a very bad method.
__________________
You can do anything you set your mind to, man.


Last edited by Devil259; 02-16-2012 at 13:17.
Devil259 is offline
RoaR
Member
Join Date: Dec 2011
Old 02-16-2012 , 14:26   Re: Player model-changer v1.2 [UPDATE 15.02.2012]
Reply With Quote #9

I got all the bugs in my notepad, fixing tommorow. ;)
RoaR is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-16-2012 , 16:33   Re: Player model-changer v1.2 [UPDATE 15.02.2012]
Reply With Quote #10

Redundant and poorly coded. Don't hardcode model, don't use cs_set_user_model (known to generate crash)
Also, you are a beginner, therefore I will ask you to not release again until you have a decent knowledge.
That's not the scripting section here. Take your time to learn so you can make quality plugins.

Unapproved.
__________________

Last edited by Arkshine; 02-16-2012 at 16:50.
Arkshine 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 16:42.


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