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

Auto Bunnyhop Chance (Health Chance Deleted )


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff       
Zpoke
Senior Member
Join Date: Aug 2009
Location: Sweden
Old 08-10-2009 , 06:33   Auto Bunnyhop Chance (Health Chance Deleted )
Reply With Quote #1

Auto Bunnyhop Chance
version 1.0
by ZpoKe^

I deleted the first plugin "Health Chance" plugin because Exolent already made a plugin with that function
so i made a "Auto Bunnyhop Chance"


Introduction:

* In this plugin a random player can get Auto Bunnyhop.

How To Use It:

* When you get Auto Bhop Just Hold Down Space To Jump

Where Should I Use This Plugin:

* This plugin works perfect to HideNSeek mod where i used it or other funny mods, you can put this plugin in what server you like


Where Should I Put This:

Put autobhop_chance.amxx in your \addons\amxmodx\plugins
Put autobhop_chance.sma in your \addons\amxmodx\scripting
Attached Files
File Type: sma Get Plugin or Get Source (autobhop_chance.sma - 892 views - 1.3 KB)

Last edited by Zpoke; 08-11-2009 at 14:38.
Zpoke is offline
Zpoke
Senior Member
Join Date: Aug 2009
Location: Sweden
Old 08-10-2009 , 06:53   Re: Health Chance
Reply With Quote #2

If you got any trouble with it please contact me and i will help you
Zpoke is offline
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 08-10-2009 , 07:40   Re: Health Chance
Reply With Quote #3

Post the .sma seperate, and if it don't use any files such as .txt or .mdl, then don't post the .rar

If you have one of the custom files, use a .zip file

Hope you will do this, so i can see the code.
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
Old 08-10-2009, 10:12
crazyeffect
This message has been deleted by crazyeffect.
glorian
BANNED
Join Date: Mar 2009
Location: Surfplace.se
Old 08-10-2009 , 10:47   Re: Health Chance
Reply With Quote #4

This is useful for Hide n seek?
glorian is offline
Send a message via MSN to glorian
bnolan56
Member
Join Date: Jun 2006
Old 08-10-2009 , 12:06   Re: Health Chance
Reply With Quote #5

How about you give us a description.
__________________
bnolan56 is offline
Send a message via MSN to bnolan56
biscuit628
Senior Member
Join Date: Jun 2007
Location: 香港HongKong
Old 08-10-2009 , 12:16   Re: Health Chance
Reply With Quote #6

you need to tell us what the plugin do
__________________
My Plugins

C4man with fun

Sniper Skill bonus
-------------------------
Sorry for my poor English!
biscuit628 is offline
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 08-10-2009 , 12:24   Re: Health Chance
Reply With Quote #7

You should plus it; like:

set_pev(player, pev_health, pev( player, pev_health ) + 50 )
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 08-10-2009 , 13:34   Re: Health Chance
Reply With Quote #8

you are using fakemeta but declaring a bunch of stocks that are allready included in fakemeta and fun. take out the stocks

you also have a "print_green()" stock which never gets used

the main function uses alot of if's. it would be better to do something like this and use a switch statement instead
PHP Code:
new iRand random_num(0,100);

switch(
iRand)
{
    case 
0..10:
    {
         
//...
    
}
    
//...

you have also closed your for() loop to early
the last 2 if's dont get used at all

EDIT:
the last 2 if's will be exec'd on client "0" (server) which will give errors in the logs
__________________

Last edited by minimiller; 08-10-2009 at 13:38. Reason: edit
minimiller is offline
Send a message via MSN to minimiller
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 08-10-2009 , 13:49   Re: Health Chance
Reply With Quote #9

deleted the unneeded stocks...

Anyway, fix the errors yourself

Also, post it like this:
Attached Files
File Type: sma Get Plugin or Get Source (healthchance.sma - 711 views - 1.7 KB)
File Type: txt healthchance.txt (659 Bytes, 173 views)
File Type: inc colorchat.inc (2.3 KB, 176 views)
__________________
crazyeffect is offline
Send a message via MSN to crazyeffect
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-10-2009 , 13:49   Re: Health Chance
Reply With Quote #10

Your probabilities are incorrect.

Code:
random_num(0, 20) <= 3
gives 4/21.

Code:
random_num(0, 50) <= 5
gives 6/51.

And so on. Change the zero (0) to one (1) to fix it. OR you can use what I use:

Code:
#define chance(%1) ( %1 > random_num(0,99) )
with this you just put in the percentage that you want. If you want to do a 5 percent chance of happening use chance(5).

Of if you don't want to use percentages per say, use:

Code:
#define chance(%1,%2) ( %1 > random(%2) )
So, 3 out of 20 chance would be "chance(3,20)"
__________________

Last edited by fysiks; 08-10-2009 at 15:50.
fysiks 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 04:26.


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