Raised This Month: $ Target: $400
 0% 

Donators Plugin(v1.0)


Post New Thread Reply   
 
Thread Tools Display Modes
oneofthedragon
Member
Join Date: Jun 2006
Old 03-28-2007 , 23:33   Re: Donators Plugin(v1.0)
Reply With Quote #11

Maybe you should add cvars for what is given on what levels to what degree.
E.G.
A cvar on lv 1 to say how much health, armor, gravity, etc is given?

Also player commands to turn off special effects when they only hurt the player?
__________________
Need a map? PM me.
oneofthedragon is offline
Juba_PornBorn1
BANNED
Join Date: Feb 2007
Location: Caracas
Old 03-29-2007 , 04:44   Re: Donators Plugin(v1.0)
Reply With Quote #12

And those who dont donate? I guess they are the shooting ducks then!
Me donate! Beware! Great power hold I!

------Player VS God-Donater(Big spender)
Frags:--0-----------1045

God_Donater(big spender) PICTURE


Last edited by Juba_PornBorn1; 03-29-2007 at 04:56.
Juba_PornBorn1 is offline
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 03-29-2007 , 05:31   Re: Donators Plugin(v1.0)
Reply With Quote #13

This is a plugin i made for Neal121, you have just putted your name on it...
http://doombringer.ampaste.net/7617

Last edited by Deviance; 03-29-2007 at 05:45.
Deviance is offline
The Disclaimer
BANNED
Join Date: Mar 2007
Location: Florida
Old 03-29-2007 , 06:07   Re: Donators Plugin(v1.0)
Reply With Quote #14

What are you talking about.. I truthfully started this back I belive 2 weeks ago I never stole anything from you.. even though the codes do look the same I didn't steal anything..

Last edited by The Disclaimer; 03-29-2007 at 06:09.
The Disclaimer is offline
The Disclaimer
BANNED
Join Date: Mar 2007
Location: Florida
Old 03-29-2007 , 06:08   Re: Donators Plugin(v1.0)
Reply With Quote #15

Quote:
Originally Posted by XxAvalanchexX View Post
vvg125: "donor" and "donator" are synonyms.

The Disclaimer: It would be nice if you would add an option for donators to turn their glow on or off at will, because there are certain situations in which a glow would be detrimental.
Yes good Idea thanks Avalanche I'll put this in my next update.
The Disclaimer is offline
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 03-29-2007 , 07:59   Re: Donators Plugin(v1.0)
Reply With Quote #16

Quote:
Originally Posted by The Disclaimer View Post
What are you talking about.. I truthfully started this back I belive 2 weeks ago I never stole anything from you.. even though the codes do look the same I didn't steal anything..
Wow, i can't beleave the bullshit your talking. I posted that code on my pastebin 3 days ago, and you posted this yesterday. IMO you have someway gotten the URL to my pastebin, then downloaded the code to your computer and then putted your name on it.

Your code:
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <geoip>

#define Plugin "Donation Plugin"
#define Version "1.0"
#define Author "The Disclaimer"

new Float:speed[32], Float:Gravity[32]
new bool:is_donator[32], donator_level[32]

new const donator_ranks[10][] = {
	"Donator rank 1",
	"Donator rank 2",
	"Donator rank 3",
	"Donator rank 4",
	"Donator rank 5",
	"Donator rank 6",
	"Donator rank 7",
	"Donator rank 8",
	"Donator rank 9",
	"Donator rank 10"
}

new msgtext

public plugin_init()
{
	register_plugin(Plugin, Version, Author)
	register_event("CurWeapon","set_speed","be")
	register_event("ResetHUD", "set_gravity", "be")
	
	msgtext = get_user_msgid("StatusText")
}

public check_if_donator(id, steamid[])
{	
	new configsdir[64], path[132]
	get_configsdir(configsdir, 63)
	
	format(path, 131, "%s/donators.ini", configsdir)
	new file = fopen(path, "rt")
	
	if(!file)
	{
		server_print("Could not find the donators.ini file!")
		return PLUGIN_HANDLED
	}
	
	new Rtext[166], file_steamid[38], file_level[3]
	
	while(!feof(file))
	{
		fgets(file, Rtext, 165)
		parse(Rtext, file_steamid, 37, file_level, 2)
		
		if(equal(file_steamid, steamid))
		{
			is_donator[id] = true
			donator_level[id] = str_to_num(file_level)
						
			break;
		}
	}
        
	fclose(file)	
	return PLUGIN_CONTINUE
}

public give_stuff(id)
{	
	switch(donator_level[id])
	{
		case 1:
		{
			set_user_health(id, get_user_health(id) + 10)
			set_user_armor(id, get_user_armor(id) + 10)
			
			set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 10)
			speed[id] = 0.0
			Gravity[id] = 0.0
		}
		
		case 2:
		{
			set_user_health(id, get_user_health(id) + 40)
			set_user_armor(id, get_user_armor(id) + 40)
			
			set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 40)
			speed[id] = 50.0
			Gravity[id] = 90.0
		}
		
		case 3:
		{
			set_user_health(id, get_user_health(id) + 60)
			set_user_armor(id, get_user_armor(id) + 60)
			
			set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 60)
			speed[id] = 70.0
			Gravity[id] = 100.0
		}
		
		case 4:
		{
			set_user_health(id, get_user_health(id) + 90)
			set_user_armor(id, get_user_armor(id) + 90)
			
			set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 80)
			speed[id] = 80.0
			Gravity[id] = 120.0
		}
		
		case 5:
		{
			set_user_health(id, get_user_health(id) + 120)
			set_user_armor(id, get_user_armor(id) + 120)
			
			set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 100)
			speed[id] = 120.0
			Gravity[id] = 140.0
		}
				
		case 6:
		{
			set_user_health(id, get_user_health(id) + 130)
			set_user_armor(id, get_user_armor(id) + 130)
			
			set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 130)
			speed[id] = 140.0
			Gravity[id] = 160.0
		}
		
		case 7:
		{
			set_user_health(id, get_user_health(id) + 160)
			set_user_armor(id, get_user_armor(id) + 160)
			
			set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 160)
			speed[id] = 160.0
			Gravity[id] = 180.0
		}
		
		case 8:
		{
			set_user_health(id, get_user_health(id) + 180)
			set_user_armor(id, get_user_armor(id) + 180)
			
			set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 180)
			speed[id] = 180.0
			Gravity[id] = 200.0
		}
		
		case 9:
		{
			set_user_health(id, get_user_health(id) + 200)
			set_user_armor(id, get_user_armor(id) + 200)
			
			set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 200)
			speed[id] = 200.0
			Gravity[id] = 220.0
		}
		
		case 10:
		{
			set_user_health(id, get_user_health(id) + 220)
			set_user_armor(id, get_user_armor(id) + 220)
			
			set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 220)
			speed[id] = 220.0
			Gravity[id] = 240.0
		}
	}
	
	set_user_maxspeed(id, get_user_maxspeed(id) + speed[id])
	set_user_gravity(id, get_user_gravity(id) + Gravity[id])
}

public tell_level(id)
{
	new name[32]
	get_user_name(id, name, 31)
	
	client_print(id, print_chat, "Hello there %s. You are a donator (Level %d, rank %s)", name, donator_level[id], donator_ranks[donator_level[id]])
	client_print(id, print_chat, "Your HP, Armor and speed has been highered based on how much you have donated")
	
	return PLUGIN_CONTINUE
}	

public client_putinserver(id)
{
	new steamid[38]
	get_user_authid(id, steamid, 37)
	
	check_if_donator(id, steamid)
	
	if(is_donator[id])
	{
		new name[32], IP[21], country[45]
		
		get_user_name(id, name, 31)
		get_user_ip(id, IP, 20, 0)
		
		geoip_country(IP, country, 44)
		
		set_hudmessage(0, 255, 0, -1.0, 0.28, 0, 6.0, 12.0)
		show_hudmessage(0, "A Donator has entered the server!", name, country)
		
		set_task(3.0, "tell_level", id)
		
		give_stuff(id)
		ShowHUD(id)
	}
	
	return PLUGIN_CONTINUE
}

public ShowHUD(id)    
{ 	
	new HUD[121]
	format(HUD, 120, "[%s] Level: %d", donator_ranks[donator_level[id]], donator_level[id]) 

	message_begin(MSG_ONE, msgtext, {0,0,0}, id)
	write_byte(0)
	write_string(HUD)
	message_end()
	
	set_task(1.0, "ShowHUD", id)
}

public set_speed(id)
{
	if(is_donator[id])
	{
		set_user_maxspeed(id, get_user_maxspeed(id) + speed[id])
	}
}

public set_gravity(id)
{
	if(is_donator[id])
	{
		set_user_gravity(id, get_user_gravity(id) + Gravity[id])
	}
}
My code (http://doombringer.ampaste.net/7617):
Code:
/*
--------------------------------------------------------------
----------------------  Made by Deviance ---------------------
--------------------- www.the-place.co.nr --------------------
--------------------------------------------------------------
*/

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <geoip>

#define Plugin "Donation System"
#define Version "1.0"
#define Author "Doombringer"

new Float:speed[32], Float:Gravity[32]
new bool:is_donator[32], donator_level[32]

new const donator_ranks[10][] = {
	"Donator rank 1",
	"Donator rank 2",
	"Donator rank 3",
	"Donator rank 4",
	"Donator rank 5",
	"Donator rank 6",
	"Donator rank 7",
	"Donator rank 8",
	"Donator rank 9",
	"Donator rank 10"
}

new msgtext

public plugin_init()
{
	register_plugin(Plugin, Version, Author)
	register_event("CurWeapon","set_speed","be")
	register_event("ResetHUD", "set_gravity", "be")
	
	msgtext = get_user_msgid("StatusText")
}

public check_if_donator(id, steamid[])
{	
	new configsdir[64], path[132]
	get_configsdir(configsdir, 63)
	
	format(path, 131, "%s/donators.ini", configsdir)
	new file = fopen(path, "rt")
	
	if(!file)
	{
		server_print("Could not find the donators.ini file!")
		return PLUGIN_HANDLED
	}
	
	new Rtext[166], file_steamid[38], file_level[3]
	
	while(!feof(file))
	{
		fgets(file, Rtext, 165)
		parse(Rtext, file_steamid, 37, file_level, 2)
		
		if(equal(file_steamid, steamid))
		{
			is_donator[id] = true
			donator_level[id] = str_to_num(file_level)
						
			break;
		}
	}
        
	fclose(file)	
	return PLUGIN_CONTINUE
}

public give_stuff(id)
{	
	switch(donator_level[id])
	{
		case 1:
		{
			set_user_health(id, get_user_health(id) + 10)
			set_user_armor(id, get_user_armor(id) + 10)
			
			set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 10)
			speed[id] = 0.0
			Gravity[id] = 0.0
		}
		
		case 2:
		{
			set_user_health(id, get_user_health(id) + 40)
			set_user_armor(id, get_user_armor(id) + 40)
			
			set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 40)
			speed[id] = 50.0
			Gravity[id] = 90.0
		}
		
		case 3:
		{
			set_user_health(id, get_user_health(id) + 60)
			set_user_armor(id, get_user_armor(id) + 60)
			
			set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 60)
			speed[id] = 70.0
			Gravity[id] = 100.0
		}
		
		case 4:
		{
			set_user_health(id, get_user_health(id) + 90)
			set_user_armor(id, get_user_armor(id) + 90)
			
			set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 80)
			speed[id] = 80.0
			Gravity[id] = 120.0
		}
		
		case 5:
		{
			set_user_health(id, get_user_health(id) + 120)
			set_user_armor(id, get_user_armor(id) + 120)
			
			set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 100)
			speed[id] = 120.0
			Gravity[id] = 140.0
		}
				
		case 6:
		{
			set_user_health(id, get_user_health(id) + 130)
			set_user_armor(id, get_user_armor(id) + 130)
			
			set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 130)
			speed[id] = 140.0
			Gravity[id] = 160.0
		}
		
		case 7:
		{
			set_user_health(id, get_user_health(id) + 160)
			set_user_armor(id, get_user_armor(id) + 160)
			
			set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 160)
			speed[id] = 160.0
			Gravity[id] = 180.0
		}
		
		case 8:
		{
			set_user_health(id, get_user_health(id) + 180)
			set_user_armor(id, get_user_armor(id) + 180)
			
			set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 180)
			speed[id] = 180.0
			Gravity[id] = 200.0
		}
		
		case 9:
		{
			set_user_health(id, get_user_health(id) + 200)
			set_user_armor(id, get_user_armor(id) + 200)
			
			set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 200)
			speed[id] = 200.0
			Gravity[id] = 220.0
		}
		
		case 10:
		{
			set_user_health(id, get_user_health(id) + 220)
			set_user_armor(id, get_user_armor(id) + 220)
			
			set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 220)
			speed[id] = 220.0
			Gravity[id] = 240.0
		}
	}
	
	set_user_maxspeed(id, get_user_maxspeed(id) + speed[id])
	set_user_gravity(id, get_user_gravity(id) + Gravity[id])
}

public tell_level(id)
{
	new name[32]
	get_user_name(id, name, 31)
	
	client_print(id, print_chat, "Hello there %s. You are a donator (Level %d, rank %s)", name, donator_level[id], donator_ranks[donator_level[id]])
	client_print(id, print_chat, "Your HP, Armor and speed has been highered based on how much you have donated")
	
	return PLUGIN_CONTINUE
}	

public client_putinserver(id)
{
	new steamid[38]
	get_user_authid(id, steamid, 37)
	
	check_if_donator(id, steamid)
	
	if(is_donator[id])
	{
		new name[32], IP[21], country[45]
		
		get_user_name(id, name, 31)
		get_user_ip(id, IP, 20, 0)
		
		geoip_country(IP, country, 44)
		
		set_hudmessage(0, 255, 0, -1.0, 0.28, 0, 6.0, 12.0)
		show_hudmessage(0, "Community Benefactor %s has entered the server. (%s)", name, country)
		
		set_task(3.0, "tell_level", id)
		
		give_stuff(id)
		ShowHUD(id)
	}
	
	return PLUGIN_CONTINUE
}

public ShowHUD(id)    
{ 	
	new HUD[121]
	format(HUD, 120, "[%s] Level: %d", donator_ranks[donator_level[id]], donator_level[id]) 

	message_begin(MSG_ONE, msgtext, {0,0,0}, id)
	write_byte(0)
	write_string(HUD)
	message_end()
	
	set_task(1.0, "ShowHUD", id)
}

public set_speed(id)
{
	if(is_donator[id])
	{
		set_user_maxspeed(id, get_user_maxspeed(id) + speed[id])
	}
}

public set_gravity(id)
{
	if(is_donator[id])
	{
		set_user_gravity(id, get_user_gravity(id) + Gravity[id])
	}
}
Please stop lie and tell the truth, you are already busted ...

Last edited by Deviance; 03-29-2007 at 08:05.
Deviance is offline
The Disclaimer
BANNED
Join Date: Mar 2007
Location: Florida
Old 03-29-2007 , 08:03   Re: Donators Plugin(v1.0)
Reply With Quote #17

How could I get the URL..
The Disclaimer is offline
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 03-29-2007 , 08:06   Re: Donators Plugin(v1.0)
Reply With Quote #18

Quote:
Originally Posted by The Disclaimer View Post
How could I get the URL..
Dunno, still your code is 99.99% similar to mine...
I dont see why you just dont tell the thruth
Deviance is offline
The Disclaimer
BANNED
Join Date: Mar 2007
Location: Florida
Old 03-29-2007 , 08:13   Re: Donators Plugin(v1.0)
Reply With Quote #19

Because I didn't steal it... I couldn't have gotten the URL... Dude I'm not lieing.. You can unapprove this all you want I'm not lieing.
The Disclaimer is offline
vvg125
AMX Mod X Beta Tester
Join Date: Dec 2006
Location: Queens (Douglaston), New
Old 03-29-2007 , 08:24   Re: Donators Plugin(v1.0)
Reply With Quote #20

Erm... anyone can get the URL. Just look at the latest ones every once in a while.

I wonder if the pastebin database stores edits and edit dates. If it does, this can be easily proven to be true or not.
__________________
vvg125 is offline
Send a message via AIM to vvg125 Send a message via MSN to vvg125 Send a message via Yahoo to vvg125
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 13:24.


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