iran_scripts.cpp:
#include "scripts.h"
#include "engine.h"
#include "iran_scripts.h"
void Iran_Beaconing_Prevention_Zone::Entered(GameObject *obj,GameObject *enter) 
{																		 
	Commands->Start_Timer(obj,this,0.1,Commands->Get_ID(enter));
}
void Iran_Beaconing_Prevention_Zone::Timer_Expired(GameObject *obj,int number)
{
	GameObject* checkplayerobj = Commands->Find_Object(number);
	if ( IsInsideZone(obj,checkplayerobj)) 
	{
		Commands->Start_Timer(obj,this,0.5,number);		
		const char* currentweapon = Get_Current_Weapon(checkplayerobj);
		if (strcmp(currentweapon, "CnC_Weapon_NukeBeacon_Player") == 0 && Get_Current_Bullets(checkplayerobj) > 0) 
		{
			Remove_Weapon(checkplayerobj,"CnC_Weapon_NukeBeacon_Player");
			Grant_Powerup(checkplayerobj,"CnC_POW_Nuclear_Missle_Beacon");
		}
		else if (strcmp(currentweapon,"CnC_Weapon_IonCannonBeacon_Player") == 0 && Get_Current_Bullets(checkplayerobj) > 0) 
		{
			Remove_Weapon(checkplayerobj,"CnC_Weapon_IonCannonBeacon_Player");
			Grant_Powerup(checkplayerobj,"CnC_POW_IonCannonBeacon_Player");
		}	
	}
}
iran_scripts.h:
class Iran_Beaconing_Prevention_Zone : public ScriptImpClass {
	void Entered(GameObject *obj,GameObject *enter);
	void Timer_Expired(GameObject *obj,int number);
};[Updated on: Wed, 10 August 2011 14:04]
Report message to a moderator