Home » Renegade Discussions » Mod Forum » [script]Code Release - Kamikaze Suit Crate
Re: Code Release - Kamikaze Suit Crate [message #312966 is a reply to message #312962] |
Tue, 22 January 2008 17:59 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to previous message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/custom_avatars/3415.gif) |
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma:
|
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](images/smiley_icons/icon_sad.gif)
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](images/smiley_icons/icon_smile.gif)
|
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}"
|
|
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
[script]Code Release - Kamikaze Suit Crate
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: reborn on Wed, 12 December 2007 19:53
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: Hex on Thu, 13 December 2007 05:20
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: reborn on Thu, 13 December 2007 09:20
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: reborn on Thu, 13 December 2007 09:24
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: Hex on Thu, 13 December 2007 09:29
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: Hex on Thu, 13 December 2007 09:43
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: cnc95fan on Thu, 13 December 2007 09:50
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: Hex on Thu, 13 December 2007 10:20
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: Hex on Thu, 13 December 2007 10:53
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: Hex on Thu, 13 December 2007 11:03
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: reborn on Thu, 13 December 2007 11:04
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: Hex on Tue, 22 January 2008 16:02
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: Darknes2 on Tue, 22 January 2008 17:36
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: reborn on Tue, 22 January 2008 17:59
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: HORQWER on Tue, 22 January 2008 19:33
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: reborn on Tue, 22 January 2008 19:39
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: HORQWER on Wed, 23 January 2008 12:50
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: Darknes2 on Mon, 10 March 2008 16:19
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: cpjok on Tue, 11 March 2008 03:48
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: Craziac on Wed, 12 March 2008 18:29
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: Ethenal on Wed, 12 March 2008 21:29
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: cpjok on Thu, 13 March 2008 09:20
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: Craziac on Thu, 13 March 2008 19:02
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: cpjok on Fri, 14 March 2008 05:21
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: Craziac on Fri, 14 March 2008 16:35
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: cpjok on Sat, 15 March 2008 03:31
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: Code Release - Kamikaze Suit Crate
By: reborn on Sat, 15 March 2008 04:06
|
Goto Forum:
Current Time: Fri Aug 16 11:59:39 MST 2024
Total time taken to generate the page: 0.01111 seconds
|