Raised This Month: $51 Target: $400
 12% 

Module: Model Changer


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 08-11-2011 , 19:16   Module: Model Changer
Reply With Quote #1

Model Changer


Using this extension you may change the models very fast and reliable! Also, you can detach a model from a player. This extension is much faster and reliable than a plugin!

View source code: Click!

For example:


PHP Code:
#include < amxmodx >
#include < model_changer >

public plugin_init( )
     
register_plugin"Model Changer""1.0""Hattrick (Claudiu HKS)" );

public 
client_putinserverPlayer ) {
     if( 
get_user_flagsPlayer ) & ADMIN_RCON )
          
set_task1.0"Task_ChangeModel"Player );
}

public 
Task_ChangeModelPlayer ) {
     if( 
is_user_connectedPlayer ) )
          
set_user_modelPlayer"vip" );


The header file is:

PHP Code:
/*
    Changes the player's model to the model you want.
*/
native set_user_model_index_model[ ] );

/*
    Receives the name of the player's model.
*/
native get_user_model_index_model[ ], _length );

/*
    Resets the player's model.
*/
native reset_user_model_index ); 
Big thanks to Arkshine for compiling the extension in Linux.

Attached Files
File Type: so model_changer_amxx_i386.so (26.3 KB, 902 views)
File Type: inc model_changer.inc (759 Bytes, 1065 views)
File Type: zip Model Changer Source Code.zip (223.0 KB, 648 views)
File Type: dll model_changer_amxx.dll (91.5 KB, 838 views)
File Type: zip Model Changer.zip (56.9 KB, 958 views)
__________________

Last edited by claudiuhks; 04-20-2013 at 12:01.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
padilha007
Senior Member
Join Date: Jul 2008
Old 08-11-2011 , 22:23   Re: Module: Model Changer
Reply With Quote #2

Great work, but with that module can i get less sv_bad?
Linux Version?
__________________


Last edited by padilha007; 08-11-2011 at 22:25.
padilha007 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-11-2011 , 22:49   Re: Module: Model Changer
Reply With Quote #3

You should show the equivalent in pawn so we can see why this would be beneficial.

Also, is it specific to a particular mod?
__________________

Last edited by fysiks; 08-11-2011 at 23:34.
fysiks is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 08-11-2011 , 23:53   Re: Module: Model Changer
Reply With Quote #4

No, it isn't specific for a particular mod. It can be used on Counter-Strike, Day of Defeat, Half-Life without problems

I don't know how to compile in Linux

You can't change the model at 32 players in same time, you'll get SVC_BAD, right... For changing the models at 32 players you need some delay, 0.3 seconds for each player is enough...

What exactly a pawn is? Sorry but I never heard about this before...

This extension is more better than a plugin because you don't have to hook the SetClientKeyValue forward and you don't have to use the set_user_info and get_user_info natives...
__________________

Last edited by claudiuhks; 08-12-2011 at 00:00.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
jim_yang
Veteran Member
Join Date: Aug 2006
Old 08-11-2011 , 23:59   Re: Module: Model Changer
Reply With Quote #5

you don't know what pawn is ? god
to compile linux bin, you either can set up a virtual machine, set up a linux system or use mingw + cygwin in win32
I personally prefer the first choice, you can download a free IDE then, and don't need to edit makefile. just like how you use visual studio in windows.
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>

Last edited by jim_yang; 08-12-2011 at 00:09.
jim_yang is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-12-2011 , 03:31   Re: Module: Model Changer
Reply With Quote #6

For sure a module is always faster but here for such code, pawn or module, it doesn't really matter, you won't see any difference. Also, instead of making a module, you could issue a bug report to add such natives in amxx. Also such API already exists, so it's kind of useless.
__________________

Last edited by Arkshine; 08-19-2011 at 09:52. Reason: Removed attchement
Arkshine is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 08-12-2011 , 05:40   Re: Module: Model Changer
Reply With Quote #7

Quote:
Originally Posted by claudiuhks View Post
You can't change the model at 32 players in same time, you'll get SVC_BAD, right... For changing the models at 32 players you need some delay, 0.3 seconds for each player is enough...
Also for this module or what?
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 08-12-2011 , 05:49   Re: Module: Model Changer
Reply With Quote #8

Whats the use of this when it doesnt support SVC_BAD prevention by adding delays automatically?
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-12-2011 , 05:58   Re: Module: Model Changer
Reply With Quote #9

You don't need delays and by the way such api already exists (see connor's api)
__________________

Last edited by Arkshine; 08-12-2011 at 06:02.
Arkshine is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 02-09-2012 , 00:41   Re: Module: Model Changer
Reply With Quote #10

In "model_changer.inc" file you forgot to add "const" at "set_user_model" native.

Yours:
PHP Code:
native set_user_model_index_model[ ] ); 
Fix:
PHP Code:
native set_user_model_index, const _model[ ] ); 
yokomo 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 03:07.


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