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

[CS:GO] Change weapon wear on active weapon


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-01-2020 , 15:57   [CS:GO] Change weapon wear on active weapon
Reply With Quote #1

Hi. I'm trying to change the weapon wear on the player's active weapon, but with no luck.

Code:
public Action Cmd_SetWear(int id, int iArgs) {     char szWear[16]     GetCmdArg(1, szWear, sizeof(szWear))     new iEnt = GetEntPropEnt(id, Prop_Send, "m_hActiveWeapon")
    SetEntPropFloat(iEnt, Prop_Send, "m_flFallbackWear", StringToFloat(szWear))
    return Plugin_Handled }

I only managed to change this while giving the weapon, but not after it has been equipped.
Is there a way of doing this? I want to change the wear without re-equipping the weapon, so the change will be immediate (no equip animation).

Also, is it possible to retrieve the weapon's name and quality? I'm talking about the skin's name, e.g. Dragon Lore and the quality, e.g. Covert.

PS: I am aware that Valve doesn't allow for fake skins in servers. I'm making this plugin for an offline LAN server, strictly for the purpose of creating a video.
__________________

Last edited by OciXCrom; 12-01-2020 at 16:48.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
FroGeX
Senior Member
Join Date: Aug 2020
Old 01-23-2021 , 02:44   Re: [CS:GO] Change weapon wear on active weapon
Reply With Quote #2

Just look to another !ws plugin
FroGeX is offline
Reply


Thread Tools
Display Modes

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 07:07.


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