User talk:Battle Bott

From Valve Developer Community
Revision as of 15:38, 2 June 2006 by Battle Bott (talk | contribs)
Jump to navigation Jump to search

function eventPlayerSay ( Owner, strText, bTeam )

if string.find(strText, "nade") then
local vVelocity;
local grenade = _EntCreate("grenade_ar2");
local pos = _EntGetPos (Owner)
_EntSetKeyValue(grenade, "damage", "60");
_EntSetPos(grenade, pos);
_EntSetPos(grenade, _PlayerGetShootAng(Owner));
_EntSetOwner(grenade, Owner);
vVelocity = vecMul(_PlayerGetShootAng(Owner), 1500);
_EntSetVelocity(grenade, vVelocity);
_EntSpawn(grenade);
else
return strText;
end;

end;