How would I do this? -
_Vortex - 23.09.2009
Ok. So I'm making a World War 3 server and I need some help. Basicaly, theres going to be the regular part of the army, and then air support for each team
When a player is requesting a team, they will have the choice of..
US: Armed Forces
US: Air Support
Iraq: Armed Forces
Iraq: Air Support
China: Armed Forces
China: Air Support
But, the problem is, I want to make it so a armed forces cant teamkill an air support, vice versa, for each team. Because if I do AddPlayerClass(skin,coords,etc) for USA and Airsupport, that will not make it so they cant teamkill eachother.
Please help
Re: How would I do this? -
Backwardsman97 - 23.09.2009
You could use the default SetPlayerTeam functions which I think have built in anti-team-kill.
Re: How would I do this? -
Calgon - 23.09.2009
Quote:
Originally Posted by Backwardsman97
You could use the default SetPlayerTeam functions which I think have built in anti-team-kill.
|
They can apparently bug out though. You could make it so if they're in a radius of a near-by team player they're frozen so they can't shoot if they have a gun out? Or set their armed weapon to 0 (Fists)
Re: How would I do this? -
Abernethy - 23.09.2009
Use gTeam, & OnPlayerSpawn check if their gTeam is equal to their team, & set it there.
pawn Код:
if (gTeam[playerid] == TEAM_A)
{
SetPlayerTeam(playerid, TEAM_A);
}
Re: How would I do this? -
_Vortex - 23.09.2009
Quote:
Originally Posted by Abernethy♥
Use gTeam, & OnPlayerSpawn check if their gTeam is equal to their team, & set it there.
pawn Код:
if (gTeam[playerid] == TEAM_A) { SetPlayerTeam(playerid, TEAM_A); }
|
Yeah but how would each team get 2 skins and still not be able to teamkill on OnPlayerRequest class D;
Ohh! I get what you mean now
thanks
Re: How would I do this? -
DeathOnaStick - 23.09.2009
then just MAKE 2 teams, that actually are 1 team. You just always have to write 2 teams instead of 1 team. like team 1 and 2 are USA, just with other skins. The skin is the only thing that differs the teams.
Antiteamkill is easy. Just a bit more work. But really just A BIT, not much.
Re: How would I do this? -
_Vortex - 23.09.2009
I know how to do anti teamkill. But not with 2 diffrent teams. Example.
When a player is chosing a team: They'll be able to pick from USA: Armed foces (first team) and USA: Air support (second USA team) and so on. -.o
Re: How would I do this? -
DeathOnaStick - 23.09.2009
something like this:
Код:
if(GetPlayerTeam(playerid)==1)
{
if(GetPlayerTeam(killerid)==1) GivePlayerMoney(killerid, -2000);
if(GetPlayerTeam(killerid)==2) GivePlayerMoney(killerid, -2000);
if(GetPlayerTeam(killerid)==3) GivePlayerMoney(killerid, 6000);
if(GetPlayerTeam(killerid)==4) GivePlayerMoney(killerid, 6000);
if(GetPlayerTeam(killerid)==5) GivePlayerMoney(killerid, 6000);
if(GetPlayerTeam(killerid)==6) GivePlayerMoney(killerid, 6000);
}
i guess that might work like this... but i'm not sure though XD
Re: How would I do this? -
_Vortex - 23.09.2009
Quote:
Originally Posted by DeathOnaStick
something like this:
Код:
if(GetPlayerTeam(playerid)==1)
{
if(GetPlayerTeam(killerid)==1) GivePlayerMoney(killerid, -2000);
if(GetPlayerTeam(killerid)==2) GivePlayerMoney(killerid, -2000);
if(GetPlayerTeam(killerid)==3) GivePlayerMoney(killerid, 6000);
if(GetPlayerTeam(killerid)==4) GivePlayerMoney(killerid, 6000);
if(GetPlayerTeam(killerid)==5) GivePlayerMoney(killerid, 6000);
if(GetPlayerTeam(killerid)==6) GivePlayerMoney(killerid, 6000);
}
i guess that might work like this... but i'm not sure though XD
|
Lol that's not anti-teamkill. But thanks anyways. I've figured it out.