Difference between revisions of "Player onthrowgren1"

From Fortress Forever Wiki
Jump to navigationJump to search
m (R00Kie moved page Player throwgren1 to Player onthrowgren1)
 
(No difference)

Latest revision as of 00:38, 4 July 2017


player_onthrowgren1( 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_onthrowgren1( player, time )
	if time < .5 then
		ApplyToPlayer( player, {AT.kStopPrimedGrens} )
		BroadcastMessageToPlayer(player, "Stop spamming!")
		return EVENT_DISALLOWED
	end
end