Raised This Month: $ Target: $400
 0% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 12-17-2011 , 17:33   Re: SMLIB 0.11 BETA (over 300 Function Stocks) | updated 15.07.2011
Reply With Quote #221

[Important]

smlib is hosted on github now.

https://github.com/bcserv/smlib

You can clone smlib like this:
git clone [email protected]:bcserv/smlib.git

You can also fork smlib to your own github account and clone it from there.

If you are not familiar with using git yet, this might be a good tutorial for you: http://help.github.com/win-set-up-git/
If you are looking for a GUI Interface: http://code.google.com/p/tortoisegit/downloads/list
__________________
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-17-2011 at 17:35.
berni is offline
Thrawn2
Veteran Member
Join Date: Apr 2009
Old 12-17-2011 , 18:38   Re: SMLIB 0.11 BETA (over 300 Function Stocks) | updated 15.07.2011
Reply With Quote #222

lovely!
__________________
einmal mit profis arbeiten. einmal.
Thrawn2 is offline
BlueRaja
Senior Member
Join Date: Nov 2004
Old 12-20-2011 , 17:54   Re: SMLIB 0.11 BETA (over 300 Function Stocks) | updated 15.07.2011
Reply With Quote #223

I like the icons in the main post, you are good at this

However, question: What in the world is this for?

Code:
/**
 * Let's the specified value "overflow" if it is outside the given limit.
 * This is like with integers when it reaches a value above the max possible
 * integer size.
 * 
 * @param value			Value
 * @param min			Min value used as lower border
 * @param max			Max value used as upper border
 * @return				Overflowed number
 */
stock any:Math_Overflow(any:value, any:min, any:max)
{
	return (value % max) + min;
}
__________________
STEPS IN TROUBLESHOOTING <insert anything here>:
1. Narrow down the problem to a specific condition or conditions.
2. Fix it.
BlueRaja is offline
Send a message via AIM to BlueRaja Send a message via MSN to BlueRaja
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 12-20-2011 , 18:48   Re: SMLIB 0.11 BETA (over 300 Function Stocks) | updated 15.07.2011
Reply With Quote #224

with this you can define a certain value range where the value loops.

For example, if you specify 2 - 8, and you pass 12 as value. 12 is not in the range 2 - 8, so it cuts the rest ( 12 - 8 = 4) and adds it to 2, result is 6.

A circle is also a good example, when you have 360 degrees you will start from 0 again, it's a closed system.
__________________
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
BlueRaja
Senior Member
Join Date: Nov 2004
Old 12-20-2011 , 19:10   Re: SMLIB 0.11 BETA (over 300 Function Stocks) | updated 15.07.2011
Reply With Quote #225

Ah, then it's not correct (try Math_Overflow(7, 2, 8 )). It should be

Code:
return (value % (max-min+1)) + min;
This will work for negative min/max, but it might not work for negative value. Does anyone know if, in SourcePawn, -1%3 == -1 or -1%3 == 2 (in C/C++, it is implementation-defined).
__________________
STEPS IN TROUBLESHOOTING <insert anything here>:
1. Narrow down the problem to a specific condition or conditions.
2. Fix it.

Last edited by BlueRaja; 12-20-2011 at 19:11.
BlueRaja is offline
Send a message via AIM to BlueRaja Send a message via MSN to BlueRaja
FlyveHest
Member
Join Date: Nov 2010
Location: Denmark
Old 04-03-2012 , 03:57   Re: SMLIB 0.11 BETA (over 300 Function Stocks) | updated 15.07.2011
Reply With Quote #226

BRAINFART! Nothing to see here
__________________
FlyveHest
-
GB.CritVote - Let people vote to en/disable random crits each round

Visit Gladblad Gamers

Last edited by FlyveHest; 04-03-2012 at 04:06. Reason: Downloaded latest compiler, works fine now :)
FlyveHest is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 04-03-2012 , 09:19   Re: SMLIB 0.11 BETA (over 300 Function Stocks) | updated 15.07.2011
Reply With Quote #227

Please don't edit posts.

Yes, earlier versions of the sourcemod linux compiler had bugs, they have been reported and fixed by me.
__________________
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
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 04-24-2012 , 04:40   Re: SMLIB 0.11 BETA (over 300 Function Stocks) | updated 15.07.2011
Reply With Quote #228

Wat happened?
http://www.sourcemodplugins.org/
__________________
Peace-Maker is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 04-24-2012 , 13:56   Re: SMLIB 0.11 BETA (over 300 Function Stocks) | updated 15.07.2011
Reply With Quote #229

Somehow the DNS has changed to an other IP.. I don't know why, it should be fixed now (as soon as your DNS server gets the changed).

But it will be offline in 2 hours again because the server gets moved to another datacenter until 4 o'clock morning.
__________________
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
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 05-07-2012 , 00:48   Re: SMLIB 0.11 BETA (over 300 Function Stocks) | updated 15.07.2011
Reply With Quote #230

Awesome.
Code:
stock Client_SetFOV(client, value);
USEFUL!
__________________
retired
shavit 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 22:28.


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