Raised This Month: $ Target: $400
 0% 

[CSS] Following C4


Post New Thread Reply   
 
Thread Tools Display Modes
KnifeLemon
Member
Join Date: Oct 2012
Location: South Korea
Old 09-19-2013 , 23:27   Re: [CSS] Following C4
Reply With Quote #11

i can not download
__________________
MY s-low.net Model !

http://s-low.net/forum/viewforum.php...57326b47f0de50

my wordpress model download center

http://knifelemon.wordpress.com/

MY Youtube .CH : http://www.youtube.com/knifelemon
Steam Profile : KnifeLemon ProFile
Skype : knifelemon
KnifeLemon is offline
Send a message via Skype™ to KnifeLemon
Mitchell
~lick~
Join Date: Mar 2010
Old 09-20-2013 , 11:24   Re: [CSS] Following C4
Reply With Quote #12

Quote:
Originally Posted by KnifeLemon View Post
i can not download
Fixed! Sorry i forgot this plugin was hooked to updater.

Quote:
Originally Posted by alongub View Post
Code:
SetEntDataEnt2(C4Hostage, gLeaderOffset, FollowingPlayer);
Should be SetEntPropEnt.

Code:
if(IsHostage(C4Hostage))
{
	AcceptEntityInput(C4Hostage, "Kill");
}
Shouldn't this be on round_end?

Code:
CreateConVar("sm_followingc4_version", PLUGIN_VERSION, "C4Model Version", FCVAR_DONTRECORD|FCVAR_NOTIFY);
Move this to OnPluginStart.
1.Not sure if i know the difference between them or not.
2.No, round_end removes all the entities anyways. so why would i delete something not there?
3. Moved it to pluginstart.
Mitchell is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 02-13-2014 , 12:58   Re: [CSS] Following C4
Reply With Quote #13

Quote:
Originally Posted by Mitchell View Post
Fixed! Sorry i forgot this plugin was hooked to updater.


1.Not sure if i know the difference between them or not.
2.No, round_end removes all the entities anyways. so why would i delete something not there?
3. Moved it to pluginstart.
Approved, however it is considered better to use SetEntProp* for all props (I cant remember the reasons off the top of my head now).

Code:
SetEntData(C4Hostage, FindSendPropOffs("CHostage", "m_isRescued"), true, 4, true);
SetEntProp(C4Hostage, Prop_Send, "m_isRescued", true);

and

Code:
SetEntDataEnt2(C4Hostage, gLeaderOffset, FollowingPlayer);
SetEntPropEnt(C4Hostage, Prop_send, "m_leader", FollowingPlayer);

Other than that nice job! I like the idea
Dr!fter is offline
RootCore
Junior Member
Join Date: Feb 2014
Location: Germany
Old 03-11-2014 , 19:13   Re: [CSS] Following C4
Reply With Quote #14

Sometimes it throws errors:

Quote:
L 03/11/2014 - 18:32:05: [SM] Displaying call stack trace for plugin "FollowingC4.smx":
L 03/11/2014 - 18:32:05: [SM] [0] Line 50, FollowingC4.sp::FindNewPlayer()
L 03/11/2014 - 18:32:05: [SM] [1] Line 45, FollowingC4.sp::PlayerDeathEvent()
L 03/11/2014 - 18:33:23: [SM] Native "GetEntPropVector" reported: Entity 155 (155) is invalid
L 03/11/2014 - 18:33:23: [SM] Displaying call stack trace for plugin "FollowingC4.smx":
L 03/11/2014 - 18:33:23: [SM] [0] Line 50, FollowingC4.sp::FindNewPlayer()
L 03/11/2014 - 18:33:23: [SM] [1] Line 39, FollowingC4.sp::OnClientDisconnect()
I think it's fixed now (attachment), but I'm not quite sure..

The suggested improvements are also added, as they sound nice. :)
They made "gLeaderOffset" useless. I removed it.

I hope, you forgive me, if I share it with the community.
I really enjoy this plugin.

// Removed attachment. Plugin got updated.

Last edited by RootCore; 03-12-2014 at 12:58.
RootCore is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 03-12-2014 , 11:07   Re: [CSS] Following C4
Reply With Quote #15

I'll throw out my own fix for that error. I probably wont use your version. Since i need to clean up the code anyways. (wow looking at this makes me realize how much i have approved.)

Last edited by Mitchell; 03-12-2014 at 11:20.
Mitchell is offline
RootCore
Junior Member
Join Date: Feb 2014
Location: Germany
Old 03-12-2014 , 12:05   Re: [CSS] Following C4
Reply With Quote #16

I've also improved a lot in my local version, as I like it tidy.
This version here is just a quick fix.

I thought maybe you wouldn't like it, if I post a complete different version..
RootCore is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 03-12-2014 , 12:13   Re: [CSS] Following C4
Reply With Quote #17

Quote:
Originally Posted by RootCore View Post
I've also improved a lot in my local version, as I like it tidy.
This version here is just a quick fix.

I thought maybe you wouldn't like it, if I post a complete different version..
I already threw out a fix for it. you can now remove your attached post.
Mitchell is offline
RootCore
Junior Member
Join Date: Feb 2014
Location: Germany
Old 03-14-2014 , 20:36   Re: [CSS] Following C4
Reply With Quote #18

Quote:
L 03/13/2014 - 12:205: [SM] Native "IsClientInGame" reported: Client index -1 is invalid
L 03/13/2014 - 12:205: [SM] Displaying call stack trace for plugin "FollowingC4.smx":
L 03/13/2014 - 12:205: [SM] [0] Line 35, FollowingC4.sp::OnClientDisconnect()
You should check, if FollowingPlayer is greater then 0.

But I'm a bit confused about why you check, if the followed player is not in game anymore..
If he disconnects that event is triggered too, so we got a spare buddy for him.
If it wasn't triggered, he should still be in the game.

So it's a bit redundant, or have I missed something? :/
RootCore is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 03-15-2014 , 00:31   Re: [CSS] Following C4
Reply With Quote #19

Quote:
Originally Posted by RootCore View Post
You should check, if FollowingPlayer is greater then 0.

But I'm a bit confused about why you check, if the followed player is not in game anymore..
If he disconnects that event is triggered too, so we got a spare buddy for him.
If it wasn't triggered, he should still be in the game.

So it's a bit redundant, or have I missed something? :/
Gotcha idk why i added that check. must've been thinking something else.
Mitchell 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 19:57.


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