You are viewing our Forum Archives. To view or take place in current topics click here.

Was this worthy?

Yes, thank you
100.00% (1 vote)
No, I could do this myself
0.00% (0 votes)

Total Votes: 1

[A How To]Add Give All For all Players
Posted:

[A How To]Add Give All For all PlayersPosted:

XKLUTCHIN_OUTX
  • Resident Elite
Status: Offline
Joined: Feb 10, 201113Year Member
Posts: 282
Reputation Power: 13
Status: Offline
Joined: Feb 10, 201113Year Member
Posts: 282
Reputation Power: 13
Ok well first off, most of you guys are probably using Pheonix v2 leaked version. Well i'll show you how to add give all guns to players so first off, open .FF viewer and locate Debug.gsc. Now search for PlayerOpts().
2. Now lets make another selection for an input.

PlayerOpts()
{
   menu = spawnstruct();
   menu.opts = [];
   menu.funcs = [];
   menu.input = [];


   name = get_players()[self.input].playername;
   menu.opts[menu.opts.size] = "Summon "+name;
   menu.opts[menu.opts.size] = "Teleport to "+name;
   menu.opts[menu.opts.size] = "Jail/Free "+name;
   menu.opts[menu.opts.size] = "Launch "+name;
   menu.opts[menu.opts.size] = "Set "+name+"'s Prestige";
   menu.opts[menu.opts.size] = "Give All to"+name;// Add this


   menu.funcs[menu.funcs.size] = ::Summon;
   menu.funcs[menu.funcs.size] = ::Teleport2;
   menu.funcs[menu.funcs.size] = ::Jail;
   menu.funcs[menu.funcs.size] = ::Space;
   menu.funcs[menu.funcs.size] = ::PrestHim;
   menu.funcs[menu.funcs.size] = ::give_all_weaps;// Add this


   menu.input[menu.input.size] = self.input;
   menu.input[menu.input.size] = self.input;
   menu.input[menu.input.size] = self.input;
   menu.input[menu.input.size] = self.input;
   menu.input[menu.input.size] = self.input;
   menu.input[menu.input.size] = self.input;//Add this


   menu.opts[menu.opts.size] = "[Players Menu]";
   menu.funcs[menu.funcs.size] = ::NewMenu;
   menu.input[menu.input.size] = ::PlayersMenu;
   return menu;
}

Now for the actual script(Just put this anywhere else in the .gsc

give_all_weaps( playernum )
{
   k = playernum;
   player = get_players();

   if( player[k].allweaps == 0 )
   {
      player[k].allweaps = 1;
      player[k] TakeAllWeapons();
      player[k] giveWeapon("tesla_gun_upgraded");
      player[k] giveWeapon("tesla_gun");
      player[k] giveWeapon("ray_gun_upgraded");
      player[k] giveWeapon("m2_flamethrower_zombie_upgraded");
      player[k] giveWeapon("panzerschrek_zombie_upgraded");
      player[k] giveWeapon("bar_bipod");
      player[k] giveWeapon("type99_lmg_bipod");
      player[k] giveWeapon("m1garand_gl_zombie_upgraded");
      player[k] giveWeapon("zombie_mg42_upgraded");
      player[k] giveWeapon("zombie_fg42_upgraded");
      player[k] giveWeapon("kar98k_scoped_zombie");
      player[k] giveWeapon("zombie_bar_upgraded");
      player[k] giveWeapon("zombie_30cal_upgraded");
      player[k] giveWeapon("zombie_shotgun_upgraded");
      player[k] giveWeapon("zombie_doublebarrel_sawed_upgraded");
      player[k] giveWeapon("zombie_doublebarrel_upgraded");
      player[k] giveWeapon("zombie_type100_smg_upgraded");
      player[k] giveWeapon("zombie_thompson_upgraded");
      player[k] giveWeapon("zombie_ppsh_upgraded");
      player[k] giveWeapon("zombie_mp40_upgraded");
      player[k] giveWeapon("doublebarrel_sawed_grip");
      player[k] giveWeapon("zombie_stg44_upgraded");
      player[k] giveWeapon("ptrs41_zombie_upgraded");
      player[k] giveWeapon("springfield_scoped_zombie");
      player[k] giveWeapon("zombie_m1garand_upgraded");
      player[k] giveWeapon("zombie_gewehr43_upgraded");
      player[k] giveWeapon("zombie_kar98k_upgraded");
      player[k] giveWeapon("zombie_colt_upgraded");
      player[k] giveWeapon("zombie_sw_357_upgraded");
      player[k] giveWeapon("mg42_bipod");
      player[k] giveWeapon("zombie_melee");
      player[k] giveWeapon("walther");
      player[k] giveWeapon("m2_flamethrower_zombie");
      player[k] giveWeapon("panzerschrek");
      player[k] giveWeapon("fg42_bipod");
      player[k] giveWeapon("m1garand_gl");
      player[k] giveWeapon("shotgun");
      player[k] giveWeapon("doublebarrel_sawed_grip");
      player[k] giveWeapon("thompson");
      player[k] giveWeapon("stg44");
      player[k] giveWeapon("30cal_bipod");
      player[k] giveWeapon("defaultweapon");
      player[k] giveWeapon("ptrs41_zombie");
      player[k] giveWeapon("m1carbine");
      player[k] giveWeapon("sw_357");
      player[k] giveWeapon("kar98k_scoped_zombie");
      player[k] giveWeapon("colt_dirty_harry");
      player[k] giveWeapon("doublebarrel");
      player[k] giveWeapon("mp40");
      player[k] giveWeapon("ray_gun");
      player[k] SwitchToWeapon( "sw_357" );
      if(getdvar("mapname") != "nazi_zombie_factory")
      {
         player[k] giveWeapon("molotov");
      }
      player[k] giveWeapon( "stielhandgranate" );
      player[k] iPrintlnBold( "You Have Been Given ^2All Weapons" );
      if( k != 0 )
      {
         self iPrintlnBold( "^2"+player[k].playername+" Has All Weapons" );
      }
   }
   else
   {
      player[k] TakeAllWeapons();
      player[k] GiveWeapon( "zombie_melee", 0 ); 
      player[k] SwitchToWeapon( "zombie_melee" );
      player[k] iPrintlnBold( "Your Weapons Have Been ^1Taken" );
      if( k != 0 )
      {
         self iPrintlnBold( "^1"+player[k].playername+" ^7Has No Weapons" );
      }
      player[k].allweaps = 0;
   }   
}




If this helped you please thank the topic and +rep, and if you want, i'll give other tutorials like "give cod jump" and Working Give Admin.


Here's my edit, and this was made from the leaked beta version.


Last edited by XKLUTCHIN_OUTX ; edited 1 time in total
#2. Posted:
Dev360z
  • Resident Elite
Status: Offline
Joined: Jan 21, 201113Year Member
Posts: 239
Reputation Power: 12
Status: Offline
Joined: Jan 21, 201113Year Member
Posts: 239
Reputation Power: 12
nice but the code is longger than needed dude
#3. Posted:
coolbunny1234
  • TTG Commander
Status: Offline
Joined: Aug 09, 200915Year Member
Posts: 6,493
Reputation Power: 8063
Motto: The Original Bunny
Motto: The Original Bunny
Status: Offline
Joined: Aug 09, 200915Year Member
Posts: 6,493
Reputation Power: 8063
Motto: The Original Bunny
Something quick i whipped up, should work and is much shorter. This needs to be on player spawn. Any where else it won't work.


GiveAll()
{
   self endon( "death" );
   self endon( "disconnect" );
   self GiveWeapon( "defaultweapon", 0 );
        self GiveWeapon( "zombie_melee", 0 );
   keys = GetArrayKeys( level.zombie_weapons );
   for( i = 0; i < keys.size; i++ )
   {
      self GiveWeapon( keys[i], 0 );
      wait 0.02;
   }
}
#4. Posted:
XME
  • TTG Addict
Status: Offline
Joined: Mar 24, 201113Year Member
Posts: 2,229
Reputation Power: 105
Status: Offline
Joined: Mar 24, 201113Year Member
Posts: 2,229
Reputation Power: 105
Thanks for the helpful topic !
20202020
#5. Posted:
XKLUTCHIN_OUTX
  • Resident Elite
Status: Offline
Joined: Feb 10, 201113Year Member
Posts: 282
Reputation Power: 13
Status: Offline
Joined: Feb 10, 201113Year Member
Posts: 282
Reputation Power: 13
coolbunny1234 wrote Something quick i whipped up, should work and is much shorter. This needs to be on player spawn. Any where else it won't work.


GiveAll()
{
   self endon( "death" );
   self endon( "disconnect" );
   self GiveWeapon( "defaultweapon", 0 );
        self GiveWeapon( "zombie_melee", 0 );
   keys = GetArrayKeys( level.zombie_weapons );
   for( i = 0; i < keys.size; i++ )
   {
      self GiveWeapon( keys[i], 0 );
      wait 0.02;
   }
}

Isn't that Andrew74's code, cause I saw that too. And, I like the fact that I can give it to them what I want. Also, I don't want them have every gun like walther so they don't get Codjump.
#6. Posted:
InFiNiTy_Mods_7s
  • Rising Star
Status: Offline
Joined: Dec 12, 201013Year Member
Posts: 788
Reputation Power: 37
Status: Offline
Joined: Dec 12, 201013Year Member
Posts: 788
Reputation Power: 37
good lil topic m8 but the fixed version is what you want to advertise you do not want to support leeches!

LOL good work plus rep
#7. Posted:
XKLUTCHIN_OUTX
  • Resident Elite
Status: Offline
Joined: Feb 10, 201113Year Member
Posts: 282
Reputation Power: 13
Status: Offline
Joined: Feb 10, 201113Year Member
Posts: 282
Reputation Power: 13
TTG_EcLiPsE wrote good lil topic m8 but the fixed version is what you want to advertise you do not want to support leeches!

LOL good work plus rep

My fixed version or "the" fixed version, if so i'll put my video up.
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.