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

SetViewEntityBody


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay       
Hanna
Member
Join Date: Sep 2016
Old 09-13-2016 , 22:01   SetViewEntityBody
Reply With Quote #1


Version: Release 1.7
Requirements: latest AmxModX 1.8.3

Description:

The main function of this plugin is changing the viewmodel bodygroup.
It doesn't matter how high is player latency/ping, low fps count - the player will see only bodygroup you pointed without bugs. The custom weapons are also supported.
Also this plugin comes with custom v_ models, you don't need to replace original, just put them into cstrike/models/weapons. The default v_ models are removed from precache.
As you know, Counter-Strike Online uses two hands bodygroup in v_ models. So let's make it now work in Counter-Strike 1.6!

Some functions are still need to do.

1. Spectators support - DONE (Release 1.0)
2. Remove trace attack and use default cs decals - TODO

There is three native functions:

Main:
native SetViewEntityBody(pPlayer, iValue); //pPlayer - player index, iValue - bodygroup number

Secondary:
native SetUserSex(pPlayer, iValue); //pPlayer - player index, iValue /1 - MALE, 2 - FEMALE
native GetUserSex(pPlayer); //pPlayer - player index /Getting the player sex


Usage example:

Code:
#define MALE 0
#define FEMALE 1

public client_connect(id)
{
SetUserSex(id, MALE); //Making it male at connect for example
SetViewEntityBody(id, 0); //Setting viewmodel bodygroup to zero for example
} public HamF_Item_Deploy_Post(iEnt) {
static id, iWeaponName[24];
id = get_pdata_cbase(iEnt, m_pPlayer, 4); switch(GetUserSex(id)) {
case FEMALE: set_pev(id, pev_viewmodel2, FEMALE_KNIFE);
default: set_pev(id, pev_viewmodel2, MALE_KNIFE);
}
return HAM_IGNORED;
}
You can uncomment DEBUG and lookout for switch_sex command function.

14/9/16: First Beta release

Update 15/9/16: Release 1.0, added Spectator support, redefined MALE, FEMALE, added sex checks into deploy, fixed dead player bodies non disappear.

Update 15/9/16: Release 1.1, some bugfix.


Update 15/9/16: Release 1.2, removed value msg check

Update 15/9/16: Release 1.3, i've made one big mistake while setting the spectating target anim, so it's now fixed. The spectator target body now will be fine.

Update 15/9/16: Release 1.4, while playing online, i've seen a bug with spectators hands, so i decided to lookout what's the problem. Instead of using SpecHealth, i've replaced it with StatusValue. Why? The first player who killed us in previous version always was bugged. Now it's fixed. The attack bug is also fixed.
Also... I randomized the connected players hand body. Look at:

Code:
//test functions only
public client_connect(id)
{
//testing, was good. Comment nearby both if you want to uncomment and test this randomize
switch(random_num(1,10)) {
case 1..5: {
SetUserSex(id, MALE); //Making it male, to make our nearby func work
SetViewEntityBody(id, MALE); //Set Viewbody
}
case 6..10 {
SetUserSex(id, FEMALE); //Making this female
SetViewEntityBody(id, FEMALE); //Set Viewbody
}
}
/*SetUserSex(id, MALE); //Making it male, to make our nearby func work
SetViewEntityBody(id, MALE); //Reset Viewbody*/
}
Update 15/9/16: Release 1.5, some bugfix, the observer is done.
P.S. Enough for today.

Update 15/9/16: Release 1.6, again bugfix.

Update 16/9/16: Release 1.7, bugfixes. Now i started to lookout for attack system. I have 2 ideas currently and one of them is replacing atk system with custom trace, but the way it can be done - with Orpheu. Need some time to think. P.S: download both include and source again.
Attached Files
File Type: 7z cstrike.7z (3.37 MB, 993 views)
File Type: inc viewbodyswitch.inc (13.0 KB, 882 views)
File Type: sma Get Plugin or Get Source (viewbodyswitch.sma - 1779 views - 7.9 KB)

Last edited by Hanna; 09-16-2016 at 05:17.
Hanna is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 09-14-2016 , 02:32   Re: SetViewEntityBody
Reply With Quote #2

Screens?
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
Hanna
Member
Join Date: Sep 2016
Old 09-14-2016 , 04:01   Re: SetViewEntityBody
Reply With Quote #3

Later i'll upload video.

I forgot to fix dead player bodies disappear.

Just replace Playback forward function with this:

Code:
public Forward_PlaybackEvent(iFlags, id, iEvent)
{
//TODO
if(is_user_alive(id))
{
return FMRES_SUPERCEDE;
}
return FMRES_IGNORED;
}
The Spectators support i'll do next.
The attack i dunno, maybe replace using custom trace and ham damage.
Hanna is offline
Syturi0
Veteran Member
Join Date: Aug 2014
Location: Your mom house -Portugal
Old 09-14-2016 , 06:35   Re: SetViewEntityBody
Reply With Quote #4

Quote:
Requirements: latest AmxModX 1.8.3
Why?
Most people use 1.8.2
Cant you make it work on it?
Syturi0 is offline
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 09-14-2016 , 10:25   Re: SetViewEntityBody
Reply With Quote #5

Don't use .7z, u should use .zip.
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
Hanna
Member
Join Date: Sep 2016
Old 09-14-2016 , 16:41   Re: SetViewEntityBody
Reply With Quote #6

Gonna reupload resources a bit later.
Hanna is offline
Old 09-14-2016, 21:25
Hanna
This message has been deleted by Hanna.
Old 09-14-2016, 21:54
Hanna
This message has been deleted by Hanna.
Old 09-14-2016, 22:32
Hanna
This message has been deleted by Hanna.
Old 09-14-2016, 23:18
Hanna
This message has been deleted by Hanna.
Old 09-15-2016, 01:48
Hanna
This message has been deleted by Hanna.
Old 09-15-2016, 02:34
Hanna
This message has been deleted by Hanna.
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 09-15-2016 , 03:38   Re: SetViewEntityBody
Reply With Quote #7

You can delete your older posts, there's no need of bumping this thread each hour I guess.
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
Hanna
Member
Join Date: Sep 2016
Old 09-15-2016 , 03:46   Re: SetViewEntityBody
Reply With Quote #8

Update: Release 1.6 - bugfixes while spectating and the target died at the moment we are tried to look him from first person.
Redownload both include and source.

Last edited by Hanna; 09-15-2016 at 03:51.
Hanna is offline
Hanna
Member
Join Date: Sep 2016
Old 09-15-2016 , 03:47   Re: SetViewEntityBody
Reply With Quote #9

Quote:
Originally Posted by NiHiLaNTh View Post
You can delete your older posts, there's no need of bumping this thread each hour I guess.
xD, yes. But how i can do it? Can't find any delete button or edit oO.

Edit: found LOL.

Last edited by Hanna; 09-15-2016 at 03:50.
Hanna is offline
frk_14
Senior Member
Join Date: Jan 2009
Location: Argentina
Old 09-15-2016 , 23:08   Re: SetViewEntityBody
Reply With Quote #10

insane job
__________________
frk_14 is offline
Send a message via MSN to frk_14 Send a message via Skype™ to frk_14
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 08:45.


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