View Single Post
Plugin Info:     Modification:          Category:         
1xAero
Member
Join Date: Feb 2018
Location: Sakha, Russia
Old 02-09-2018 , 12:18   SetViewEntityBody 2
Reply With Quote #1

🇸 ​🇪 ​🇹 ​🇻​ 🇮​ 🇪​ 🇼​ 🇪 ​🇳 ​🇹​ 🇮 ​🇹​ 🇾 ​🇧​ 🇴 ​🇩​ 🇾​

Version: 2
Requirements: AmxModX 1.9.0 +


The main function of this API is to change the viewmodel bodygroup.

Code:
//Example of usage, for more open example.sma

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

native cs_set_viewmodel_body(pPlayer, iValue);

public plugin_init()
	RegisterHam(Ham_Spawn, "player", "HamF_Spawn_Player_Post", 1);
	
public HamF_Spawn_Player_Post(iPlayer)
{
	if(!is_user_connected(iPlayer))
		return HAM_IGNORED;
	
	cs_set_viewmodel_body(iPlayer, 1) //Set v_ bodygroup number

	return HAM_IGNORED;	
}
Update v2: Aug 2022
- Fixed draw animation bug
- Fixed bug on usp/m4a1 attachments, fixed crash on suicide/death
- Delay on deploy, obs, eject shell moved to taskid
- Fixed Spec OBS USP and M4A1 (silenced/unsilenced weapon check)
Attached Files
File Type: sma Get Plugin or Get Source (example.sma - 1291 views - 1.3 KB)
File Type: sma Get Plugin or Get Source (setviewentitybody.sma - 363 views - 28.7 KB)
File Type: 7z cstrike.7z (3.37 MB, 201 views)

Last edited by 1xAero; 08-14-2022 at 08:13.
1xAero is offline