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

Hero: Hat


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jtpizzalover
Senior Member
Join Date: Dec 2005
Location: Left
Old 07-04-2008 , 16:02   Hero: Hat
Reply With Quote #1

Hat
Description: Ever have a person in your server you want to give levels to but not give them the level giving access flag(m) ?!? This hero gives a set amount of levels on keydown to the user with admin flag A.

shconfig.cfg CVARS:
Code:
hat_level 10
hat_adminflag a  // Admin flag required to use this hero (Default a = ADMIN_IMMUNITY)
cow 100			//level to set at
Thanks #superheromod for some weird stuff and yang for the odd variable naming of cow.....
Attached Files
File Type: sma Get Plugin or Get Source (sh_hat.sma - 1165 views - 2.5 KB)
__________________
jtpizzalover is offline
Aura
Member
Join Date: Jun 2008
Old 07-04-2008 , 22:28   Re: Hero: Hat
Reply With Quote #2

amx_shsetlevel name level ?

o__o

That's all you have to do...
Aura is offline
G-Dog
Senior Member
Join Date: Dec 2005
Location: Thunderstorm Central
Old 07-04-2008 , 23:21   Re: Hero: Hat
Reply With Quote #3

lol I remember when I attempted to fix this for whoever it was I was helping out at the time. But I noticed that in this version on keydown your setting the level on everyone, except the people who have the hero selected
Code:
for(new player=1; player<=SH_MAXSLOTS; player++) 
		if(is_user_alive(player) && !gHasHATPowers[player] ) {
			server_cmd("amx_shsetlevel ^"%s^" %d", steamid, level)
	}
also your checking for ultimate used when you never set a cooldown in the code thus making that check kinda redundant. And one final note: when you registered your cvars you had "hat" in lowercase, but both times you called the cvars(level, and admincheck) you capitalized it "HAT".
__________________
If at first you don't succeed, then skydiving isn't for you.
G-Dog is offline
Send a message via AIM to G-Dog
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 16:19.


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