How would I do this?
#1

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
Reply
#2

You could use the default SetPlayerTeam functions which I think have built in anti-team-kill.
Reply
#3

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)
Reply
#4

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);
}
Reply
#5

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
Reply
#6

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.
Reply
#7

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
Reply
#8

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
Reply
#9

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)