25.06.2013, 22:48
bom ja tentei com SetPlayerTeam nao foi tentei com AddPlayerClassEx tambem nao foi ambos da mesma gangue consegue se mata alguem poderia me dar um help rsrs
obrigado.
obrigado.
// Fim do GM
public OnPlayerGiveDamage(playerid,damagedid,Float:amount,weaponid)
{
if(GetPlayerTeam(playerid) == GetPlayerTeamDamagedid(playerid) // Troque pela variбvel que define as equipes.
{
return 0;
}
return 1;
}
pawn Код:
|
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
{
new Float:Life, Float:Coleete, Float:Dano;
PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
GetPlayerArmour(damagedid, Coleete);
GetPlayerHealth(damagedid, Life);
if(Coleete > 0)
{
if(amount > Coleete)
{
Dano = amount - Coleete;
Life = Life - Dano;
SetPlayerArmour(damagedid, 0.0);
SetPlayerHealth(damagedid, Life);
return 1;
}
Coleete = Coleete - amount;
SetPlayerArmour(damagedid, Coleete);
}
if(Coleete < 1)
{
Life = Life - amount;
SetPlayerHealth(damagedid, Life);
}
/*if(IsPlayerAimingTargetBodyPart(playerid, damagedid, 1))
{
PlayAudioStreamForPlayer(playerid, "http://introserver.ueuo.com/HeadShot.mp3");
GameTextForPlayer(damagedid, "~r~HEAD ~w~SHOT", 2000, 0);
GameTextForPlayer(playerid, "~r~HEAD ~w~SHOT", 2000, 0);
SetPlayerHealth(damagedid, -1);
}*/
new s[20];
format(s, 20, "+Dano %.0f", amount);
TextDrawSetString(GiveDamage[playerid], s);
TextDrawShowForPlayer(playerid, GiveDamage[playerid]);
//PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
SetTimerEx("DestruirTextoDraw", 1000, false, "i", playerid);
if(GetPlayerTeam(playerid) == MinhaGang[playerid] // Troque pela variбvel que define as equipes.
{
return 0;
}
return 1;
}
C:\Users\Caio Alaf\Desktop\samp\gamemodes\GM-GG.pwn(854) : error 001: expected token: ")", but found "{"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
{
new Float:Life, Float:Coleete, Float:Dano;
PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
GetPlayerArmour(damagedid, Coleete);
GetPlayerHealth(damagedid, Life);
if(Coleete > 0)
{
if(amount > Coleete)
{
Dano = amount - Coleete;
Life = Life - Dano;
SetPlayerArmour(damagedid, 0.0);
SetPlayerHealth(damagedid, Life);
return 1;
}
Coleete = Coleete - amount;
SetPlayerArmour(damagedid, Coleete);
}
if(Coleete < 1)
{
Life = Life - amount;
SetPlayerHealth(damagedid, Life);
}
/*if(IsPlayerAimingTargetBodyPart(playerid, damagedid, 1))
{
PlayAudioStreamForPlayer(playerid, "http://introserver.ueuo.com/HeadShot.mp3");
GameTextForPlayer(damagedid, "~r~HEAD ~w~SHOT", 2000, 0);
GameTextForPlayer(playerid, "~r~HEAD ~w~SHOT", 2000, 0);
SetPlayerHealth(damagedid, -1);
}*/
new s[20];
format(s, 20, "+Dano %.0f", amount);
TextDrawSetString(GiveDamage[playerid], s);
TextDrawShowForPlayer(playerid, GiveDamage[playerid]);
//PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
SetTimerEx("DestruirTextoDraw", 1000, false, "i", playerid);
if(GetPlayerTeam(playerid) == MinhaGang[playerid]) // Troque pela variбvel que define as equipes.
{
return 0;
}
return 1;
}
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
{
new Float:Life, Float:Coleete, Float:Dano;
PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
GetPlayerArmour(damagedid, Coleete);
GetPlayerHealth(damagedid, Life);
if(Coleete > 0)
{
if(amount > Coleete)
{
Dano = amount - Coleete;
Life = Life - Dano;
SetPlayerArmour(damagedid, 0.0);
SetPlayerHealth(damagedid, Life);
return 1;
}
Coleete = Coleete - amount;
SetPlayerArmour(damagedid, Coleete);
}
if(Coleete < 1)
{
Life = Life - amount;
SetPlayerHealth(damagedid, Life);
}
/*if(IsPlayerAimingTargetBodyPart(playerid, damagedid, 1))
{
PlayAudioStreamForPlayer(playerid, "http://introserver.ueuo.com/HeadShot.mp3");
GameTextForPlayer(damagedid, "~r~HEAD ~w~SHOT", 2000, 0);
GameTextForPlayer(playerid, "~r~HEAD ~w~SHOT", 2000, 0);
SetPlayerHealth(damagedid, -1);
}*/
new s[20];
format(s, 20, "+Dano %.0f", amount);
TextDrawSetString(GiveDamage[playerid], s);
TextDrawShowForPlayer(playerid, GiveDamage[playerid]);
//PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
SetTimerEx("DestruirTextoDraw", 1000, false, "i", playerid);
if(GetPlayerTeam(playerid) == MinhaGang[playerid]) // Troque pela variбvel que define as equipes.
{
return 0;
}
return 1;
}
pawn Код:
|
forward TeamProtection();
SetTimer("TeamProtection", 5000 ,true);
public TeamProtection()
{
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SetPlayerTeam(i, gTeam[i]);// Troque o gTeam pela variбvel que define as gangs/equipes.
}
}
}
Tenta isso
Topo PHP код:
PHP код:
PHP код:
|