Renegade Creativity!
Welcome to Renegadeskins! You'll need to login in order to use all the features, like downloads, and view all the sections of this site.
[Release]Beaconing prevention script zone Joinus10

Registration is free and will only take a few seconds of your time.
Features of a registered account:
-Your allowed to post and comment Skins.
-No Ads.
And much more
Renegade Creativity!
Welcome to Renegadeskins! You'll need to login in order to use all the features, like downloads, and view all the sections of this site.
[Release]Beaconing prevention script zone Joinus10

Registration is free and will only take a few seconds of your time.
Features of a registered account:
-Your allowed to post and comment Skins.
-No Ads.
And much more
Renegade Creativity!
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Renegade Creativity!

Forum Statistics: 2766 Threads | 19061 Posts | 1536 Users | Welcome to our newest member https://renegadeskins.forumieren.de/u1562
 
HomeSearchLatest imagesRegisterStaffLog in
We're attempting to expand to support more games, please post skinable games suggestions and tell your friends!

Share | 
 

 [Release]Beaconing prevention script zone

View previous topic View next topic Go down 
AuthorMessage
marcin205  
  
marcin205
   Active Member


Number of posts : 986

Age : 40

Reputation : 38

Registration date : 2008-11-11


[Release]Beaconing prevention script zone _
PostSubject: [Release]Beaconing prevention script zone   [Release]Beaconing prevention script zone EmptyMon Jun 13, 2011 2:57 am

Quote :
You need to compile a version of scripts.dll with this to be able to use it within LevelEdit, and of course the server needs to have this script.

Quote :
In the header:

class Iran_Beaconing_Prevention_Zone : public ScriptImpClass {
void Entered(GameObject *obj,GameObject *enter);
void Timer_Expired(GameObject *obj,int number);
};

In the .cpp:


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 ||
strcmp(currentweapon,"CnC_Weapon_IonCannonBeacon_Player") == 0 ) {
if (Commands->Get_Player_Type(checkplayerobj) == 0) {
Remove_Weapon(checkplayerobj,"CnC_Weapon_NukeBeacon_Player");
Grant_Powerup(checkplayerobj,"CnC_POW_Nuclear_Missle_Beacon");
}
if (Commands->Get_Player_Type(checkplayerobj) == 1) {
Remove_Weapon(checkplayerobj,"CnC_Weapon_IonCannonBeacon_Player");
Grant_Powerup(checkplayerobj,"CnC_POW_IonCannonBeacon_Player");
}
}
}
}

ScriptRegistrant Iran_Beaconing_Prevention_Zone_Registrant("Iran_Beaconing_Prevention_Zone", "");

Creator:iRANian and Renalpha


Back to top Go down
 

[Release]Beaconing prevention script zone

View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Renegade Creativity! :: Video Game Skins :: Renegade Skins :: -Other Downloads- :: ServerSide Plugins :: Sources C/C++-
Jump to: