Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » storing cash in some sort of bank
Re: storing cash in some sort of bank [message #465032 is a reply to message #464923] Wed, 28 March 2012 06:24 Go to previous messageGo to previous message
triattack is currently offline  triattack
Messages: 14
Registered: May 2011
Karma:
Recruit
I use a really simple pool system for my building revival in apb if you mod it a bit more and make the pool store the ammount a player has in an array that uses the player ID you should have some sort of bank system.
if you split it and add a script to add interest to it you should have a bank system.

								if(Get_Money(PlayerID) >= fund_hp)
								{
									Set_Money(PlayerID,Get_Money(PlayerID)-fund_hp);
									money_hp[Get_Team(PlayerID)] ++;
									int temp = money_hp[Get_Team(PlayerID)];
									int temp1 =  temp * fund_hp;
									int temp2 = fund_hp * needed_amount_donations_hp;
									char funded[250];
									sprintf(funded,"%d has been added to the Helli Pad pool the Helli Pad pool now contains: %d / %d", fund_hp, temp1, temp2);
									Send_Message_Team(team,0,255,0,funded);
									bool restored = tri_Restore(hp,needed_amount_donations_wf,money_hp[Get_Team(PlayerID)],4);
									if(restored)
									{
										Send_Message_Team(team,0,255,5,"your hp is restored nice job");
									}
								}


this is a really short part of the plugin (it isn't released as the FDS isn't done yet and the plugin still needs to be cleaned once done i'll post it here and on the apb forums with source.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: C&C_Prototype *wip*
Next Topic: defense scripts when weapon changes
Goto Forum:
  


Current Time: Wed Dec 18 10:02:47 MST 2024

Total time taken to generate the page: 0.00783 seconds