Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » C++ Help Needed
C++ Help Needed [message #268242] Fri, 22 June 2007 16:50 Go to next message
_SSnipe_ is currently offline  _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 #268246 is a reply to message #268242] Fri, 22 June 2007 17:09 Go to previous messageGo to next message
Sir Kane
Messages: 1701
Registered: March 2003
Location: Angerville
Karma: 0
General (1 Star)
Default spawn point for neutral/whatever is 0.0f, 0.0f, 0.0f.

Proud N9500 and proud N6270 user. Creator of the IEE libraries (original bhs.dll) and the RB series software.
http://n00bstories.com/image.fetch.php?id=1189992501http://www.n00bstories.com/image.fetch.php?id=1257492907
Re: C++ Help Needed [message #268249 is a reply to message #268246] Fri, 22 June 2007 17:10 Go to previous messageGo to next message
_SSnipe_ is currently offline  _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 Go to previous messageGo to next message
jnz is currently offline  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 Go to previous messageGo to next message
_SSnipe_ is currently offline  _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 Go to previous messageGo to next message
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 #268264 is a reply to message #268263] Fri, 22 June 2007 17:54 Go to previous messageGo to next message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma: 0
General (3 Stars)
Cat998 wrote on Sat, 23 June 2007 01:45


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.


Commands->Set_Position

Cat998 wrote on Sat, 23 June 2007 01:45


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.


Grant_Powerup
Re: C++ Help Needed [message #268269 is a reply to message #268264] Fri, 22 June 2007 18:52 Go to previous messageGo to next message
_SSnipe_ is currently offline  _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 Go to previous messageGo to next message
_SSnipe_ is currently offline  _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 Go to previous messageGo to next message
Whitedragon is currently offline  Whitedragon
Messages: 831
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 #268302 is a reply to message #268242] Fri, 22 June 2007 23:44 Go to previous messageGo to next message
_SSnipe_ is currently offline  _SSnipe_
Messages: 4121
Registered: May 2007
Location: Riverside Southern Califo...
Karma: 0
General (4 Stars)
ooo ok ty let me fix that
Re: C++ Help Needed [message #268326 is a reply to message #268242] Sat, 23 June 2007 01:36 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)
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


Re: C++ Help Needed [message #268327 is a reply to message #268242] Sat, 23 June 2007 01:38 Go to previous messageGo to next message
_SSnipe_ is currently offline  _SSnipe_
Messages: 4121
Registered: May 2007
Location: Riverside Southern Califo...
Karma: 0
General (4 Stars)
lol well reborn if i said it was mine idk what u would have said >.<
Re: C++ Help Needed [message #268333 is a reply to message #268242] Sat, 23 June 2007 02:13 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)
No no, i'm worried about being made to look an idiot, not worried about credit/ego and such... well not for like 3 lines of code anyway, lol.

The way you described your question, then said heres what reborn sent me, made me look stupid. That code i sent was for something totally different, and as such people must of thought "wow, reborns really dumb", lol.. Something I tried to avoid if I can. Razz



Re: C++ Help Needed [message #268339 is a reply to message #268242] Sat, 23 June 2007 02:39 Go to previous message
_SSnipe_ is currently offline  _SSnipe_
Messages: 4121
Registered: May 2007
Location: Riverside Southern Califo...
Karma: 0
General (4 Stars)
lol trust me ur notdumb lol
Previous Topic: Mutants
Next Topic: how do i do this
Goto Forum:
  


Current Time: Wed May 29 01:42:38 MST 2024

Total time taken to generate the page: 0.00886 seconds