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

[CS:S] Grenade Smoke Color 1.3.4


Post New Thread Reply   
 
Thread Tools Display Modes
Cyril Tuto
Member
Join Date: Mar 2012
Location: France
Old 09-13-2012 , 13:11   Re: [CS:S & DOD:S] Grenade Smoke Color
Reply With Quote #21

Hello,
Thank you for this plugin!
That should be removed or added to only the players with the flag "o" can be colored smoke? Thank you!
__________________
Cyril Tuto is offline
ahmedamin
New Member
Join Date: Jan 2010
Old 10-22-2012 , 15:39   Re: [CS:S & DOD:S] Grenade Smoke Color
Reply With Quote #22

Thank you m8
ahmedamin is offline
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 01-02-2013 , 17:23   Re: [CS:S & DOD:S] Grenade Smoke Color
Reply With Quote #23

Hi there,

I'm unapproving your plugin, as past errors (like TnTSCS ones, as well as DoD:S still being announced as compatible) weren't corrected.

Red
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work
RedSword is offline
HSFighter
Veteran Member
Join Date: Aug 2007
Location: Flensburg - Germany
Old 01-29-2013 , 16:18   Re: [CS:S & DOD:S] Grenade Smoke Color
Reply With Quote #24

Quote:
Originally Posted by RedSword View Post
Hi there,

I'm unapproving your plugin, as past errors (like TnTSCS ones, as well as DoD:S still being announced as compatible) weren't corrected.

Red
Hi RedSword,
  • Test on 10 CS:S Server's!
  • No errors until jet!
  • Announce for DoD:S removet.

Please Aprove again.
__________________



Sorry for my very bad english
Greetings HSFighter

Last edited by HSFighter; 01-29-2013 at 16:20.
HSFighter is offline
Send a message via ICQ to HSFighter
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 01-29-2013 , 17:51   Re: [CS:S] Grenade Smoke Color
Reply With Quote #25

When creating an entity, you should ensure that it is well created (!= -1) before using functions on it. L112

Also, please, please, please don't do that :

Code:
public bool:IsClientOK(client)
{
	if (client != 0)
	{
		// Get all clients on the server
		for (new i = 1; i <= MaxClients; i++)
		{
			// Check if player ok
			if (IsClientConnected(i) && IsClientInGame(i) && !IsFakeClient(client))
			{
				// Check if client is a player on the server
				if (i == client) return true;			
			}
		}	
	}	
	return false;
}
Use something simpler like :
Code:
public bool:IsValidClient(client)
{
	if ( !( 1 <= client <= MaxClients ) || !IsClientInGame(client) || IsFakeClient(client) )
	{
		return false
	}
	return true
}
You really don't need to loop through all players to validate if a player is present.

That might not be; all pass more conciously latter.
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work
RedSword is offline
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 01-29-2013 , 22:33   Re: [CS:S] Grenade Smoke Color
Reply With Quote #26

Hi again,

There is still something that should be adressed before approving :

If near round end, a player throw and detonate a smoke, than a round restart and another player get to have the same index for his smoke grenade, his smoke will be killed earlier.

To prevent that, use EntIndexToEntRef when calling the timer and retrieve the entity index with EntRefToEntIndex and make sure it is != -1.

Also, the rest below doesn't prevent approval, but it should be considered :
  • If you're unlucky, a player could throw a smoke grenade, go spectate, than it would detonate and a random input would be given as color. This can't crash, but I don't think it is a wanted behaviour (gray, possibly random). To prevent that simply handle team 1, or make it so you remember last team.
  • Don't implement OnMapStart if you're not going to use it. You're wasting ~9 lines.
  • L123 to 127. You don't need to do that. "smokegrenade_detonate" is already hooked; and it only exist in CS:S/GO. Currently, you're only locking yourself to CS:S. You also don't have to make sure your plugin doesn't produce errors on other unannounced mods. If you really feel repulsion towards CS:GO players, then you can let it as it is lol.
  • You better let it free to all mods (I mean by this, last point; but still write this plugin as CSS only) and if you're lucky someone will come report it working under CS:GO.

Red
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work

Last edited by RedSword; 01-29-2013 at 22:35.
RedSword is offline
minimoney1
SourceMod Donor
Join Date: Dec 2010
Old 01-30-2013 , 15:48   Re: [CS:S] Grenade Smoke Color
Reply With Quote #27

Quote:
Originally Posted by RedSword View Post
Hi again,

There is still something that should be adressed before approving :

If near round end, a player throw and detonate a smoke, than a round restart and another player get to have the same index for his smoke grenade, his smoke will be killed earlier.

To prevent that, use EntIndexToEntRef when calling the timer and retrieve the entity index with EntRefToEntIndex and make sure it is != -1.
Yeah, I actually fixed this locally when I was using it but forgot to post it here.
I had players reporting that their weapons just randomly disappeared and got this fixed with the help of TheTwistedPanda.
__________________
Need help? PM me or add me on Steam.
My Steam




Quote:
Originally Posted by Rp.KryptoNite View Post
For some reason his Plugin never worked for me ,
@credits were added
im not stealing any plugins dude its my THING
minimoney1 is offline
Pialx
SourceMod Donor
Join Date: Oct 2010
Old 04-17-2013 , 09:30   Re: [CS:S] Grenade Smoke Color
Reply With Quote #28

Could-you confirm the bug with weapons when sometimes the primary weapon disappears was fixed?
And what about the logs flooded in sm_grenadesmokecolor_mode "2" ?

I want to use this funny plugin!
Pialx is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 04-17-2013 , 14:53   Re: [CS:S] Grenade Smoke Color
Reply With Quote #29

*this should prevent players weapons from disappear.
...
__________________
Do not Private Message @me

Last edited by Bacardi; 04-18-2013 at 02:14. Reason: dam multi color...
Bacardi is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 04-17-2013 , 17:49   Re: [CS:S] Grenade Smoke Color
Reply With Quote #30

Bacardi - That won't correctly resolve the issue, if at all. The issue is CreateTimer is being passed an entity index, which is always subject to change (much like a client index). The correct way to resolve that bug is as RedSword suggested above. Although it looks like they overlooked a memory leak with Checktime only being killed once regardless of how many smoke grenades are passed.
__________________
thetwistedpanda 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 18:22.


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