PDA

View Full Version : Hero: Hat


jtpizzalover
07-04-2008, 16:02
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:
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.....

Aura
07-04-2008, 22:28
amx_shsetlevel name level ?

o__o

That's all you have to do...

G-Dog
07-04-2008, 23:21
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 selectedfor(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".