[FS] Headshot
#1

Alguem tem Fs pra compartilhar de HeadShot de Deagle e Sniper quem ajuda vlw pela ajuda
Reply
#2

Nгo й querendo ser arrogante, mas pra que criar este monte de tуpico ? vocк se quer usou o search ? ser novato nгo й sinфnimo de preguiзoso.
Reply
#3

olha pesquisei fs headshot e ja apertei no 1° que veio

https://sampforum.blast.hk/showthread.php?tid=602795

Eu vi ele, agora tem que saber usar :/

Acho que jб ta bom de postar tуpicos por hoje nй :z
Reply
#4

Quote:
Originally Posted by AutoMatic2
Посмотреть сообщение
Acho que jб ta bom de postar tуpicos por hoje nй :z
Deixa o menino posta.....

So que poste no Duvida curtas....
Reply
#5

Tгo vai qual vai ser a prуxima [ Dъvida ]

;-;
Reply
#6

Obg quem ajudo vo da +REP
Reply
#7

alguem saber arrumar isso tando de ESC o personagem leva hs e fica morrendo ai os cara fica fasendo freekill
e queria muda pra a Desert e a Sniper dar HS


PHP код:
#include <a_samp>
#define SERVER_MAX_PLAYERS 100 //MUDE PARA O NUMERO MAXIMO DE JOGADORES DO SEU SERVIDOR
//#define SHOWPATH //DESCOMENTE ISSO SE QUISER MOSTRAR O RASTRO DA BALA
new RecentlyShot[SERVER_MAX_PLAYERS];
public 
OnFilterScriptInit()
{
    print(
"\n\n__________________________________________________________________");
    print(
" Boom Headshot System by inark loaded!");
    print(
" Copyright SAMPLITE 2013");
    print(
" ---------------------------");
    
LoadModules(0,1);
    print(
"__________________________________________________________________\n\n");
    return 
1;
}
public 
OnFilterScriptExit()
{
    print(
"\n\n__________________________________________________________________");
    print(
" Boom Headshot System by inark unloaded!");
    print(
" Copyright SAMPLITE 2013");
    print(
" ---------------------------");
    
LoadModules(0,1);
    print(
"__________________________________________________________________\n\n");
    return 
1;
}
public 
OnPlayerConnect(playerid) {
     
SendClientMessage(playerid0xFFFFFFFF"");
    
LoadModules(playerid,2);
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
    
//GivePlayerWeapon(playerid, 34, 15);
    
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), "{00ff00}Headshot:{ffffff} %s levou um Headshot de {00ff00} %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), "{00ff00}HeadShot: {ffffff}%s levou um Headshot de {00ff00}%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("");
    if(
funcao==2)
    {
        
SendClientMessage(playerid0xFFFFFFFF"");
        
SendClientMessage(playerid0xFFFFFFFF"");
    }

Reply
#8

Mude a tag do tуpico para [pedido], assim poderemos ignorar com mais eficiкncia.
Reply
#9

https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage

Tem um exemplo no final da pбgina (Example - One-shot-kill sniper headshots).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)