[Ajuda] HeadShot Com Mais Armas!
#1

Olб!

Queria Saber Se Dб Para Fazer Esse Sistema Dar HeadShot Com Mais Armas ( Ela Dб HeadShot Apenas Com A Sniper ID: 34 ), Tipo A ID 26 Etc...


pawn Код:
stock HeadshotCheck(playerid, &Float:x, &Float:y, &Float:z)
{
    new Float:fx,Float:fy,Float:fz;
    GetPlayerCameraFrontVector(playerid, fx, fy, fz);

    new Float:cx,Float:cy,Float:cz;
    GetPlayerCameraPos(playerid, cx, cy, cz);

    for(new Float:i = 0.0; i < 50; i = i + 0.5)
    {
        x = fx * i + cx;
        y = fy * i + cy;
        z = fz * i + cz;

        /*#if defined SHOWPATH
        CreatePickup(1239, 4, x, y, z, -1);
        #endif*/


        for(new player = 0; player < SERVER_MAX_PLAYERS; player ++)
        {
            if(IsPlayerConnected(playerid))
            {
                if(player != playerid)
                {
                    if(GetPlayerSpecialAction(player) == SPECIAL_ACTION_DUCK) //CROUCHING
                    {
                        if(IsPlayerInRangeOfPoint(player, 0.3, x, y, z))
                        {
                            new string[128], Atingido[MAX_PLAYER_NAME], Atirador[MAX_PLAYER_NAME];

                            GetPlayerName(player, Atingido, sizeof(Atingido));
                            GetPlayerName(playerid, Atirador, sizeof(Atirador));

                            format(string, sizeof(string), "[BMR][HS]» {F53636}O Atirador {FFFFFF}%s {F53636}Deu Um {CC7A0E}HeadShoT {F53636}Em {FFFFFF}%s {F53636}!.",Atirador,Atingido);
                            SendClientMessageToAll(0x19B519FF,string);

                            for(new m; m < MAX_PLAYERS; m++){

                                GameTextForPlayer(m,"~b~HEAD~r~SHOT!", 3000, 5);

                            }

                            SetPlayerHealth(player, 0.0);
                            CallRemoteFunction("OnPlayerDeath", "ddd", player, playerid, 34);
                        }
                    }
                    else //NOT CROUCHING
                    {
                        if(IsPlayerInRangeOfPoint(player, 0.3, x, y, z - 0.7))
                        {
                            new string[128], Atingido[MAX_PLAYER_NAME], Atirador[MAX_PLAYER_NAME];

                            GetPlayerName(player, Atingido, sizeof(Atingido));
                            GetPlayerName(playerid, Atirador, sizeof(Atirador));

                            format(string, sizeof(string), "[BMR][HS]» {F53636}O Atirador {FFFFFF}%s {F53636}Deu Um {CC7A0E}HeadShoT {F53636}Em {FFFFFF}%s {F53636}!.",Atirador,Atingido);
                            SendClientMessageToAll(0x19B519FF,string);

                            for(new m; m < MAX_PLAYERS; m++){

                                GameTextForPlayer(m,"~b~HEAD~r~SHOT!", 3000, 5);

                            }

                            SetPlayerHealth(player, 0.0);
                            CallRemoteFunction("OnPlayerDeath", "ddd", player, playerid, 34);
                        }
                    }
                }
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
HeadShot Com Mais Armas! - by SkyneTSAMP - 11.03.2016, 02:08
Re: HeadShot Com Mais Armas! - by ViniBorn - 11.03.2016, 02:52
Re: HeadShot Com Mais Armas! - by SkyneTSAMP - 11.03.2016, 03:03
Re: HeadShot Com Mais Armas! - by ViniBorn - 11.03.2016, 04:32
Re: HeadShot Com Mais Armas! - by Coringa_Vilao - 11.03.2016, 12:54
Re: HeadShot Com Mais Armas! - by AdrianoStk - 11.03.2016, 23:28

Forum Jump:


Users browsing this thread: 1 Guest(s)