SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 19/03/2012, 08:10 PM   #11
Soldier9221
Little Clucker
 
Soldier9221's Avatar
 
Join Date: Dec 2010
Posts: 13
Reputation: 0
Default Re: TheLazySloth Functions

Very useful.

+rep
Soldier9221 is offline   Reply With Quote
Old 21/03/2012, 05:59 AM   #12
TheLazySloth
Huge Clucker
 
TheLazySloth's Avatar
 
Join Date: Aug 2011
Location: United States > California > Los Angeles County > Antellope Valley > Lancaster
Posts: 398
Reputation: 31
Default Re: TheLazySloth Functions

Will add more very soon.
Before I add some I would like anybody to tell me a useful function to make, one you would use for your server. I will make this idea of yours and put it in my list and point credits toward you. =]
__________________
I'm in the Script Help section helping people the best I can.

Guidelines:
I won't respond to your help thread IF there's 2 or more posts already and I havn't previously viewed it.

I won't respond to your help thread IF the title doesn't relate to the question.

I won't respond to your help thread IF it isn't in understandable English.

If I've HELPED you and SOLVED your problem, +rep is appreciated but not expected.

"This forum requires that you wait 120 seconds between posts. Please try again in 69 seconds." Is the reason I'm probably not responding swiftly, so be patient.
TheLazySloth is offline   Reply With Quote
Old 19/04/2012, 05:57 AM   #13
Spooky
Gangsta
 
Spooky's Avatar
 
Join Date: Nov 2011
Location: India
Posts: 547
Reputation: 24
Default Re: TheLazySloth Functions

Great Work Brother
Spooky is offline   Reply With Quote
Old 19/04/2012, 06:05 PM   #14
Wazner
Little Clucker
 
Join Date: Apr 2012
Posts: 2
Reputation: 0
Default Re: TheLazySloth Functions

Quote:
pawn Code:
stock Randomize(Minimum, Maximum) {
    new Result = random((Maximum + 1));
    while(Result < Minimum) {
        Result = random((Maximum + 1));
    }
    return Result;
}
Euhm, i don't think this will give good results.
When you do Randomize(5, 100), it will give a value between 5 and 95.

I'll suggest this
pawn Code:
#define RANDOM(%0,%1) (%0 + random(%1 - %0))
or as a stock function
pawn Code:
stock Random(min, max)
{
    return min + random(max - min);
}
Wazner is offline   Reply With Quote
Old 20/04/2012, 09:07 AM   #15
Universal Member
Little Clucker
 
Universal Member's Avatar
 
Join Date: Apr 2012
Location: \_(*_*)_/
Posts: 10
Reputation: 0
Default Re: TheLazySloth Functions

Nice try and good job !
Universal Member is offline   Reply With Quote
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



All times are GMT. The time now is 03:35 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.