No matarse entre Bandos [Consulta]
#7

Algo asн:

pawn Код:
static Equipo1[MAX_PLAYERS];
static Equipo2[MAX_PLAYERS];
forward Freeze(playerid);
En el dialog si escogen equipo 1 pone:

pawn Код:
Equipo1[playerid] = 1;
En el dialog si escogen equipo 2 pone:

pawn Код:
Equipo2[playerid] = 1;
pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
{
if((Equipo1[playerid] == 1 && Equipo1[damagedid] == 1) || (Equipo2[playerid] == 1 && Equipo2[damagedid] == 1))
{
TogglePlayerControllable(playerid, false);
GameTextForPlayer(playerid, "~R~No debes atacar a tu propio equipo.", 3, 3000);
SetTimerEx("Freeze", 3000, false, "d", playerid);
return 0;
}
return 1;
}
pawn Код:
public Freeze(playerid)
{
TogglePlayerControllable(playerid, true);
}
Y al salir del juego o al desconectarse:

pawn Код:
Equipo1[playerid] = 0;
Equipo2[playerid] = 0;
No lo probй y sй que quizб hay otra forma mбs simple aъn, pero deberнa funcionar; suerte
Reply


Messages In This Thread
No matarse entre Bandos [Consulta] - by Zodiaco - 30.07.2014, 16:29
Re: No matarse entre Bandos [Consulta] - by admantis - 31.07.2014, 18:33
Re: No matarse entre Bandos [Consulta] - by tony204 - 22.09.2014, 00:26
Respuesta: Re: No matarse entre Bandos [Consulta] - by ADOK1NG - 22.09.2014, 00:30
Re: No matarse entre Bandos [Consulta] - by tony204 - 22.09.2014, 00:48
Re: No matarse entre Bandos [Consulta] - by [J]ulian - 22.09.2014, 01:29
Respuesta - by Ygzeb - 22.09.2014, 03:12
Re: No matarse entre Bandos [Consulta] - by [J]ulian - 22.09.2014, 03:21

Forum Jump:


Users browsing this thread: 1 Guest(s)