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

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


Post New Thread Reply   
 
Thread Tools Display Modes
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Old 11-03-2011 , 21:14   Re: SMLIB 0.11 BETA (over 300 Function Stocks) | updated 15.07.2011
Reply With Quote #211

Looks like it does reach the client and then the client throws the event out:
Code:
Game event "item_found", Tick 3418429:
- "player" = "1"
- "quality" = "3"
- "method" = "3"
- "itemdef" = "5002"
__________________
DarthNinja is offline
napalm00
Veteran Member
Join Date: Jun 2011
Location: Italy, sadly
Old 11-04-2011 , 01:36   Re: SMLIB 0.11 BETA (over 300 Function Stocks) | updated 15.07.2011
Reply With Quote #212

So the client MUST see it in order to use the color?
__________________
napalm00 is offline
Despirator
Senior Member
Join Date: Jun 2011
Location: Kazakhstan ->Shymkent
Old 11-29-2011 , 07:04   Re: SMLIB 0.11 BETA (over 300 Function Stocks) | updated 15.07.2011
Reply With Quote #213

please add this stock)

PHP Code:
stock bool:StringToVector(const String:str[], Float:vector[3])
{
    new 
String:Splitter[3][64];
    if (
ExplodeString(str" "Splittersizeof(Splitter), sizeof(Splitter[])) != 3)
        return 
false;
    
    if (
String_IsNumeric(Splitter[0]) && String_IsNumeric(Splitter[1]) && String_IsNumeric(Splitter[2]))
    {
        
vector[0] = StringToFloat(Splitter[0]);
        
vector[1] = StringToFloat(Splitter[1]);
        
vector[2] = StringToFloat(Splitter[2]);
        return 
true;
    }
    return 
false;


Last edited by Despirator; 11-29-2011 at 07:05.
Despirator is offline
Chanz
Veteran Member
Join Date: Aug 2008
Location: Germany - Stuttgart
Old 11-29-2011 , 12:37   Re: SMLIB 0.11 BETA (over 300 Function Stocks) | updated 15.07.2011
Reply With Quote #214

Could you give us an example where this is needed?
My first guess was KV-files but KvGetVector already exists.
__________________
[ SourceModPlugins.org ][ My Plugins ]

Thank you for donations: [ Paypal ]

Video Tutorial (German): [ Gameserver & SourceMod Plugins mit HLSW verwalten ]
Chanz is offline
Despirator
Senior Member
Join Date: Jun 2011
Location: Kazakhstan ->Shymkent
Old 11-29-2011 , 13:27   Re: SMLIB 0.11 BETA (over 300 Function Stocks) | updated 15.07.2011
Reply With Quote #215

i made plugin which provides an advanced spawn functionality

Code:
"Entities"
{
	"Others"
	{
		"Bomb place"
		{
			"entity" "func_bomb_target"
			
			"DispatchKeyValue"
			{
				"pushdir"	"0 90 0"
				"speed"		"500"
				"spawnflags"	"64"
			}
			
			"NetPropsValue"
			{
				"m_vecMins"	"-100.0 -100.0 0.0"
				"m_vecMaxs"	"100.0 100.0 200.0"
				"m_nSolidType"	"2"
			}
		}
	}
}
there i can't identity whether the section is vector, integer, or float value, so i did these
PHP Code:
    KvGetSectionName(kv_PropsListsectionsizeof(section));
KvGetString(kv_PropsListNULL_STRINGbuffersizeof(buffer));
new 
offset GetEntSendPropOffs(entitysection);
if (
offset 0)
{
    new 
Float:vec[3];
    if (
StringToVector(buffervec))
        
SetEntDataVector(entityoffsetvectrue);
    else if (
String_IsNumeric(buffer)) // without float value
        
SetEntData(entityoffsetStringToInt(buffer), true);
    else if (
String_IsFloat(buffer))
        
SetEntDataFloat(entityoffsetStringToFloat(buffer), true);
    else
        
SetEntDataString(entityoffsetbuffersizeof(buffer), true);

and i made that stock

in some cases that stock will be useful to someone else

Last edited by Despirator; 11-30-2011 at 06:13.
Despirator is offline
Thrawn2
Veteran Member
Join Date: Apr 2009
Old 12-10-2011 , 18:26   Re: SMLIB 0.11 BETA (over 300 Function Stocks) | updated 15.07.2011
Reply With Quote #216

Entity_GetTargetName
Entity_GetGlobalName
Entity_GetParentName
Entity_GetModel


all just wrappers for GetEntPropString which returns 'Number of non-null bytes written.'. It would be useful if they would return that too ;)
__________________
einmal mit profis arbeiten. einmal.
Thrawn2 is offline
napalm00
Veteran Member
Join Date: Jun 2011
Location: Italy, sadly
Old 12-10-2011 , 19:32   Re: SMLIB 0.11 BETA (over 300 Function Stocks) | updated 15.07.2011
Reply With Quote #217

Quote:
Originally Posted by Thrawn2 View Post
Entity_GetTargetName
Entity_GetGlobalName
Entity_GetParentName
Entity_GetModel


all just wrappers for GetEntPropString which returns 'Number of non-null bytes written.'. It would be useful if they would return that too ;)
+1
__________________
napalm00 is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 12-12-2011 , 13:58   Re: SMLIB 0.11 BETA (over 300 Function Stocks) | updated 15.07.2011
Reply With Quote #218

I will move smlib on github.com, then you can fork and send pull requests with your changes
__________________
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

Last edited by berni; 12-12-2011 at 14:29.
berni is offline
zeroibis
Veteran Member
Join Date: Jun 2007
Old 12-12-2011 , 14:21   Re: SMLIB 0.11 BETA (over 300 Function Stocks) | updated 15.07.2011
Reply With Quote #219

Will the changes to the forks be merged into the official version eventually, or will all future stocks be supported via the forks?
__________________
zeroibis is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 12-12-2011 , 14:27   Re: SMLIB 0.11 BETA (over 300 Function Stocks) | updated 15.07.2011
Reply With Quote #220

Forking means, you make a copy of smlib on your own github account.

Pull request means, you can do the changes in your fork and then open a pull request at the official smlib. The code changes will then be reviewed and if everything is ok it will be "pulled" from your fork to smlib.
It's a common process at my company.
__________________
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

Last edited by berni; 12-12-2011 at 14:28.
berni 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 06:31.


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