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

[CSS] Custom Weapon World/View Model Interface


Post New Thread Reply   
 
Thread Tools Display Modes
SkydiveX
Member
Join Date: Jul 2012
Location: England
Old 05-19-2013 , 10:57   Re: [CSS] Custom Weapon World/View Model Interface
Reply With Quote #11

Quote:
Originally Posted by blodia View Post
lol don't i get any credit since a lot of the viewmodel code is just copy and pasted from the snippet i put up in the tutorial section.
Haven't I mentioned you?
__________________

_____________________________________________ _______________
Pastafarian and proud!
SkydiveX is offline
SkydiveX
Member
Join Date: Jul 2012
Location: England
Old 05-19-2013 , 10:57   Re: [CSS] Custom Weapon World/View Model Interface
Reply With Quote #12

Let me put it in big red writing.
__________________

_____________________________________________ _______________
Pastafarian and proud!
SkydiveX is offline
SkydiveX
Member
Join Date: Jul 2012
Location: England
Old 05-19-2013 , 10:58   Re: [CSS] Custom Weapon World/View Model Interface
Reply With Quote #13

Damnit. Mixed up the names.
My most sincere apologies.
How could I have done this.
__________________

_____________________________________________ _______________
Pastafarian and proud!

Last edited by SkydiveX; 05-19-2013 at 11:00.
SkydiveX is offline
blodia
Veteran Member
Join Date: Sep 2009
Location: UK
Old 05-19-2013 , 11:02   Re: [CSS] Custom Weapon World/View Model Interface
Reply With Quote #14

lol np, no need for big red writing, i saw it said bacardi and thought maybe he had his own method he gave you but when i looked at the code i thought wait isn't that what i posted.
blodia is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 07-24-2013 , 08:11   Re: [CSS] Custom Weapon World/View Model Interface
Reply With Quote #15

Hi,

This plugins is still in development? because dont work correctly

For example, with this code:
PHP Code:
#pragma semicolon 1

#include <sourcemod>
#include <cstrike>
#include <sdktools>
#include <WeaponAPI>

#pragma semicolon 1

new WeaponKNIFE;
new 
WeaponDEAGLE;
new 
WeaponHE;
new 
WeaponM4;
new 
WeaponP228;

public 
Plugin:myinfo =
{
    
name "SM Skins Of Guns",
    
author "Franc1sco Steam: franug",
    
description "",
    
version "2.0",
    
url "www.servers-cfg.foroactivo.com"
};

public 
OnPluginStart()
{
    
CreateConVar("sm_SkinsOfGuns""2.0""version"FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);
    
    
RegConsoleCmd("sm_skins"Noskin);
    
    
WeaponKNIFE WX_RegisterWeapon("weapon_knife","fists");
    
WX_SetDefaultWeaponViewModel(WeaponKNIFE,"models/weapons/v_fists.mdl");
    
WX_SetDefaultActiveState(WeaponKNIFE,true);
    
    
WeaponDEAGLE WX_RegisterWeapon("weapon_deagle","handgun");
    
WX_SetDefaultWeaponViewModel(WeaponDEAGLE,"models/weapons/v_handgun.mdl");
    
WX_SetDefaultActiveState(WeaponDEAGLE,true);
    
    
WeaponP228 WX_RegisterWeapon("weapon_p228","Warnings");
    
WX_SetDefaultWeaponViewModel(WeaponP228,"models/weapons/v_custom_p228.mdl");
    
WX_SetDefaultActiveState(WeaponP228,true);
    
    
WeaponHE WX_RegisterWeapon("weapon_hegrenade","WC");
    
WX_SetDefaultWeaponViewModel(WeaponHE,"models/weapons/v_paper.mdl");
    
WX_SetDefaultActiveState(WeaponHE,true);
    
    
WeaponM4 WX_RegisterWeapon("weapon_m4a1","M4a1 Custom");
    
WX_SetDefaultWeaponViewModel(WeaponM4,"models/weapons/v_custom_m4a1.mdl");
    
WX_SetDefaultActiveState(WeaponM4,true);
    
    
StartWeaponForwards();
}

public 
Action:Noskin(clientargs)
{
    if(!
client) return;
    
    if(
WX_IsActive(clientWeaponKNIFE))
    {
        
PrintToChat(client"\x03Custom skins is disabled for you");
        
WX_SetActive(clientWeaponKNIFEfalse);
        
WX_SetActive(clientWeaponHEfalse);
        
WX_SetActive(clientWeaponP228false);
        
WX_SetActive(clientWeaponDEAGLEfalse);
        
WX_SetActive(clientWeaponM4false);
    }
    else
    {
        
PrintToChat(client"\x03Custom skins is enabled for you");
        
WX_SetActive(clientWeaponKNIFEtrue);
        
WX_SetActive(clientWeaponHEtrue);
        
WX_SetActive(clientWeaponP228true);
        
WX_SetActive(clientWeaponDEAGLEtrue);
        
WX_SetActive(clientWeaponM4true);

    }

Bugs: Knife skin dont change, all skins don't see well (bugged) if change map a few times, and when you type !skins for disable your custom skins, custom skins still appear.


However, using only the snippet of blodia, all works well


btw, this plugin will be very useful if work well
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.


Last edited by Franc1sco; 07-24-2013 at 08:12.
Franc1sco is offline
Send a message via MSN to Franc1sco
Levchik97
Junior Member
Join Date: Nov 2013
Old 11-20-2013 , 04:45   Re: [CSS] Custom Weapon World/View Model Interface
Reply With Quote #16

Change map and weapons disappear, what to do?

Last edited by Levchik97; 11-20-2013 at 04:47.
Levchik97 is offline
alencore
Senior Member
Join Date: Oct 2011
Old 11-20-2013 , 06:16   Re: [CSS] Custom Weapon World/View Model Interface
Reply With Quote #17

If this plugin can load a new view model then may be the iron sight plugin for css might soon be made as the CS 1.6 iron sight plugin....the cwz.amxx (cod weapon zoom plugin) simply loads a secondary centered view model.
alencore is offline
DoPe^
Veteran Member
Join Date: Jul 2008
Location: Denmark / Copenhagen
Old 01-03-2014 , 16:42   Re: [CSS] Custom Weapon World/View Model Interface
Reply With Quote #18

I can't get this to work at all
__________________
DoPe^ is offline
KeepCalm
Junior Member
Join Date: Oct 2012
Location: Hungary
Old 01-12-2014 , 16:04   Re: [CSS] Custom Weapon World/View Model Interface
Reply With Quote #19

This is my problem:

Code:
[SM] Unable to load plugin "WeaponInterface.smx": Native "WX_RegisterWeapon" was not found
And the SP file:

Code:
#pragma semicolon 1

#include <sourcemod>
#include <cstrike>
#include <sdktools>
#include <WeaponAPI>

public Plugin:myinfo=
{
	name="Weapon Plugin Example",
	author="Skydive",
	description="Changes Many Weapons!",
	version="1.1",
	url=""
};


new WeaponKNIFE;

public OnPluginStart()
{
	HookEvent("player_spawn",Event_PlayerSpawn);
	HookEvent("player_hurt",Event_PlayerHurt);
	
	WeaponKNIFE = WX_RegisterWeapon("weapon_knife","KNIFE-->KEZ");
	WX_SetDefaultWeaponViewModel(WeaponKNIFE,"models/weapons/v_fists_t.mdl");
	WX_SetDefaultWeaponWorldModel(WeaponKNIFE,"models/weapons/w_fists_t.mdl");
	WX_SetDefaultActiveState(WeaponKNIFE,true);
	WX_SetDefaultRenderMode(WeaponKNIFE, RENDER_TRANSCOLOR);
	WX_SetDefaultRenderColor(WeaponKNIFE,0,255,0,255);
	
	StartWeaponForwards();
}

public Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
	new Client = GetClientOfUserId(GetEventInt(event, "userid"));
	if(GetClientTeam(Client) == CS_TEAM_CT)
	{	
		//Enable UMP P90 Model for Client
		WX_SetActive(Client,WeaponKNIFE,true);
	}
	else if(GetClientTeam(Client) == CS_TEAM_T)
	{
		//Disable UMP P90 Model for Client
		WX_SetActive(Client,WeaponKNIFE,false);
	}
}

public Event_PlayerHurt(Handle:event, const String:name[], bool:dontBroadcast)
{
	new Victim = GetClientOfUserId(GetEventInt(event, "userid"));
	new Attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
	
	new WeaponIndex = GetEntPropEnt(Attacker, Prop_Send, "m_hActiveWeapon");
	
	if(Attacker > 0 && IsPlayerAlive(Attacker))
	{
		if(WX_WeaponID(WeaponIndex) == WeaponKNIFE)
		{
			IgniteEntity(Victim,2.0);
		}
	}
}
The include file is in the right place.
__________________
Sorry to my English. Google Translate

Last edited by KeepCalm; 01-12-2014 at 16:07.
KeepCalm is offline
joneco
Junior Member
Join Date: Jul 2013
Old 06-11-2014 , 08:28   Re: [CSS] Custom Weapon World/View Model Interface
Reply With Quote #20

anyone tried to use it in CSGO?
joneco 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 23:38.


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