Making a Command [message #411141] |
Tue, 17 November 2009 12:18 |
|
Distrbd21
Messages: 743 Registered: September 2008
Karma: 0
|
Colonel |
|
|
As you all know I'm going to be running a Hostage Mode Server with zunnie's Hostage Mode scripts, if you didn't now you know
Anyway i was wondering if someone could tell me how to make a script for my server so if you type !where or !rescue it gives you a pop up msg telling you where to take the hostage's, on each map.
Edit: also i would like to know how to add audio so when you join the game like in sp lock tells you to rescue the hostages.
Live Your Life Not Some one Else's.| Sharing Is Caring
Cookie Jar<glome> Who stole the cookie from the cookie jar?!
<content> glome stole the cookie from the cookie jar!
<glome> Who me?!
<content> Yes you!
<glome> Couldn't be!
<content> Then WHO?!!
<glome> Woody stole the cookie from the cookie jar!
*** glome has been kicked by DrWoody (fuck you i didn't touch the motherfucking cookie, bitch
Suicide<TB> I was depressed last night so I called the Suicide Life Line.
<TB> I reached a call center in Pakistan.
<TB> I told them I was suicidal.
<TB> They got all excited and asked if I could drive a truck
[Updated on: Tue, 17 November 2009 12:20] Report message to a moderator
|
|
|
Re: Making a Command [message #411143 is a reply to message #411141] |
Tue, 17 November 2009 12:23 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
I'm sure if you ask Zunnie he will add this for you. If you want to learn it yourself, then I suggest you look at the SSGM source code and look at the chat commands there...
If you run into trouble with the code, then please post the code and where you think you're going wrong.
|
|
|
|
Re: Making a Command [message #411163 is a reply to message #411141] |
Tue, 17 November 2009 14:09 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
class rescueChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType){
if (strcmp(The_Game()->MapName, "CnC_Mesa.mix") == 0) {
Console_Input(StrFormat("ppage %d The objective for this map is to take the hostage to blah blah blah",ID).c_str());
}
else if (strcmp(The_Game()->MapName, "CnC_Hourglass.mix") == 0) {
Console_Input(StrFormat("ppage %d The objective for this map is to take the hostage to blah blah blah",ID).c_str());
}
}
};
ChatCommandRegistrant<rescueChatCommand> rescueChatCommandReg("!rescue",CHATTYPE_TEAM,0,GAMEMODE_ALL);
|
|
|
Re: Making a Command [message #411182 is a reply to message #411163] |
Tue, 17 November 2009 17:15 |
|
Distrbd21
Messages: 743 Registered: September 2008
Karma: 0
|
Colonel |
|
|
reborn wrote on Tue, 17 November 2009 15:09 |
class rescueChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType){
if (strcmp(The_Game()->MapName, "CnC_Mesa.mix") == 0) {
Console_Input(StrFormat("ppage %d The objective for this map is to take the hostage to blah blah blah",ID).c_str());
}
else if (strcmp(The_Game()->MapName, "CnC_Hourglass.mix") == 0) {
Console_Input(StrFormat("ppage %d The objective for this map is to take the hostage to blah blah blah",ID).c_str());
}
}
};
ChatCommandRegistrant<rescueChatCommand> rescueChatCommandReg("!rescue",CHATTYPE_TEAM,0,GAMEMODE_ALL);
|
do i compile that in ssgm or scripts?
Live Your Life Not Some one Else's.| Sharing Is Caring
Cookie Jar<glome> Who stole the cookie from the cookie jar?!
<content> glome stole the cookie from the cookie jar!
<glome> Who me?!
<content> Yes you!
<glome> Couldn't be!
<content> Then WHO?!!
<glome> Woody stole the cookie from the cookie jar!
*** glome has been kicked by DrWoody (fuck you i didn't touch the motherfucking cookie, bitch
Suicide<TB> I was depressed last night so I called the Suicide Life Line.
<TB> I reached a call center in Pakistan.
<TB> I told them I was suicidal.
<TB> They got all excited and asked if I could drive a truck
|
|
|
Re: Making a Command [message #411229 is a reply to message #411141] |
Tue, 17 November 2009 23:27 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
If you have the source code to the hostage mode, then you could add it to that (assuming it is built on SSGM). However, you could also build it as a plugin, so that if zunnie ever creates an updated hostage mode, you do not have to re-add your own custom code.
|
|
|
Re: Making a Command [message #411235 is a reply to message #411229] |
Wed, 18 November 2009 01:19 |
|
Distrbd21
Messages: 743 Registered: September 2008
Karma: 0
|
Colonel |
|
|
reborn wrote on Wed, 18 November 2009 00:27 | If you have the source code to the hostage mode, then you could add it to that (assuming it is built on SSGM). However, you could also build it as a plugin, so that if zunnie ever creates an updated hostage mode, you do not have to re-add your own custom code.
|
we added it to ssgm but idk if it works yet i'm still try to get my server up and running so i can upload it to my friend to host it.
ty for the code it explains alot about it and zunnie showed me a teleport script for tanks with no one in them its nice to.. all this will work gr8 with my server.
Live Your Life Not Some one Else's.| Sharing Is Caring
Cookie Jar<glome> Who stole the cookie from the cookie jar?!
<content> glome stole the cookie from the cookie jar!
<glome> Who me?!
<content> Yes you!
<glome> Couldn't be!
<content> Then WHO?!!
<glome> Woody stole the cookie from the cookie jar!
*** glome has been kicked by DrWoody (fuck you i didn't touch the motherfucking cookie, bitch
Suicide<TB> I was depressed last night so I called the Suicide Life Line.
<TB> I reached a call center in Pakistan.
<TB> I told them I was suicidal.
<TB> They got all excited and asked if I could drive a truck
|
|
|