[Pedido] Ant Team Kill
#1

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

Use SetPlayerTeam.
Reply
#3

Quote:
Originally Posted by RodrigoMSR
Посмотреть сообщение
Cara vc ta de zoas? Vc apenas leu o titulo? Le tudo ai namoral man
Reply
#4

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

Reply
#5

Код:
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;
}
Reply
#6

Caio responde no ******** vou te ajudar.
Reply
#7

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.

Reply
#8

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

So usar SetPlayerTeam '-'
Reply
#10

Resolvi jб! Obrigado a todos.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)