Raised This Month: $32 Target: $400
 8% 

SMLIB 0.11 BETA (over 300 Function Stocks) | updated 15.07.2011


Post New Thread Reply   
 
Thread Tools Display Modes
gCode
Junior Member
Join Date: Mar 2011
Old 03-11-2011 , 07:04   Re: SMLIB 0.10.1 BETA (over 300 Function Stocks) | updated 07.03.2011
Reply With Quote #111

Please add getting count of all players, and GetRandomPlayer(Count, team), if team 3, then script will choose player from all teams without spectators.
gCode is offline
Chanz
Veteran Member
Join Date: Aug 2008
Location: Germany - Stuttgart
Old 03-11-2011 , 08:29   Re: SMLIB 0.10.1 BETA (over 300 Function Stocks) | updated 07.03.2011
Reply With Quote #112

GetRandomPlayer(count, team) what does count mean?
And instead of a team index I suggest to handle it as an bitflag var and use an enum to specify the teams etc.

Team_Unassigned = 0,
Team_Spectator = 1,
Team_One = 2,
Team_Two = 4,
...
Team_Dead,
Team_Alive,
Team_All,
__________________
[ SourceModPlugins.org ][ My Plugins ]

Thank you for donations: [ Paypal ]

Video Tutorial (German): [ Gameserver & SourceMod Plugins mit HLSW verwalten ]
Chanz is offline
gCode
Junior Member
Join Date: Mar 2011
Old 03-11-2011 , 13:28   Re: SMLIB 0.10.1 BETA (over 300 Function Stocks) | updated 07.03.2011
Reply With Quote #113

Count of getting players...
Nice idea. Team_All, super.
Please, add this function.

And if you can... Function of brightness map. (light controller) SetMapBrightness(Count of brigntness);
Also force round end. ForceRoundEnd(Float: Delay);

Last edited by gCode; 03-12-2011 at 10:33.
gCode is offline
gCode
Junior Member
Join Date: Mar 2011
Old 03-15-2011 , 13:36   Re: SMLIB 0.10.1 BETA (over 300 Function Stocks) | updated 07.03.2011
Reply With Quote #114

03/15/2011 - 203:19: [SM] Native "GetEntPropEnt" reported: Property "m_hActiveWeapon" not found (entity 111/entityflame)
03/15/2011 - 203:19: [SM] Displaying call stack trace for plugin "zinfection.smx":
03/15/2011 - 203:19: [SM][0] Line 929, E:\scripting\include\smlib/clients.inc::Client_GetActiveWeapon()
03/15/2011 - 203:19: [SM][1] Line 948, E:\scripting\include\smlib/clients.inc::Client_GetActiveWeaponName()

if (IsValidEntity(attacker) && attacker > MaxClients)
{
Client_GetActiveWeaponName(attacker, ActivePlayerWeapon, 64);

wtf?!
gCode is offline
Chanz
Veteran Member
Join Date: Aug 2008
Location: Germany - Stuttgart
Old 03-15-2011 , 14:00   Re: SMLIB 0.10.1 BETA (over 300 Function Stocks) | updated 07.03.2011
Reply With Quote #115

attacker > MaxClients wtf!?

Please check if you really want the weapon of a non player entity...
Probably attacker is your client entity index so Client_IsValid(attacker) would be better.
__________________
[ SourceModPlugins.org ][ My Plugins ]

Thank you for donations: [ Paypal ]

Video Tutorial (German): [ Gameserver & SourceMod Plugins mit HLSW verwalten ]
Chanz is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 03-15-2011 , 17:21   Re: SMLIB 0.10.1 BETA (over 300 Function Stocks) | updated 07.03.2011
Reply With Quote #116

it should probably be attacker <= MaxClients
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
berni is offline
Master53
Veteran Member
Join Date: Dec 2009
Old 03-20-2011 , 10:16   Re: SMLIB 0.9 BETA (266 Function Stocks)
Reply With Quote #117

Quote:
Originally Posted by berni View Post
is this suggesting that you can use lightgreen in hl2mp because if it did that would be awsome.
__________________
Master(d)



Master53 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 03-20-2011 , 12:07   Re: SMLIB 0.9 BETA (266 Function Stocks)
Reply With Quote #118

Quote:
Originally Posted by berni View Post
Valid colors are:
...
"black"
D:

Quote:
Originally Posted by asherkin View Post
\x06 is just the 'custom' colour in the OBV engine, it's specified at runtime in the client code by CBaseHudChat::SetCustomColor(const char *).
For example TF2 uses it for the item found messages, where it sets it to the colour representing the quality of the found item.
It's black before it is set in code.
Maybe it could be added with a {custom} name, just please not {black}.
__________________
asherkin is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 03-20-2011 , 12:12   Re: SMLIB 0.10.1 BETA (over 300 Function Stocks) | updated 07.03.2011
Reply With Quote #119

is there any chance to set "black"/custom color?
Leonardo is offline
psychonic

BAFFLED
Join Date: May 2008
Old 03-20-2011 , 13:15   Re: SMLIB 0.10.1 BETA (over 300 Function Stocks) | updated 07.03.2011
Reply With Quote #120

Quote:
Originally Posted by Leonardo View Post
is there any chance to set "black"/custom color?
Nope. It's been requested of Valve, but there is currently no way for the server to manually set a color for it.
psychonic is offline
Reply


Thread Tools
Display Modes

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 05:40.


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