Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » [script]Code Release - Kamikaze Suit Crate
Re: Code Release - Kamikaze Suit Crate [message #312833 is a reply to message #302900] Tue, 22 January 2008 01:20 Go to previous messageGo to next message
wittebolx is currently offline  wittebolx
Messages: 332
Registered: May 2007
Location: the netherlands
Karma: 0
Recruit
reborn wrote on Thu, 13 December 2007 19:04

Yeah, sorry math Sad


Anyway, madrocks...


class sbhChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		GameObject *obj = Get_GameObj(ID);
float Credits = Commands->Get_Money(obj);
int Team = Get_Object_Type(obj);
GameObject *hon = Find_Soldier_Factory(0);
Vector3 position;
position = Commands->Get_Position(obj);
if(hon){
if(Credits >= 2000 && (Team == 0) ){
	Commands->Give_Money(obj,-2000,false);
Change_Character(obj,"CnC_Nod_FlameThrower_2SF");
Commands->Set_Position(obj,position);
	}
else{
Console_Input(StrFormat("ppage %d You have not been charged for this purchase because you did not meet requirements.",Get_Player_ID(obj)).c_str());		
}
}
	}
};
ChatCommandRegistrant<sbhChatCommand> sbhChatCommandReg("!sbh",CHATTYPE_TEAM,0,GAMEMODE_AOW);



I havn't looked at your code yet hex, looking foward to it Smile


you can still use this command when hand of nod is dead.
would this work?

GameObject *hon = Find_Soldier_Factory(0);
Vector3 position;
position = Commands->Get_Position(obj);
if Is_Building_Dead(GameObject *hon);


Re: Code Release - Kamikaze Suit Crate [message #312894 is a reply to message #302788] Tue, 22 January 2008 14:45 Go to previous messageGo to next message
Genesis2001
Messages: 1397
Registered: August 2006
Karma: 0
General (1 Star)
lolbump



~Zack
Re: Code Release - Kamikaze Suit Crate [message #312930 is a reply to message #302788] Tue, 22 January 2008 16:02 Go to previous messageGo to next message
Hex is currently offline  Hex
Messages: 858
Registered: March 2004
Karma: 0
Colonel
Using Change_Character you can yes

goztow wrote on Tue, 11 May 2010 08:00

If we had to ban all who ever cheated or ever created a cheat (obj3cts and such) then I don't think there would be many members left here (sad fact).


reborn wrote on Fri, 29 January 2010 23:37

std is for pro's. Razz
Re: Code Release - Kamikaze Suit Crate [message #312962 is a reply to message #302788] Tue, 22 January 2008 17:36 Go to previous messageGo to next message
Darknes2 is currently offline  Darknes2
Messages: 91
Registered: July 2007
Location: Alaberma
Karma: 0
Recruit
i just wanted to tell you guys *and this is pointless in saying that i too dislike chat hook although i probly dont dislike it AS much as everyone else but i use key hooks to let players buy vehicles and all. *i will post my code that stealths ur bound vehicle for 500 when its done!


[Updated on: Tue, 22 January 2008 17:56]

Report message to a moderator

Re: Code Release - Kamikaze Suit Crate [message #312966 is a reply to message #312962] Tue, 22 January 2008 17:59 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
wittebolx wrote on Tue, 22 January 2008 03:20

reborn wrote on Thu, 13 December 2007 19:04

Yeah, sorry math Sad


Anyway, madrocks...


class sbhChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		GameObject *obj = Get_GameObj(ID);
float Credits = Commands->Get_Money(obj);
int Team = Get_Object_Type(obj);
GameObject *hon = Find_Soldier_Factory(0);
Vector3 position;
position = Commands->Get_Position(obj);
if(hon){
if(Credits >= 2000 && (Team == 0) ){
	Commands->Give_Money(obj,-2000,false);
Change_Character(obj,"CnC_Nod_FlameThrower_2SF");
Commands->Set_Position(obj,position);
	}
else{
Console_Input(StrFormat("ppage %d You have not been charged for this purchase because you did not meet requirements.",Get_Player_ID(obj)).c_str());		
}
}
	}
};
ChatCommandRegistrant<sbhChatCommand> sbhChatCommandReg("!sbh",CHATTYPE_TEAM,0,GAMEMODE_AOW);



I havn't looked at your code yet hex, looking foward to it Smile


you can still use this command when hand of nod is dead.
would this work?

GameObject *hon = Find_Soldier_Factory(0);
Vector3 position;
position = Commands->Get_Position(obj);
if Is_Building_Dead(GameObject *hon);



I didn't actually test it, I thought that would work. Interesting...
I guess what you posted would work, but I havn't tried.

Darknes2 wrote on Tue, 22 January 2008 19:36

i just wanted to tell you guys *and this is pointless in saying that i too dislike chat hook although i probly dont dislike it AS much as everyone else but i use key hooks to let players buy vehicles and all. *i will post my code that stealths ur bound vehicle for 500 when its done!



The code you posted but removed was a little off, here it is re-written to actually work:

class svChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {

		GameObject *obj = Get_GameObj(ID);
		GameObject *veh = Find_My_Veh(obj);
			if (Commands->Get_Money(obj) <= 500){
			Console_Input(StrFormat("page %s you need at least 500$ to buy this",Get_Player_Name(obj)).c_str());
			}
			else{
	Commands->Give_Money(obj, -500, 1);
	Commands->Enable_Stealth(veh, 1);
	}
	}
};
ChatCommandRegistrant<svChatCommand> svChatCommandReg("!sv",CHATTYPE_PUBLIC,0,GAMEMODE_ALL);


However, it's still not very good because what if the dude doesn't have a vehichle?
You should do something like
"if(veh){//do the f0sh0zzle}
else{//msg to say you don't have a vehichle dumbass}"



Re: Code Release - Kamikaze Suit Crate [message #312988 is a reply to message #312966] Tue, 22 January 2008 19:33 Go to previous messageGo to next message
HORQWER is currently offline  HORQWER
Messages: 667
Registered: September 2006
Location: Under my bed (lolz)
Karma: 0
Colonel
i dont get it
how do i make those codes work on renegade?


http://www.roleplay2.com/downloads/siggy.jpg
Re: Code Release - Kamikaze Suit Crate [message #312989 is a reply to message #312988] Tue, 22 January 2008 19:39 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
ferkhat wrote on Tue, 22 January 2008 21:33

i dont get it
how do i make those codes work on renegade?


As a client on his server you would type !sv, as a server owner, you would paste it into gmmain.cpp from ssgm and compile it to produce a scripts.dll file. This file would then be placed on your server.
You would need visualstudio.net2005 to do this.



Re: Code Release - Kamikaze Suit Crate [message #313154 is a reply to message #312989] Wed, 23 January 2008 12:50 Go to previous messageGo to next message
HORQWER is currently offline  HORQWER
Messages: 667
Registered: September 2006
Location: Under my bed (lolz)
Karma: 0
Colonel
i will definatly try this

http://www.roleplay2.com/downloads/siggy.jpg
Re: Code Release - Kamikaze Suit Crate [message #321551 is a reply to message #302788] Mon, 10 March 2008 16:19 Go to previous messageGo to next message
Darknes2 is currently offline  Darknes2
Messages: 91
Registered: July 2007
Location: Alaberma
Karma: 0
Recruit
im sorry guys i completely got caught up in other things and forgot bout this so here it is all finished Smile enjoy!

class svChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {


		GameObject *obj = Get_GameObj(ID);
		GameObject *veh = Find_My_Veh(obj);
		Send_Message_Player(obj,255,255,255,"Transmitting...");
	    Console_Input(StrFormat("sndp %d 00-n026e.wav",ID).c_str());

		GameObject *MyVeh = Find_My_Veh(obj);
	if (!MyVeh)
	{
		Console_Input(StrFormat("page %s you have no bound vehicle! press the insert key to lock ur vehicle to youe THEN use this!",Get_Player_Name(obj)).c_str());
	}
	    int cost = 500;
		if (Commands->Get_Money(obj) < cost)
		{
			Console_Input(StrFormat("page %s you need at least $d $ to buy this",Get_Player_Name(obj), cost).c_str());
		}
		else
		{
			Commands->Send_Custom_Event(obj,Find_My_Veh(obj),1113,0,0);
			int ID = Get_Player_ID(obj);
	        GameObject *obj = Get_GameObj(ID);
			Commands->Enable_Stealth(veh, 1);
			//GameObject *MyVeh = Find_My_Veh(obj);
			Commands->Give_Money(obj, -500, 1);
			Commands->Send_Custom_Event(obj,MyVeh,1111,0,0);
			Commands->Send_Custom_Event(obj,Find_My_Veh(obj),1112,0,0);
		}
	}
};
ChatCommandRegistrant<svChatCommand> svChatCommandReg("!sv",CHATTYPE_ALL,0,GAMEMODE_ALL);




[Updated on: Mon, 10 March 2008 16:21]

Report message to a moderator

Re: Code Release - Kamikaze Suit Crate [message #321626 is a reply to message #302788] Tue, 11 March 2008 03:48 Go to previous messageGo to next message
cpjok is currently offline  cpjok
Messages: 425
Registered: September 2007
Karma: 0
Commander
ok i did what it said but i dont know where this code gose and it has 2 ERRORS

Quote:

void zbl_Kamikaze_Suit_Crate::Created(GameObject *obj)
{
Attach_Script_Once(obj, "JFW_Blow_Up_On_Death", "Explosion_IonCannonBeacon");
float rand = Commands->Get_Random(29,301);
Team = Get_Object_Type(obj);
Commands->Start_Timer(obj, this, rand,0);
}
void zbl_Kamikaze_Suit_Crate::Timer_Expired(GameObject *obj, int number)
{
if (number == 0)
{
float rand = Commands->Get_Random(0,100);
if (rand >= 50.0f)
{
// nothing happens
}
else {
Commands->Apply_Damage(obj, 9999.0f, "BlamoKiller", 0);
Console_Input(StrFormat("msg Crate: Oh no! I guess that experimental kamikaze suit didn't work too well. I hope that %ls guy didn't get hurt. :(", Get_Wide_Team_Name(PTTEAM(Team))).c_str());
}
}
}

ScriptRegistrant<zbl_Kamikaze_Suit_Crate> zbl_Kamikaze_Suit_Crate_Registrant("zbl_Kamikaze_Suit_Crate", "");




ERROR 1 says duplicate

index.php?t=getfile&id=6168&private=0

ERROR 2 says settings on crate are 91 evan tho there 100

index.php?t=getfile&id=6169&private=0
  • Attachment: 1.JPG
    (Size: 180.29KB, Downloaded 312 times)
  • Attachment: 2.JPG
    (Size: 237.82KB, Downloaded 312 times)
Re: Code Release - Kamikaze Suit Crate [message #321917 is a reply to message #302788] Wed, 12 March 2008 18:29 Go to previous messageGo to next message
Craziac is currently offline  Craziac
Messages: 157
Registered: September 2007
Karma: 0
Recruit
Maybe you shouldn't put the C++ script in ssgm.ini...

http://demonshall.net/Stewie/images/OblivStewieSig.jpg
Re: Code Release - Kamikaze Suit Crate [message #321938 is a reply to message #302788] Wed, 12 March 2008 21:29 Go to previous messageGo to next message
Ethenal is currently offline  Ethenal
Messages: 2532
Registered: January 2007
Location: US of A
Karma: 0
General (2 Stars)

LOL

-TLS-DJ-EYE-K wrote on Mon, 18 March 2013 07:29

Instead of showing us that u aren't more inteligent than a Toast, maybe you should start becomming good in renegade Thumbs Up

Re: Code Release - Kamikaze Suit Crate [message #321989 is a reply to message #302788] Thu, 13 March 2008 09:20 Go to previous messageGo to next message
cpjok is currently offline  cpjok
Messages: 425
Registered: September 2007
Karma: 0
Commander
k so were do i put it then
Re: Code Release - Kamikaze Suit Crate [message #322094 is a reply to message #302788] Thu, 13 March 2008 19:02 Go to previous messageGo to next message
Craziac is currently offline  Craziac
Messages: 157
Registered: September 2007
Karma: 0
Recruit
I thought I just read a post of yours that told people where to get VC++... Do you have that and still not know how to edit scripts.dll?

http://demonshall.net/Stewie/images/OblivStewieSig.jpg
Re: Code Release - Kamikaze Suit Crate [message #322151 is a reply to message #322094] Fri, 14 March 2008 05:21 Go to previous messageGo to next message
cpjok is currently offline  cpjok
Messages: 425
Registered: September 2007
Karma: 0
Commander
Ye And Itsounds About Right
Re: Code Release - Kamikaze Suit Crate [message #322256 is a reply to message #302788] Fri, 14 March 2008 16:35 Go to previous messageGo to next message
Craziac is currently offline  Craziac
Messages: 157
Registered: September 2007
Karma: 0
Recruit
So you've never added any code to scripts.dll? Because if you did, that's what you need to do here...

http://demonshall.net/Stewie/images/OblivStewieSig.jpg
Re: Code Release - Kamikaze Suit Crate [message #322317 is a reply to message #322256] Sat, 15 March 2008 03:31 Go to previous messageGo to next message
cpjok is currently offline  cpjok
Messages: 425
Registered: September 2007
Karma: 0
Commander
yes i added itall the scripts followed what it said on first post put the other code it said now your done with that add this code into ssgm and it didnt say were or anything
Re: Code Release - Kamikaze Suit Crate [message #322319 is a reply to message #302788] Sat, 15 March 2008 04:06 Go to previous message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
He meant the source code to SSGM, which would then be compiled to make scripts.dll.
He did not mean ssgm.ini.



[Updated on: Sat, 15 March 2008 04:06]

Report message to a moderator

Previous Topic: Editing Reborn
Next Topic: How to add an OBGun in SSGM
Goto Forum:
  


Current Time: Fri Dec 20 11:02:57 MST 2024

Total time taken to generate the page: 0.01104 seconds