Player onthrowgren1

From Fortress Forever Wiki
Revision as of 19:09, 11 May 2009 by Crazycarl (talk | contribs) (New page: {{Infobox manual/Header}} ==player_throwgren1( player, primetime )== This function is called whenever a player throws a frag grenade. Return true or false to allow/disallow the throw. ===I...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


player_throwgren1( player, primetime )

This function is called whenever a player throws a frag grenade. Return true or false to allow/disallow the throw.

Inputs

player(CFFPlayer) The player trying to throw the grenade. time(float) The time, in seconds, since the grenade was primed.

Examples

function player_throwgren1( player, time )
	if time < .5 then
		ApplyToPlayer( player, {AT.kStopPrimedGrens} )
		BroadcastMessageToPlayer(player, "Stop spamming!")
		return EVENT_DISALLOWED
	end
end