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

War3:Source
October 24, 2012, 03:22:27 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: Ultimate restriction Team  (Read 269 times)
Chuck
Jr. Member
**
Posts: 98


View Profile Email
« on: March 17, 2012, 04:44:55 PM »

Hello, I'm trying to get zombie on war3 mod but it require a lot of revision each races to make sure it fair for each team! Wondering what is best way to code it to make it Ct allow to use ultimate while zombie(T team) get message that it not allow to use the ultimate... Here is the code
Code:
public OnUltimateCommand(client,race,bool:pressed)
{
if(pressed)
{
if(race==thisRaceID && pressed && IsPlayerAlive(client))
{

new skill=War3_GetSkillLevel(client,race,ULT_LIGHTNING);
if(skill>0)
{
if(GetClientTeam(client)==3)
{
if(War3_SkillNotInCooldown(client,thisRaceID,ULT_LIGHTNING,true)&&!Silenced(client))
{

for(new x=1;x<=MaxClients;x++)
bBeenHit[client][x]=false;

new Float:distance=ChainDistance[skill];

DoChain(client,distance,60,true,0); // This function should also handle if there aren't targets
}
}
if(GetClientTeam(client)==2)
{
PrintHintText(client,"Could Not Chain Light at Zombie Team");
}

}
else
{
W3MsgUltNotLeveled(client);
}
}
}
}
« Last Edit: March 17, 2012, 05:00:44 PM by Chuck » Logged
Necavi
Full Member
***
Posts: 223


View Profile
« Reply #1 on: March 17, 2012, 06:05:05 PM »

I mostly just fixed up the message and added a few tabs, but this should work just fine.
Code:
public OnUltimateCommand(client,race,bool:pressed)
{
if(pressed)
{
if(race==thisRaceID && pressed && IsPlayerAlive(client))
{
new skill=War3_GetSkillLevel(client,race,ULT_LIGHTNING);
if(skill>0)
{
if(GetClientTeam(client)==3)
{
if(War3_SkillNotInCooldown(client,thisRaceID,ULT_LIGHTNING,true)&&!Silenced(client))
{

for(new x=1;x<=MaxClients;x++)
bBeenHit[client][x]=false;

new Float:distance=ChainDistance[skill];

DoChain(client,distance,60,true,0); // This function should also handle if there aren't targets
}
}
if(GetClientTeam(client)==2)
{
PrintHintText(client,"Cannot use Chain Lightning as a Zombie");
}

}
else
{
W3MsgUltNotLeveled(client);
}
}
}
}
Logged

Chuck
Jr. Member
**
Posts: 98


View Profile Email
« Reply #2 on: March 17, 2012, 06:42:26 PM »

Heh! Have you tested newest war3 version? It got worst. Few week ago I updated everything and my server get lag and freeze every other seconds! even when i tested only undead or orcish race with 15 players and chokes(net_graph 3) goes to 50 or more! I talked to other owner and they said they have same problem!.... bug war3 system
Logged
Necavi
Full Member
***
Posts: 223


View Profile
« Reply #3 on: March 17, 2012, 06:59:49 PM »

Well, report any errors or any activities which seem to increase it and it can be addressed.
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!