View Single Post
guy
Senior Member
Join Date: Apr 2005
Old 11-17-2006 , 23:24   Re: Knife Mod - Special Abilities (Updated)
Reply With Quote #29

I added in a new conditional due to abuse on a friend's server, he asked me to make it so that people can't select knives if they're alive.
Code:
	


public display_knife(id) {
// code per old superheromod sma 1.18d
	if (is_user_alive(id)) {
		console_print(id, "You are not allowed to select knives while alive")
		client_print(id, print_chat, "You are not allowed to select knives while alive")
		return PLUGIN_HANDLED
	}
	new menuBody[512]
	add(menuBody, 511, "\rKnife Mod\w^n^n")
	add(menuBody, 511, "1. Machete \y(More Damage/Low Speed)\w^n")
	add(menuBody, 511, "2. Bak Knife \y(No Footsteps)\w^n")
	add(menuBody, 511, "3. Pocket Knife \y(High Speed)\w^n")
	add(menuBody, 511, "4. Butcher Knife \y(Low Gravity)\w^n")
	add(menuBody, 511, "5. Default Knife \y(Health Regeneration)\w^n^n")
	add(menuBody, 511, "0. Exit^n")
	
	new keys = ( 1<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<9 )
	show_menu(id, keys, menuBody, -1, "Knife Mod")
}
He also mentioned some of the abilities stacking but glancing at the code disabling alive selection should prevent that.
__________________
Call it, friendo.

Last edited by guy; 11-18-2006 at 14:33. Reason: unclear where cond was
guy is offline