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

[req] Model Knife Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sh|ny
New Member
Join Date: Feb 2009
Location: Romania
Old 02-14-2009 , 14:07   [req] Model Knife Plugin
Reply With Quote #1

Hy, I'm Shiny

I would like a plugin if you can: When someone type / wolf the knife would change
into the model named Wolverine.mdl http://files.filefront.com/Wolverine.../fileinfo.html
and when they type / normal to change the knife at the normal skin of counter strike called
v_knife.mdl
I'd like the plugin, to download for the client,the knife model from the server, namely Wolverine.mdl
I hope it`s not to hard to create that kind of plugin
Thanks from the onStyle community !

Sorry for my bad English, i'm from romania !

Salut Alka ... =))
Sh|ny is offline
Send a message via Yahoo to Sh|ny
maplebest
BANNED
Join Date: May 2007
Location: Sweden, Sverige
Old 02-14-2009 , 14:30   Re: [req] Model Knife Plugin
Reply With Quote #2

Is this what you are looking for?
maplebest is offline
Sh|ny
New Member
Join Date: Feb 2009
Location: Romania
Old 02-14-2009 , 14:38   Re: [req] Model Knife Plugin
Reply With Quote #3

no

i got something but it's not working

Code:
#include <amxmodx>
#include <fakemeta>

#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Anonim"

new const g_NewModel[ ] = "models/Wolverine.mdl";
new g_Model[ 33 ];

public plugin_init()
{
   register_plugin(PLUGIN, VERSION, AUTHOR);
   
   register_clcmd( "say /wolf", "wolf_cmd" );
   register_clcmd( "say /normal", "normal_cmd" );
   
   register_event( "CurWeapon", "hook_curwpn", "be", "1=1" );
}

public plugin_precache()
   engfunc( EngFunc_PrecacheModel, g_NewModel );

public client_putinserver( id ) g_Model[ id ] = 9;

public wolf_cmd( id )
{
   if( !g_Model[ id ] )
      g_Model[ id ] = 1;
   return PLUGIN_CONTINUE;
}
public normal_cmd( id )
{
   if( g_Model[ id ] )
      g_Model[ id ] = 0;
   return PLUGIN_CONTINUE;
}
public hook_curwpn( id )
{
   if( !is_user_alive( id ) )
      return PLUGIN_CONTINUE;
   if( !g_Model[ id ] )
      return PLUGIN_CONTINUE;
      
   if( read_data( 2 ) != CSW_KNIFE )
      return PLUGIN_CONTINUE;
   
   set_pev( id, pev_viewmodel2, g_NewModel );
   return PLUGIN_CONTINUE;
}
Sh|ny is offline
Send a message via Yahoo to Sh|ny
maplebest
BANNED
Join Date: May 2007
Location: Sweden, Sverige
Old 02-14-2009 , 14:47   Re: [req] Model Knife Plugin
Reply With Quote #4

Hm, I'll check if I can edit the "Knife Mod" plugin.

EDIT: Okay, I got it. I hope this is what you wanted.
I have tested it, and it worked. But might be buggy, cuz I'm not good at coding/big edit in scripts.

A little info:
Code:
1. Put that model you had in to your model folder, "models/wolverine.mdl"
2. To get that model, write:
/wolf or /wolverine
3. To go back to normal knife, write:
/normal or /default
4. It also says:
"[AMXX] Type /wolf or /normal to change you knife skin"
5. I suggest you to look in to the script, and edit things you want to change, for example the message above, if you want to change it.
Also, it isn't really impossible that I have some code inside the script that the script doesn't use.
Maybe I'm including something that I don't need to include?

Orginal script by spunko, thanks to him.
Fixed by me
Attached Files
File Type: sma Get Plugin or Get Source (knife_mod.sma - 999 views - 2.1 KB)

Last edited by maplebest; 02-14-2009 at 15:41.
maplebest is offline
Sh|ny
New Member
Join Date: Feb 2009
Location: Romania
Old 02-14-2009 , 16:07   Re: [req] Model Knife Plugin
Reply With Quote #5

Thanks man
Sh|ny is offline
Send a message via Yahoo to Sh|ny
maplebest
BANNED
Join Date: May 2007
Location: Sweden, Sverige
Old 02-14-2009 , 18:02   Re: [req] Model Knife Plugin
Reply With Quote #6

No problem

Last edited by maplebest; 02-14-2009 at 18:15.
maplebest is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 02-15-2009 , 07:44   Re: [req] Model Knife Plugin
Reply With Quote #7

Quote:
for(i = 0; i <= iNum; i++)
Should be < and fakemeta instead of engine.
__________________

anakin_cstrike is offline
maplebest
BANNED
Join Date: May 2007
Location: Sweden, Sverige
Old 02-15-2009 , 07:50   Re: [req] Model Knife Plugin
Reply With Quote #8

I just edited spunko's "Knife Mod". So, I don't understand coding to very much.
maplebest is offline
cs1.7
Senior Member
Join Date: Oct 2008
Old 02-15-2009 , 08:56   Re: [req] Model Knife Plugin
Reply With Quote #9

can someone post a version of this including knife sound replacement?

i have allways been searching for a plugin that changes player knife model + sounds by say command. So player can choose if he wants the custom model or not.

Many +karma promised.
cs1.7 is offline
maplebest
BANNED
Join Date: May 2007
Location: Sweden, Sverige
Old 02-15-2009 , 09:01   Re: [req] Model Knife Plugin
Reply With Quote #10

Sorry, I can't make/edit anything so it allows you to use sound replacement, too. You can always try "Custom Knives", but I the sound replacement doesn't work to me. Maybe it does to you?
maplebest 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 17:24.


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