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","");