Archived copy of war3source.com, the War3Source forum (2009–2020), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2012-09-22 (original capture). Forum · All archived topics · Wiki · Bug tracker · Blog
Chat

War3:Source
September 21, 2012, 09:08:54 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Download: http://war3source.com/index.php?board=9.0
What is War3Source?: http://war3source.com/index.php?topic=200.0
Sample Stats: http://war3source.com/war3stats
Steam Community Group: http://steamcommunity.com/groups/war3source
War3Source SVN Checkout: http://ownageclan.com/svn/war3source/
War3Source servers: http://www.game-monitor.com/search.php?vars=war3_version=
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How to remove restrict weapons on races  (Read 123 times)
Superscope
Newbie
*
Posts: 43


View Profile
« on: September 04, 2012, 06:50:38 PM »

What part of this do i change to not have a weapon restriction? because im using a deathmatch server


public OnWar3EventSpawn(client)
{
   if(War3_GetRace(client)==thisRaceID&&ValidPlayer(client,true))
   {
      War3_WeaponRestrictTo(client,thisRaceID,"weapon_knife,weapon_fiveseven");
      GivePlayerItem(client,"weapon_fiveseven");
      HPbonus(client);
   }
}
public OnRaceChanged(client,  newrace, oldrace)
{
   if(oldrace == thisRaceID)
   {
      War3_WeaponRestrictTo(client,thisRaceID,"");
   }
   if(newrace == thisRaceID)
   {
      War3_WeaponRestrictTo(client,thisRaceID,"weapon_knife,weapon_fiveseven");
      if(ValidPlayer(client,true))
      {
         GivePlayerItem(client,"weapon_fiveseven");
         HPbonus(client);
      }
   }
Logged
Necavi
Full Member
***
Posts: 217


View Profile
« Reply #1 on: September 04, 2012, 09:01:34 PM »

Just use War3_WeaponRestrictTo(client, thisRaceID, ""); as the weapon restrict string is just searched when a player attempts to pick up a weapon.
Logged

Superscope
Newbie
*
Posts: 43


View Profile
« Reply #2 on: September 04, 2012, 09:13:09 PM »

Thank you. Any idea on why i keep getting error 092 when compiling races?

Error: 092 Number of arguments does not match definition
 
Logged
Necavi
Full Member
***
Posts: 217


View Profile
« Reply #3 on: September 04, 2012, 10:39:21 PM »

Well, your arguments don't match the function's definition.
Logged

Superscope
Newbie
*
Posts: 43


View Profile
« Reply #4 on: September 05, 2012, 01:27:15 AM »

yeah...little clairification? lol
Logged
Necavi
Full Member
***
Posts: 217


View Profile
« Reply #5 on: September 05, 2012, 02:02:34 AM »

That's...kinda clear as day >>
Logged

Superscope
Newbie
*
Posts: 43


View Profile
« Reply #6 on: September 05, 2012, 02:12:54 AM »

lol k. on a completely unrelated note... now do i make it so peoples "changerace" and all that text doesnt show up to everyone when they type it?
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!