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

[CS:GO]Increased Nade Damage


Post New Thread Reply   
 
Thread Tools Display Modes
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 09-13-2012 , 03:23   Re: [CS:GO]Increased Nade Damage
Reply With Quote #11

Quote:
Originally Posted by zan.gamer View Post
The plugin works as advertised but I get these in my SM error logs every map change.
I get those same errors not really sure what the problem is as the code should only execute when the projectile is created. I will be diving more into this however it does not effect the functionality of the plugin it self. I will hopefully have an update sometime this week fixing the error.
Doc-Holiday is offline
tigerox
AlliedModders Donor
Join Date: Oct 2008
Location: Canada
Old 09-13-2012 , 10:34   Re: [CS:GO]Increased Nade Damage
Reply With Quote #12

Quote:
Originally Posted by Doc-Holiday View Post
I get those same errors not really sure what the problem is as the code should only execute when the projectile is created. I will be diving more into this however it does not effect the functionality of the plugin it self. I will hopefully have an update sometime this week fixing the error.
CreateTimer(1.0, ChangeGrenadeDamage, iEnt);

It actually executes 1 second after the projectile is created. By then the entity could have been destroyed. You can check out my StickyNades Lite plugin if you would like an example of how change grenade properties safely.
__________________

Last edited by tigerox; 09-13-2012 at 10:36.
tigerox is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 09-13-2012 , 11:13   Re: [CS:GO]Increased Nade Damage
Reply With Quote #13

Quote:
Originally Posted by tigerox View Post
CreateTimer(1.0, ChangeGrenadeDamage, iEnt);

It actually executes 1 second after the projectile is created. By then the entity could have been destroyed. You can check out my StickyNades Lite plugin if you would like an example of how change grenade properties safely.
The error only occurs during a map change or when last player leaves the server. not during game play.

Ill play around with SDKHook_Spawn when i get a chance... prolly this weekend until then leave the plugin in new plugins for me and ill update it when i get out of class.

Last edited by Doc-Holiday; 09-13-2012 at 11:32.
Doc-Holiday is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 09-13-2012 , 21:03   Re: [CS:GO]Increased Nade Damage
Reply With Quote #14

Quote:
Originally Posted by tigerox View Post
CreateTimer(1.0, ChangeGrenadeDamage, iEnt);

It actually executes 1 second after the projectile is created. By then the entity could have been destroyed. You can check out my StickyNades Lite plugin if you would like an example of how change grenade properties safely.
so i swapped it over to use your method of hooking its spawn I haven't seen the error yet on my server. hopefully it fixes it..

Id like to know why the error happen though. I had the bots stopped. and i was only human. I didnt throw a grenade and the error still came lol.
Doc-Holiday is offline
zan.gamer
SourceMod Donor
Join Date: Jan 2011
Old 09-14-2012 , 12:53   Re: [CS:GO]Increased Nade Damage
Reply With Quote #15

Quote:
Originally Posted by Doc-Holiday View Post
1.0.1 09/13/12
Hopefully fixed the error on mapchange.
This version does fix the log error messages on mapchange. However, every time someone uses an HE nade in game it spams 4 messages to chat. Something about creating hook, original damage/radius and new damage/radius. I don't have the exact messages written down.

Is there a way to suppress these messages in game? They are distracting and make it hard to chat with others due to scrolling by to fast.

Edit:

I belive the 2 "PrintToChatAll lines are the problem but I'm not sure how to fix it (compile with sdkhooks)


Code:
 
 new Float:flGrenadePower = GetEntPropFloat(iEnt, Prop_Send, "m_flDamage");
 new Float:flGrenadeRadius = GetEntPropFloat(iEnt, Prop_Send, "m_DmgRadius");
 PrintToChatAll("Original - Power:%f  Radius:%f", flGrenadePower, flGrenadeRadius);
 SetEntPropFloat(iEnt, Prop_Send, "m_flDamage", (flGrenadePower*GetConVarFloat(g_Cvar_Power)));
 SetEntPropFloat(iEnt, Prop_Send, "m_DmgRadius", (flGrenadeRadius*GetConVarFloat(g_Cvar_Radius)));
 PrintToChatAll("Modified - Power:%f  Radius:%f", (flGrenadePower*GetConVarFloat(g_Cvar_Power)), (flGrenadeRadius*GetConVarFloat(g_Cvar_Radius)));
Edit2:
Nevermind; I removed the PrintToChatAll lines and recompiled and it seems to work; thanks.

Last edited by zan.gamer; 09-14-2012 at 15:58.
zan.gamer is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 09-14-2012 , 23:11   Re: [CS:GO]Increased Nade Damage
Reply With Quote #16

Quote:
Originally Posted by zan.gamer View Post
This version does fix the log error messages on mapchange. However, every time someone uses an HE nade in game it spams 4 messages to chat. Something about creating hook, original damage/radius and new damage/radius. I don't have the exact messages written down.

Is there a way to suppress these messages in game? They are distracting and make it hard to chat with others due to scrolling by to fast.

Edit:

I belive the 2 "PrintToChatAll lines are the problem but I'm not sure how to fix it (compile with sdkhooks)


Code:
 
 new Float:flGrenadePower = GetEntPropFloat(iEnt, Prop_Send, "m_flDamage");
 new Float:flGrenadeRadius = GetEntPropFloat(iEnt, Prop_Send, "m_DmgRadius");
 PrintToChatAll("Original - Power:%f  Radius:%f", flGrenadePower, flGrenadeRadius);
 SetEntPropFloat(iEnt, Prop_Send, "m_flDamage", (flGrenadePower*GetConVarFloat(g_Cvar_Power)));
 SetEntPropFloat(iEnt, Prop_Send, "m_DmgRadius", (flGrenadeRadius*GetConVarFloat(g_Cvar_Radius)));
 PrintToChatAll("Modified - Power:%f  Radius:%f", (flGrenadePower*GetConVarFloat(g_Cvar_Power)), (flGrenadeRadius*GetConVarFloat(g_Cvar_Radius)));
Edit2:
Nevermind; I removed the PrintToChatAll lines and recompiled and it seems to work; thanks.
LMAO... that was my debug version... its fixed in the original post.

Last edited by Doc-Holiday; 09-14-2012 at 23:26.
Doc-Holiday is offline
PresidentEvil
AlliedModders Donor
Join Date: Jun 2012
Old 09-15-2012 , 00:00   Re: [CS:GO]Increased Nade Damage
Reply With Quote #17

plug fails to compile, i tried using web compiler it requires sdkhook, I don't have a compiler on my computer can you attach a zip file
__________________
PresidentEvil is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 09-15-2012 , 00:11   Re: [CS:GO]Increased Nade Damage
Reply With Quote #18

Quote:
Originally Posted by PresidentEvil View Post
plug fails to compile, i tried using web compiler it requires sdkhook, I don't have a compiler on my computer can you attach a zip file
My local compiler with custom includes: http://www.mediafire.com/?4xgxggbwbw2t1w2


Unzip in your PC, put the .sp file in "compilacion de plugins/" folder and click in compile.exe and the .sp file will be compiled in "compilacion de plugins/compiled/" folder.


You can read the instructions but are in spanish (use traductor)
__________________
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; 09-15-2012 at 00:11.
Franc1sco is offline
Send a message via MSN to Franc1sco
PresidentEvil
AlliedModders Donor
Join Date: Jun 2012
Old 09-15-2012 , 01:10   Re: [CS:GO]Increased Nade Damage
Reply With Quote #19

Quote:
Originally Posted by Franc1sco View Post
My local compiler with custom includes: http://www.mediafire.com/?4xgxggbwbw2t1w2


Unzip in your PC, put the .sp file in "compilacion de plugins/" folder and click in compile.exe and the .sp file will be compiled in "compilacion de plugins/compiled/" folder.


You can read the instructions but are in spanish (use traductor)
fantastic

thank you
__________________
PresidentEvil is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 09-15-2012 , 10:26   Re: [CS:GO]Increased Nade Damage
Reply With Quote #20

compiled version added to first post.
Doc-Holiday 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 07:14.


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