Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Timer page Player
Timer page Player [message #340563] Sun, 13 July 2008 01:08 Go to previous message
mrãçķz is currently offline  mrãçķz
Messages: 3069
Registered: August 2007
Karma:
General (3 Stars)
Permabanned for trying and failing DDoS
OK whats wrong with this code? it just pages me with "Harvesting..." but the Timer part doesnt do anything.
So how do i fix that ? (yep its for a ServerSide Script)




Code:
void A_Tiberium_Field::Entered(GameObject *obj,GameObject *enter)
{
int x;
   x = Commands->Get_Player_Type(enter);
   Vector3 spawn_position;
   if (CheckPlayerType(enter,x))
   {
      return;
   }
   char message[1000];
   if (Commands->Get_Player_Type(enter) == 1)
   {
      sprintf(message,"ppage %d Harvesting...",Get_Player_ID(enter));
      Console_Input(message);
          Commands->Start_Timer(obj,this,1.0f,1); 
     Commands->Start_Timer(obj,this,2.0f,2); 
     Commands->Start_Timer(obj,this,3.0f,3);
     Commands->Start_Timer(obj,this,4.0f,4);
     Commands->Start_Timer(obj,this,5.0f,5);
     Commands->Start_Timer(obj,this,6.0f,6);
     Commands->Start_Timer(obj,this,7.0f,7);
     Commands->Start_Timer(obj,this,8.0f,8);
     Commands->Start_Timer(obj,this,9.0f,9);
     Commands->Start_Timer(obj,this,10.0f,10);
     Commands->Start_Timer(obj,this,11.0f,11);
}
}


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

      char message[1000];
   if(number == 1){
      sprintf(message,"ppage %d Harvesting Complete in: 10.",Get_Player_ID(obj));
      Console_Input(message);
   }
      if(number == 2){
      sprintf(message,"ppage %d Harvesting Complete in: 9.",Get_Player_ID(obj));
      Console_Input(message);
         }
      if(number == 3){
      sprintf(message,"ppage %d Harvesting Complete in: 8.",Get_Player_ID(obj));
      Console_Input(message);
               }
      if(number == 4){
            sprintf(message,"ppage %d Harvesting Complete in: 7.",Get_Player_ID(obj));
      Console_Input(message);
               }
      if(number == 5){
            sprintf(message,"ppage %d Harvesting Complete in: 6.",Get_Player_ID(obj));
      Console_Input(message);
               }
      if(number == 6){
            sprintf(message,"ppage %d Harvesting Complete in: 5.",Get_Player_ID(obj));
      Console_Input(message);
               }
      if(number == 7){
            sprintf(message,"ppage %d Harvesting Complete in: 4.",Get_Player_ID(obj));
      Console_Input(message);
               }
      if(number == 8){
            sprintf(message,"ppage %d Harvesting Complete in: 3.",Get_Player_ID(obj));
      Console_Input(message);
               }
      if(number == 9){
            sprintf(message,"ppage %d Harvesting Complete in: 2.",Get_Player_ID(obj));
      Console_Input(message);
               }
      if(number == 10){
            sprintf(message,"ppage %d Harvesting Complete in: 1.",Get_Player_ID(obj));
      Console_Input(message);
                     }
      if(number == 11){
            sprintf(message,"ppage %d Harvesting Completed. Return to the Refinery.",Get_Player_ID(obj));
      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:25 MST 2024

Total time taken to generate the page: 0.00685 seconds