[Pedido] Ant Team Kill - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] Ant Team Kill (
/showthread.php?tid=635355)
Ant Team Kill -
zCyan - 05.06.2017
Olб, venho aqui pedir para vocкs um tutorial de como fazer um ant team kill, tipo eu tenho esse:
Код:
if(GetPlayerTeam(killerid) == GetPlayerTeam(playerid))
{
Kick(killerid);
SendClientMessage(killerid, COLOR_GRAD1, "You've been kicked for killing a teammate !");
Mais esse no caso й se o player mata o membro de sua gangue ele irб ser kickado, eu queria que nгo tira-se vida/colete do cara, tipo ele vai tentar matar mais sу que nгo vai tirar vida/colete do membro de sua gangue. Obrigado
Re: Ant Team Kill -
RodrigoMSR - 05.06.2017
Use
SetPlayerTeam.
Re: Ant Team Kill -
zCyan - 05.06.2017
Quote:
Originally Posted by RodrigoMSR
|
Cara vc ta de zoas? Vc apenas leu o titulo? Le tudo ai namoral man
Re: Ant Team Kill -
HeisenGiromB - 05.06.2017
Quote:
Originally Posted by zCyan
Cara vc ta de zoas? Vc apenas leu o titulo? Le tudo ai namoral man
|
Voce sabe como a funзгo SetPlayerTeam opera?
edit: lк direito ai
Quote:
SetPlayerTeam: Players can not damage/kill players on the same team unless they use a knife to slit their throat
|
Re: Ant Team Kill -
Rato22 - 05.06.2017
Код:
if(GetPlayerColor(playerid) == GetPlayerColor(damagedid))
{
GameTextForPlayer(playerid, "~r~ANT KILL TEAM!", 1000,1);
new Float: Vida1;
new Float: Colete1;
GetPlayerHealth(damagedid, Vida1);
GetPlayerArmour(damagedid, Colete1);
SetPlayerHealth(damagedid, Vida1);
SetPlayerArmour(damagedid, Colete1);
return 0;
}
Re: Ant Team Kill -
Dimbalada - 05.06.2017
Caio responde no ******** vou te ajudar.
Re: Ant Team Kill -
RodrigoMSR - 05.06.2017
SetPlayerTeam define uma equipe ao jogador, jogadores com o mesmo nъmero de equipe nгo poderгo dar dano entre si, se nгo estб funcionando vocк deve ter algum cуdigo nas callbacks de dano do seu servidor. Se vocк lesse o que estб escrito no link que te passei saberia disso:
Quote:
Players can not damage/kill players on the same team unless they use a knife to slit their throat. As of SA-MP 0.3x, players are also unable to damage vehicles driven by a player from the same team. This can be enabled with EnableVehicleFriendlyFire.
|
Re: Ant Team Kill -
zCyan - 05.06.2017
Quote:
Originally Posted by Rato22
Код:
if(GetPlayerColor(playerid) == GetPlayerColor(damagedid))
{
GameTextForPlayer(playerid, "~r~ANT KILL TEAM!", 1000,1);
new Float: Vida1;
new Float: Colete1;
GetPlayerHealth(damagedid, Vida1);
GetPlayerArmour(damagedid, Colete1);
SetPlayerHealth(damagedid, Vida1);
SetPlayerArmour(damagedid, Colete1);
return 0;
}
|
Coloco isso em qual callback?
Re: Ant Team Kill -
IlanZ - 06.06.2017
So usar SetPlayerTeam '-'
Re: Ant Team Kill -
zCyan - 06.06.2017
Resolvi jб! Obrigado a todos.