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

[REQ] Wolf on knive


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
blanko
Senior Member
Join Date: Aug 2008
Old 01-17-2015 , 21:06   [REQ] Wolf on knive
Reply With Quote #1

When you switch to the knive, you change to werewolf skin http://cs.gamebanana.com/skins/138012 then when you switch to a gun, you switch back to your former model.

The best would be if you can press a button and become the wolf holding the knife then when you press button again, return back to the normal model and your gun again.

It could also be press a button to becoming the wolf and holding the knive for some time then automatic back again to former model with former gun.
__________________

Last edited by blanko; 01-17-2015 at 21:09.
blanko is offline
Eviatar Mor
Senior Member
Join Date: Jun 2014
Location: israel
Old 01-18-2015 , 07:28   Re: [REQ] Wolf on knive
Reply With Quote #2

try this:
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "WereWolf when u use knife"
#define AUTHOR "Constentine"

public plugin_precache() precache_model("models/player/werewolf.mdl")

new 
werewolf[33] = false

public plugin_init() {
    
register_event("CurWeapon""Event_CurWeapon""be""1=1");
    
RegisterHam(Ham_Spawn"player""player_spawn"true)
}
public 
Event_CurWeapon(id){
    if(
get_user_weapon(id) == CSW_KNIFE){
        
werewolf[id] = true
    
}
    else{
        
werewolf[id] = false    
    
}
}
public 
player_spawn(id){
    if(
werewolf[id]){
        
cs_set_user_model(id"werewolf")
    }

Eviatar Mor is offline
bat
Veteran Member
Join Date: Jul 2012
Old 01-18-2015 , 08:18   Re: [REQ] Wolf on knive
Reply With Quote #3

Button mouse2(IN_ATTACK2)
PHP Code:
#include amxmodx
#include fakemeta
#include engine
#include cstrike  

public plugin_precache() precache_model("models/player/werewolf.mdl"

public 
plugin_init() { 
    
register_event("CurWeapon""Event_CurWeapon""be""1=1"); 
    
register_forward(FM_CmdStart"fwd_cmdstart")

public 
Event_CurWeapon(id){ 
    if(
get_user_weapon(id) == CSW_KNIFE)
    { 
        
cs_set_user_model(id"werewolf"
    } 
    else
    { 
        
cs_reset_user_model(id)    
    } 



public 
fwd_cmdstart(iduc_handleseed)
{
  if(!
is_user_alive(id))
    return 
FMRES_IGNORED

  
new buttons get_uc(uc_handle,UC_Buttons)
  new 
oldbuttons get_user_oldbutton(id);
  
  if(
buttons IN_ATTACK2 && !(oldbuttons IN_ATTACK2))
  {
     
changemodels(id)
  }
  return 
FMRES_HANDLED
}


changemodels(id)
{
      new 
model[32]
      
cs_get_user_model(idmodelcharsmax(model))
      if (
equal(model"werewolf"))
      {
             
cs_reset_user_model(id)
      }
      else
      {
              
cs_set_user_model(id"werewolf")
      }   

__________________

Last edited by bat; 01-18-2015 at 08:23.
bat is offline
Send a message via Skype™ to bat
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:36.


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