Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Timer page Player
Re: Timer page Player [message #340585 is a reply to message #340563] Sun, 13 July 2008 03:46 Go to previous messageGo to previous message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma:
General (3 Stars)
Should look something like this.
class A_Tiberium_Field
{
    int PlayerID;
    void Entered(GameObject *obj,GameObject *enter);
    void Timer_Expired(GameObject *obj, int number);
};



void A_Tiberium_Field::Entered(GameObject *obj,GameObject *enter)
{
   int x = Commands->Get_Player_Type(enter);
   Vector3 spawn_position;
   if (CheckPlayerType(enter,x))
   {
      return;
   }
   char message[1000];
   if (Commands->Get_Player_Type(enter) == 1)
   {
       PlayerID = Get_Player_ID(enter);
       sprintf(message,"ppage %d Harvesting...",Get_Player_ID(enter));
       Console_Input(message);
       Commands->Start_Timer(obj,this,10f,1); 
       Commands->Start_Timer(obj,this,9f,2); 
       Commands->Start_Timer(obj,this,8f,3);
       Commands->Start_Timer(obj,this,7f,4);
       Commands->Start_Timer(obj,this,6f,5);
       Commands->Start_Timer(obj,this,5f,6);
       Commands->Start_Timer(obj,this,4f,7);
       Commands->Start_Timer(obj,this,3f,8);
       Commands->Start_Timer(obj,this,2f,9);
       Commands->Start_Timer(obj,this,1f,10);
   }
}


void A_Tiberium_Field::Timer_Expired(GameObject *obj, int number) {

   char message[256];
   sprintf(message,"ppage %d Harvesting Complete in: %d.",PlayerID, number);
   Console_Input(message);
}
ScriptRegistrant<A_Tiberium_Field> A_Tiberium_Field_Registrant("A_Tiberium_Field","");
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Question On C++
Next Topic: "BOO" Stealth Effect
Goto Forum:
  


Current Time: Wed Dec 25 02:12:19 MST 2024

Total time taken to generate the page: 0.00730 seconds