C++ Help Needed [message #268242] |
Fri, 22 June 2007 16:50 |
_SSnipe_
Messages: 4121 Registered: May 2007 Location: Riverside Southern Califo...
Karma: 0
|
General (4 Stars) |
|
|
1)My first question is how can we make it so a halfmod and higher could make a normal player unteamed? so like lets say its like this
!unteam <playername> then that player goes to where the unteam spawn points or at?
2)Along with that how can we choose where the unteam spawn points are at
3)To also add To That how can the unteam spawns come with all weapons
So above it will be like a halfmod will do this !unteam ren00b or somthing then that player will spawn in the unteam spawn points i choose and with all weapons please help me answer these and thank you
heres the code i got from reborn
}
else if (stricmp(Msg2,"!unteam") == 0)
{
if (stricmp(Get_Player_Name_By_ID(ID),"<nick>") == 0) {
Change_Team(obj,2);
}
now like i said above how can i change this to not by nick name but by stats and can also unteam other players?
|
|
|
|
Re: C++ Help Needed [message #268249 is a reply to message #268246] |
Fri, 22 June 2007 17:10 |
_SSnipe_
Messages: 4121 Registered: May 2007 Location: Riverside Southern Califo...
Karma: 0
|
General (4 Stars) |
|
|
Sir Kane wrote on Fri, 22 June 2007 19:09 | Default spawn point for neutral/whatever is 0.0f, 0.0f, 0.0f.
|
well what im wondering is there a place i can select just like u can choose where to put nod and gdi solider spanwers?
|
|
|
Re: C++ Help Needed [message #268251 is a reply to message #268242] |
Fri, 22 June 2007 17:14 |
|
jnz
Messages: 3396 Registered: July 2006 Location: 30th century
Karma: 0
|
General (3 Stars) |
|
|
All i can think of atm, because i don't think renegade suppports white spawners.
create an invisible object where you want the spawner, then in the object create hook. Teleport anyone whos team != 1 or 0 to the invisible object.
You could make an array of GameObject *s and select one at random to teleport to.
[Updated on: Fri, 22 June 2007 17:14] Report message to a moderator
|
|
|
Re: C++ Help Needed [message #268260 is a reply to message #268242] |
Fri, 22 June 2007 17:25 |
_SSnipe_
Messages: 4121 Registered: May 2007 Location: Riverside Southern Califo...
Karma: 0
|
General (4 Stars) |
|
|
i dont know how to do that i thought there was a a renegade spawner or commando spawner which is unteamed?
|
|
|
Re: C++ Help Needed [message #268263 is a reply to message #268242] |
Fri, 22 June 2007 17:45 |
|
Cat998
Messages: 1081 Registered: January 2004 Location: Austria, Vienna
Karma: 0
|
General (1 Star) Moderator/Captain |
|
|
joe937465 wrote on Sat, 23 June 2007 01:50 | 1)My first question is how can we make it so a halfmod and higher could make a normal player unteamed? so like lets say its like this
!unteam <playername> then that player goes to where the unteam spawn points or at?
|
You would have to open, read, and parse brenbots moderators.cfg file, if you are using Brenbot.
joe937465 wrote on Sat, 23 June 2007 01:50 | 2)Along with that how can we choose where the unteam spawn points are at
|
You can move the player to every location you want, after you have changed his team. I think it's Commands->Set_Location or something.
joe937465 wrote on Sat, 23 June 2007 01:50 | 3)To also add To That how can the unteam spawns come with all weapons
|
Look for Give_Weapon() or something.
When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter then "Yes"
Programming is like sex: one mistake and you have to support it for the rest of your life
Want the best answers? Ask the best questions!
"So long, and thanks for all the fish."
|
|
|
|
Re: C++ Help Needed [message #268269 is a reply to message #268264] |
Fri, 22 June 2007 18:52 |
_SSnipe_
Messages: 4121 Registered: May 2007 Location: Riverside Southern Califo...
Karma: 0
|
General (4 Stars) |
|
|
1)ok im confused let me just work on one thing at a time
how can i replace this string
else if (stricmp(Get_Player_Name_By_ID(ID),"<nick>") == 0) {
with one that instead of player id but the ingame stats? halfmod and up
2) and this string
else if (stricmp(Msg2,"!Teleport") == 0)
so that when i type that command and have players anem at end so it will teleport him like
else if (stricmp(Msg2,"!Teleport<playersname>") == 0)
now how can ie dit the one above to be able for a mod to use the command on a player
[Updated on: Fri, 22 June 2007 19:11] Report message to a moderator
|
|
|
Re: C++ Help Needed [message #268295 is a reply to message #268242] |
Fri, 22 June 2007 22:39 |
_SSnipe_
Messages: 4121 Registered: May 2007 Location: Riverside Southern Califo...
Karma: 0
|
General (4 Stars) |
|
|
this is what i got so far by this i should be able to teleport a player to a location with all weps
if(stristr(Msg2, "!<command>") == 0 && strcmp(Get_Player_Name_By_ID(ID), "<player name>") == 0)
{
if (stricmp(Get_Player_Name_By_ID(ID),"<nick>") == 0) {
Change_Team(obj,2);
Change_Character(obj,"c_ag_gdi_mp");
Commands->Give_Powerup(obj,"CnC_POW_AutoRifle_Player_Nod",false);
Commands->Give_Powerup(obj,"CnC_POW_AutoRifle_Player_GDI",false);
Commands->Give_Powerup(obj,"POW_Shotgun_Player",false);
Commands->Give_Powerup(obj,"POW_Flamethrower_Player",false);
Commands->Give_Powerup(obj,"POW_GrenadeLauncher_Player",false);
Commands->Give_Powerup(obj,"POW_Pistol_Player",false);
Commands->Give_Powerup(obj,"CnC_POW_MineRemote_02",false);
Commands->Give_Powerup(obj,"CnC_POW_MineTimed_Player_01",false);
Commands->Give_Powerup(obj,"POW_Chaingun_Player_Nod",false);
Commands->Give_Powerup(obj,"CnC_POW_RocketLauncher_Player",false);
Commands->Give_Powerup(obj,"POW_ChemSprayer_Player",false);
Commands->Give_Powerup(obj,"POW_LaserRifle_Player",false);
Commands->Give_Powerup(obj,"POW_LaserChaingun_Player",false);
Commands->Give_Powerup(obj,"POW_SniperRifle_Player_Nod",false);
Commands->Give_Powerup(obj,"POW_RamjetRifle_Player",false);
Commands->Give_Powerup(obj,"POW_Railgun_Player",false);
Commands->Give_Powerup(obj,"CnC_POW_VoltAutoRifle_Player_Nod",false);
Commands->Give_Powerup(obj,"POW_VoltAutoRifle_Player",false);
Commands->Give_Powerup(obj,"POW_SniperRifle_Player",false);
Commands->Give_Powerup(obj,"CnC_POW_RepairGun_Player",false);
Commands->Set_Position(obj,Move);
is it look ok beside the blank spots?
|
|
|
Re: C++ Help Needed [message #268300 is a reply to message #268295] |
Fri, 22 June 2007 23:10 |
|
Whitedragon
Messages: 832 Registered: February 2003 Location: California
Karma: 1
|
Colonel |
|
|
You're checking the player's nick twice.
joe937465 wrote on Sat, 23 June 2007 01:39 |
Change_Character(obj,"c_ag_gdi_mp");
|
That looks like a model, not a character preset. Change_Character only works with character presets.
Black-Cell.net
Network Administrator (2003 - )
DragonServ, Renegade's first IRC interface bot
Creator and lead coder (2002 - )
Dragonade, Renegade's first server side modification
Lead coder (2005 - )
|
|
|
|
Re: C++ Help Needed [message #268326 is a reply to message #268242] |
Sat, 23 June 2007 01:36 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
Just for the record guys, he did not get that code from me. He has just changed another piece of code that was designed for a mod to go into spectate mode (just incase you all thought I totally shit or something). Hehe
|
|
|
|
|
|