Jump to content
Geplaatst:
comment_1265989

Hoi kunnnen jullie even hier kyken mijn anti-dm doet het niet. (onderste post)

enum
{
TEAM_FIRE,
TEAM_CYAN,
TEAM_COPS,
TEAM_GREEN,
TEAM_ORANGE,
TEAM_BALLAS,
TEAM_GROVE,
TEAM_VAGOS,
TEAM_AZTECAS,
TEAM_NANG,
TEAM_RIFA,
TEAM_MAFIA,
TEAM_RMAFIA,
TEAM_TRIADS,
TEAM_BIKERS,
MAX_TEAMS
}

new	bool:FightingAllowed[MAX_TEAMS],
Warnings[MAX_PLAYERS];

//OnGameModeInit
FightingAllowed[TEAM_FIRE] =	false;
FightingAllowed[TEAM_CYAN] =	false;
FightingAllowed[TEAM_COPS] =	true;
FightingAllowed[TEAM_GREEN] =	false;
FightingAllowed[TEAM_ORANGE] =	true;
FightingAllowed[TEAM_BALLAS] =	false;
FightingAllowed[TEAM_GROVE] =	false;
FightingAllowed[TEAM_VAGOS] =	false;
FightingAllowed[TEAM_AZTECAS] =	false;
FightingAllowed[TEAM_NANG] =	false;
FightingAllowed[TEAM_RIFA] =	false;
FightingAllowed[TEAM_MAFIA] =	false;
FightingAllowed[TEAM_RMAFIA] =	false;
FightingAllowed[TEAM_TRIADS] =	false;
FightingAllowed[TEAM_BIKERS] =	false;

//OnPlayerDeath
new	pTeam = GetPlayerTeam(playerid),
	kTeam = GetPlayerTeam(killerid),
	string[128];
if(FightingAllowed[pTeam] == false || FightingAllowed[kTeam] == false)
{
	switch(Warnings[killerid])
	{
		case 0:	SendClientMessage(killerid, COLOR_RED, "Stop DMing or you get a jail (first warning)"),
				Warnings[killerid]++;
		case 1:	PlayerInfo[killerid][pInt] = 3,
				SetPlayerInterior(killerid,3),
				SetPlayerPos(killerid,197.72,175.06,1003.02),
				ResetPlayerWeapons(killerid),
				jailed2[killerid] = 1,
				PlayerInfo[killerid][pJailed] = 1,
				SendClientMessage(killerid, COLOR_GRAD1,"   You have been jailed for deathmatching."),
				PlayJailSound(1153 , 1154, 2000,264.395200, 77.564040, 1001.039000),
				JailTime[killerid] = 120,
				GetPlayerName(killerid, string, MAX_PLAYER_NAME),
				format(string, sizeof string, "[ANTI-DM] %s has been auto jailed for deathmatching", string),
				SendClientMessageToAll(COLOR_RED, string),
				Warnings[killerid]++;
		case 2:	Kick(killerid);
	}
}

//OnPlayerConnect
Warnings[playerid] = false;

misschien weet 1 van jullie het :)

Featured Replies

Een reactie plaatsen

Je kan nu een reactie plaatsen en pas achteraf registreren. Als je al lid bent, log eerst in om met je eigen account een reactie te plaatsen.

Gast
Op dit onderwerp reageren...

Recent actief 0

  • Er zijn hier geen geregistreerde gebruikers aanwezig.