[Ajuda] Ja Procurei Nao Achei Sistema De HeadShot Alguem Me Ajuda
#1

por favor presciso urgente
Reply
#2

Mano, й sу abri o search (:
https://sampforum.blast.hk/showthread.php?pid=802102#pid802102
Reply
#3

mano nao e so abrir o chear o sistema tem que pegar
Reply
#4

PHP код:
#include <a_samp>
#define SERVER_MAX_PLAYERS 100
//#define SHOWPATH
new RecentlyShot[SERVER_MAX_PLAYERS];
public 
OnFilterScriptInit()
{
    print(
"\n\n__________________________________________________________________");
    print(
" Copyright @sa-mp");
    print(
" ---------------------------");
    
LoadModules(0,1);
    print(
"__________________________________________________________________\n\n");
    return 
1;
}
public 
OnFilterScriptExit()
{
    print(
"\n\n__________________________________________________________________");
    print(
" Copyright @sa-mp");
    print(
" ---------------------------");
    
LoadModules(0,1);
    print(
"__________________________________________________________________\n\n");
    return 
1;
}
public 
OnPlayerConnect(playerid) {
    
LoadModules(playerid,2);
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
    
RecentlyShot[playerid] = 0;
    return 
1;
}
public 
OnPlayerUpdate(playerid)
{
    return 
1;
}
public 
OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if(
newkeys KEY_FIRE && newkeys KEY_HANDBRAKE) {
        if(
RecentlyShot[playerid] == 0) {
            
RecentlyShot[playerid] = 1;
            
SetTimerEx("AntiSpam"1000false"d"playerid);
            if(
GetPlayerWeapon(playerid) == 34) {
                new 
Float:blahxFloat:blahyFloat:blahz;
                
HeadshotCheck(playeridblahxblahyblahz);
                return 
1;
            }
            return 
1;
        }
        return 
1;
    }
    return 
1;
}
forward AntiSpam(playerid);
public 
AntiSpam(playerid) {
    
RecentlyShot[playerid] = 0;
    return 
1;
}
stock PlayerName(playerid) {
    new 
name[24];
    
GetPlayerName(playeridnamesizeof(name));
    return 
name;
}
stock HeadshotCheck(playerid, &Float:x, &Float:y, &Float:z)
{
    new 
Float:fx,Float:fy,Float:fz;
    
GetPlayerCameraFrontVector(playeridfxfyfz);
    new 
Float:cx,Float:cy,Float:cz;
    
GetPlayerCameraPos(playeridcxcycz);
    for(new 
Float:0.0500.5)
    {
        
fx cx;
        
fy cy;
        
fz cz;
        
#if defined SHOWPATH
        
CreatePickup(12394xyz, -1);
        
#endif
        
for(new player 0player SERVER_MAX_PLAYERSplayer ++)
        {
            if(
IsPlayerConnected(playerid))
            {
                if(
player != playerid)
                {
                    if(
GetPlayerSpecialAction(player) == SPECIAL_ACTION_DUCK//CROUCHING
                    
{
                        if(
IsPlayerInRangeOfPoint(player0.3xyz))
                        {
                            new 
string[128];
                            
format(stringsizeof(string), "[NEWS]: %s levou um Headshot do %s"PlayerName(player), PlayerName(playerid));
                            
SendClientMessageToAll(0xFF9900AAstring);
                            
GameTextForPlayer(playerid"~r~HEADSHOT!"20006);
                            
GameTextForPlayer(player"~r~HEADSHOT!"20006);
                            
SetPlayerHealth(player0.0);
                            
CallRemoteFunction("OnPlayerDeath""ddd"playerplayerid34);
                        }
                    }
                    else 
//NOT CROUCHING
                    
{
                        if(
IsPlayerInRangeOfPoint(player0.3xy0.7))
                        {
                            new 
string[128];
                            
format(stringsizeof(string), "[NEWS]: %s levou um Headshot do %s"PlayerName(player), PlayerName(playerid));
                            
SendClientMessageToAll(0xFF9900AAstring);
                            
GameTextForPlayer(playerid"~r~HEADSHOT!"20006);
                            
GameTextForPlayer(player"~r~HEADSHOT!"20006);
                            
SetPlayerHealth(player0.0);
                            
CallRemoteFunction("OnPlayerDeath""ddd"playerplayerid34);
                        }
                    }
                }
            }
        }
    }
    return 
1;
}
stock LoadModules(playerid,funcao)
{
    if(
funcao==1) print(" Copyright LegendsHost");
    if(
funcao==2)
    {
        
SendClientMessage(playerid0xFFFFFFFF">Promoзхes: www.legendshost.com.br<");
    }

Vк ai se vai pegar.
Reply
#5

jow o outro la nao pego se o teu pegar dou rep
Reply
#6

Quote:
Originally Posted by joaobgnc
Посмотреть сообщение
jow o outro la nao pego se o teu pegar dou rep
Little clucker n pode dar rep cansei de falar isso hj -.-
Reply
#7

ixi e msm mesmo assim nao funcionou !!!
Reply
#8

Cara,estou usando esse,sem problemas...Tenta ae:
pawn Код:
#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.
------------------------*/


#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)) {
            new Float:npx, Float:npy, Float:npz;
            GetPlayerPos(playerid, npx, npy, npz);
            index = GetPlayerAnimationIndex(playerid);
            for(new i; i < maxPlayers; i++) if(IsPlayerConnected(i) && GetPlayerWeapon(i) == 34 && IsPlayerInRangeOfPoint(i, 200.0, npx, npy, npz) && index == 1173 || index == 1175 || index == 1177 || index == 1178) {
                SetPVarInt(playerid, "Headshotted", 1);
                SetPlayerHealth(playerid, 0);
            }
        }
    }
    return 1;
}
Obs: Nгo fui eu que fiz.
Reply
#9

bom amigo ele funciona com todas as armas por que so to vendo ali getplayerweapon 34 pode me informa obrigado!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)