Anti-TDM?
#1

Well, what I need is pretty basic I think but I'm kinda stupid >.<
How to make anti-tdm? lets say i got
TEAM_SF and TEAM_BL
TEAM_SF cant attack others that are TEAM_SF, but they can attack TEAM_BL.
How to do that?
Reply
#2

SetPlayerTeam.

To TEAM_SF, OnPlayerSpawn add SetPlayerTeam(playerid,0); , in TEAM_BL add SetPlayerTeam(playerid,1); Using this, you cannot kill players in your team.
Reply
#3

https://sampwiki.blast.hk/wiki/SetPlayerTeam
Reply
#4

Yeah but wont that only set the team to player id 0? and 1?
Reply
#5

Quote:
Originally Posted by 101
Посмотреть сообщение
Yeah but wont that only set the team to player id 0? and 1?
ofc not
Reply
#6

pawn Код:
// In OnPlayerDeath(...)

if(killerid == playerid) SendClientMessage(playerid, Color,"No Permissed Killing is here!"), Kick(playerid);
Reply
#7

Set everyone in one team, to team 1, and the other, to team 2, do it when they spawn
Reply
#8

I'm kind of confused now >.<
Reply
#9

Quote:
Originally Posted by 101
Посмотреть сообщение
I'm kind of confused now >.<
Код:
public OnPlayerSpawn(playerid)
{
    // Set a player's team to 4 when they spawn
    SetPlayerTeam(playerid, 4);
    return 1;
}
and if you want to set the team numbers to a limit, let's say 18 do this:

Код:
public OnGameModeInit( )
{
    // We use 18 teams in this use Team-Deathmatch mode, define it;
    SetTeamCount( 18 );
    return 1;
}
Quote:

Note: Players on the same team can not kill each other unless they use a knife.

Reply
#10

Yes but
SetPlayerTeam(playerid, 4);
I don't want to do this, because it will only set them to the team ID 4, isnt there a global thing?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)