rott/kf_sources/KFStoryGame/Classes/ACTION_CashReward.uc
2026-07-14 20:27:09 +07:00

40 lines
996 B
Ucode

//-----------------------------------------------------------
//
//-----------------------------------------------------------
class ACTION_CashReward extends ScriptedAction
editinlinenew;
var () int BaseCashAmount;
function bool InitActionFor(ScriptedController C)
{
local Controller Controller;
if(Abs(BaseCashAmount) > 0)
{
for ( Controller = C.Level.ControllerList; Controller != none; Controller = Controller.NextController )
{
if(Controller.PlayerReplicationInfo != none &&
Controller.Pawn != none &&
Controller.Pawn.Health > 0)
{
Controller.PlayerReplicationInfo.Score += BaseCashAmount ;
if(PlayerController(Controller) != none)
{
PlayerController(Controller).ClientPlaySound(class 'CashPickup'.default.PickupSound);
PlayerController(Controller).ReceiveLocalizedMessage(class 'Msg_CashReward',BaseCashAmount);
}
}
}
}
return false;
}
DefaultProperties
{
}