[Ajuda] head shot
#1

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_INTERVAL1);
    return 
1;
}
public 
OnPlayerDeath(playeridkilleridreason)
{
    if(
GetPVarInt(playerid"Headshotted") == 1)
    {
        
SetPVarInt(playerid"Headshotted"0);
        
GameTextForPlayer(playerid"~r~Headshotted"30003);
        
GameTextForPlayer(killerid"~r~Headshott"30003);
    }
    return 
1;
}
forward CheckHeadShot();
public 
CheckHeadShot()
{
    new
        
index;
    for(new 
playeridplayerid maxPlayersplayerid++)
    {
        if(
IsPlayerConnected(playerid))
        {
        
index GetPlayerAnimationIndex(playerid);
        if(
index == 1173 || index == 1175 || index == 1177 || index == 1178)
        {
                
SetPVarInt(playerid"Headshotted"1);
                
SetPlayerHealth(playerid0);
            }
        }
    }
    return 
1;

Reply
#2

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 .
Reply
#3

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!
Reply
#4

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 .
Reply
#5

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.
Reply
#6

GetPlayerTeam
Reply
#7

System nгo tem local pra colocar GetPlayerTeam ai cara, como vou usar GetPlayerTeam(atirador) ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)