[Ajuda] head shot - 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: [Ajuda] head shot (
/showthread.php?tid=465553)
head shot -
Souz4. - 22.09.2013
Opa ai galera blz? to com um problema aqui alguem pode ajuda?
to com esse FS de HS
https://sampforum.blast.hk/showthread.php?pid=802102#pid802102
mais quero saber como faz pra pessoas do mesmo time nгo tomar HS, alguem pode me ajuda?
PHP код:
#include <a_samp>
/*-------------------------
HeadShot System by Peppe
The faster implementation of a headshot system in SA:MP.
This script requires the new version of SA:MP 0.3b.
www.pawnoitalia.forumfree.it
www.atlantisgaming.it
-------------------------*/
#define TIMER_INTERVAL 150
new
maxPlayers;
public OnFilterScriptInit()
{
maxPlayers = GetMaxPlayers();
SetTimer("CheckHeadShot", TIMER_INTERVAL, 1);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(GetPVarInt(playerid, "Headshotted") == 1)
{
SetPVarInt(playerid, "Headshotted", 0);
GameTextForPlayer(playerid, "~r~Headshotted", 3000, 3);
GameTextForPlayer(killerid, "~r~Headshott", 3000, 3);
}
return 1;
}
forward CheckHeadShot();
public CheckHeadShot()
{
new
index;
for(new playerid; playerid < maxPlayers; playerid++)
{
if(IsPlayerConnected(playerid))
{
index = GetPlayerAnimationIndex(playerid);
if(index == 1173 || index == 1175 || index == 1177 || index == 1178)
{
SetPVarInt(playerid, "Headshotted", 1);
SetPlayerHealth(playerid, 0);
}
}
}
return 1;
}
Re: head shot -
Neutron97 - 22.09.2013
Olб, se vocк puder dar uma olhada neste tуpico, acho que pode tirar sua dъvida
.
https://sampforum.blast.hk/showthread.php?tid=354753
Espero ter ajudado
.
Re: head shot -
Souz4. - 22.09.2013
nгo mano jб tem ant team kill, mas com o sistema de Head Shot, quando o time atira no propio time o cara que tomo tiro й morto pela funзгo SetPlayerHealth, e como o time, e como nгo tem team kill o cara morre como se tivesse dado /kill!
Re: head shot -
Neutron97 - 22.09.2013
Quote:
Originally Posted by Souz4.
nгo mano jб tem ant team kill, mas com o sistema de Head Shot, quando o time atira no propio time o cara que tomo tiro й morto pela funзгo SetPlayerHealth, e como o time, e como nгo tem team kill o cara morre como se tivesse dado /kill!
|
Vocк tб interpretando errado, leia o tуpico do link que mandei pra vocк, tenho certeza que se vocк prestar atenзгo vai conseguir elucidar a dъvida
.
Espero ter ajudado
.
Re: head shot -
Souz4. - 22.09.2013
Neutron , nгo mano, por exemplo, o anti team kill ja tem, o negocio й que se vocк for da minha equipe e eu te acertar um HS, vocк morre pela funзгo SetPlayerHealth(playerid, 0); ai aparece no chat kill que vocк foi morto por ninguem , como se tivesse dado /kill, isso й porque no fs de HS nгo tem a funзгo do player que deu tiro, so tem a funзгo lб de tomar o HS.
Respuesta: head shot -
SeV_ - 22.09.2013
GetPlayerTeam
Re: head shot -
Souz4. - 23.09.2013
System nгo tem local pra colocar GetPlayerTeam ai cara, como vou usar GetPlayerTeam(atirador) ?