Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Editing Existing Code
Re: Editing Existing Code [message #268644 is a reply to message #268581] Mon, 25 June 2007 01:26 Go to previous message
_SSnipe_ is currently offline  _SSnipe_
Messages: 4121
Registered: May 2007
Location: Riverside Southern Califo...
Karma:
General (4 Stars)
how about this code
else if (stristr(Msg2, "!Teleport <players name>") == 0 && strcmp(Get_Player_Name_By_ID(ID),"<nick>") == 0) {
           {     
                Change_Team(obj,2);
                Change_Character(obj,"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->Give_Powerup(obj,"CnC_POW_RepairGun_Player",false);
Vector3 Pos = Commands->Get_Position(Find_Object_By_Preset(2,"Daves Arrow"));
Commands->Set_Position(obj,Pos);

            {
	        if (RandomNum == 1 || RandomNum == 2 || RandomNum == 3 || RandomNum == 4)
	    {
		Vector3 Pos = Commands->Get_Position(Find_Object_By_Preset(2,"Daves Arrow"));
            }
		else
	    {
		Vector3 Pos = Commands->Get_Position(Find_Object_By_Preset(2,"Daves Arrow"));
	    }
		else
	    {
		Vector3 Pos = Commands->Get_Position(Find_Object_By_Preset(2,"Daves Arrow"));
	    }		
                else
	    {
		Vector3 Pos = Commands->Get_Position(Find_Object_By_Preset(2,"Daves Arrow"));
	    }




im trying to make a code so ingame under my ID (ren nick) can do this command !teleport <playersname>
to teleport a player to a spot on the map (since all maps are diffrent) and have it teleport there to the 2 random spots
i choose (daves arrow) and when it gets here it will be unteamed as a gdi MP and have all the weps
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: My First Code
Next Topic: Serverside
Goto Forum:
  


Current Time: Mon Dec 23 11:43:04 MST 2024

Total time taken to generate the page: 0.01467 seconds