SSGamers - 12 Anos online por você.

#SSGamers - A Comunidade que mais crescer no brasil!

Participe do fórum, é rápido e fácil

SSGamers - 12 Anos online por você.

#SSGamers - A Comunidade que mais crescer no brasil!

SSGamers - 12 Anos online por você.

Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.
Chegou o novo tema 6.5.5 - SSGamers - Servidores online de qualidade - Aproveite e entre para nossa comunidade, inscreva-se já! - Ouça nossa web radio - Veja nossas novidades - Participe dos nossos setores de jogos online - Parcerias aberta fale já com um administrador.

    [Tutorial] Funcionalidades novas 0.3z RC

    Weslley_Script
    Weslley_Script
    SS - Fundador
    SS - Fundador


    Steam Steam : WeslleySSGames
    Zello : WeslleySSGames
    Mensagens : 11381
    Moedas : 1031993
    Data de inscrição : 06/10/2011
    Idade : 28
    Localização : Brasil

    [Tutorial] Funcionalidades novas 0.3z RC Empty [Tutorial] Funcionalidades novas 0.3z RC

    Mensagem por Weslley_Script Ter 2 maio 2023 - 8:42

    @ATUALIZADO PARA 0.3Z RC4

    - Fixed problem where long distance shots might go missing
    - Nametag LoS tests will also apply to server objects
    - OnPlayerGiveDamage is now called for NPCs
    - Added GetPlayerLastShotVectors for extended information on bullet shots
    - Added legacy mode for shot firing (shotcompmode 2 server.cfg setting) which uses only the camera for aiming and allows joypad auto-aiming
    - Fixed: players could not be shot while surfing a vehicle
    - Added some extended player camera information like aspect ratio and zoom level (for sniper)
    - Extended 'netstats' functions so the script can get lower level network information without having to parse the stats string
    pawn Код:

    Código:
    native GetPlayerLastShotVectors(playerid, &Float:fOriginX, &Float:fOriginY, &Float:fOriginZ, &Float:fHitPosX, &Float:fHitPosY, &Float:fHitPosZ);

    native Float:GetPlayerCameraAspectRatio(playerid);
    native Float:GetPlayerCameraZoom(playerid);

    // Extended admin network stats
    native NetStats_GetConnectedTime(playerid);
    native NetStats_MessagesReceived(playerid);
    native NetStats_BytesReceived(playerid);
    native NetStats_MessagesSent(playerid);
    native NetStats_BytesSent(playerid);
    native NetStats_MessagesRecvPerSecond(playerid);
    native Float:NetStats_PacketLossPercent(playerid);
    native NetStats_ConnectionStatus(playerid);
    native NetStats_GetIpPort(playerid, ip_port[], ip_port_len);


    @ATUALIZADO PARA 0.3Z RC3

    Fixed: Joypad target switching still enabled autoaiming.
    - Fixed: Sniper bullets were not working when vectored outside the SA land area.
    - Extra server data for investigating any player shot data corruption.
    - Added VectorSize pawn function.

    # Depois edito, estou ocupado.

    @ATUALIZADO PARA 0.3Z RC2

    Eu disse lб em baixo do tуpico e ele leu ! AEUHAEUHAEUH JoyPad Jб Era, e nгo existe mais tiro no LAG. :/
    Foi Adicionado um quarto parвmetro em OnPlayerWeaponShot.
    Sabe aqueles RakNet que enchem o servidor de IP falsos? Poiser, agora pode ser evitado nessa versгo. Tentaram arrumar no 0.3e, mas nгo conseguiram.

    [Tutorial] Funcionalidades novas 0.3z RC Logo_forum
    Fala pessoal, tгo sabendo que o SA:MP lanзou o 0.3z BETA repleto de BUG's e algumas novidades nй?
    Entгo, й sobre essas novidades que irei criar esse tуpico bem simpleszinho pra todos entenderem.
    pawn Код:

    Código:
    forward OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ);
    forward OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart); // bodypart add
    forward OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart); // bodypart add


    OnPlayerWeaponShot

    Facilmente explicando, ela detecta tiro acertado em players, objetos e veнculos.
    pawn Код:

    Código:
    #define BULLET_HIT_TYPE_NONE            0 // DETECT FAIL, SE FODEU kkk'.
    #define BULLET_HIT_TYPE_PLAYER          1 // DETECTAR TIRO AO PLAYER
    #define BULLET_HIT_TYPE_VEHICLE         2 / DETECTAR TIRO AO VEICULO
    #define BULLET_HIT_TYPE_OBJECT          3 // DETECTAR TIRO AO OBJETO
    #define BULLET_HIT_TYPE_PLAYER_OBJECT   4 // DETECTAR TIRO APENAS NOS OBJETOS QUE APARECE PARA UM DETERMINADO PLAYER
    forward OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ);
    // weaponid = Vocк pode escolher uma arma especial para destroir tal objeto.
    // hittype = Sгo as 4 defines que botei acima. vocк pode indentificar por ID ou nome.
    // hitid = Й o alvo(veiculos, objetos..) acertado.


    SISTEMA SIMPLES DE DESTRUIR O CARRO SEM NINGUЙM DENTRO




    Todo mundo sabe que o carro sу destroi com alguem dentro no SAMP... Na 0.3z nгo mais!
    pawn Код:

    Código:
    public OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ )
    {
            if(hittype = BULLET_HIT_TYPE_VEHICLE) // Ao acertar qualquer veiculo com tiro
            {
                SetVehicleHealth(hitid, 7); // ele irб comeзar a pegar FOGO.
            }
            return true;
    }


    SISTEMA DE DESTRUIR OBJETO COM UM TIRO




    Que tal fazer o objeto sumir com um tiro ?
    pawn Код:

    Código:
    public OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ )
    {
        if(hittype == BULLET_HIT_TYPE_OBJECT) // Detecta tiro ao objeto
        {
            if( IsValidObject( hitid ) ) // Ver se o objeto й vбlido.
            {
                SendClientMessage( playerid, -1, "Vocк acertou o objeto e ele vazou!" );
                DestroyObject( hitid ); // Destrou o Objeto acertado.
            }
        }
        return 1;
    }



    Adicionado Bodypart em OnPlayerGiveDamage e OnPlayerTakeDamage



    Simplesmente falando, ele detecta o tiro acertado nas partes do corpo.

    SISTEMA DE HEADSHOT
    pawn Код:

    Código:
    public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
    {
        if(bodypart == BODY_PART_HEAD) // Detecta se acertou a cabeзa do PLAYER
        {
            SetPlayerHealth(playerid, 0); // Seta vida 0, morre na hora!
            new
                Recebeu[MAX_PLAYER_NAME],
                Deu[MAX_PLAYER_NAME],
                CelulasJFS[100]
            ;
            GetPlayerName(playerid, Recebeu, sizeof (Recebeu)), GetPlayerName(issuerid, Deu, sizeof (Deu));
            format(CelulasJFS, sizeof(CelulasJFS), "%s Levou um HS do player %s.", Recebeu, Deu);
            SendClientMessageToAll(-1, CelulasJFS);
        }
        return 1;
    }


    // PS: Sistema nгo testado, qualquer erro sу avisar.

    Ouvi falar tambйm que tiraram o tiro no LAG agora nй? acho que nгo pensaram no JoyPad.
    Projeto e Dicas

    Eu vejo que o SAMP estб decaindo, mas eu irei ajudar de uma forma bem inteligente. Irei criar um site de Divulgaзгo de servidores reunindo mais de 10MIL visitas por semana. Ele irб contar com um sistema bem inovador. Atй a prуxima semana irei apresenta-lo melhor. E й claro, graзas ao Humor GTA.

    Agora, eu estou com preguiзa, mais eu espero que criem alguns sistemas inovadores com esse meu mini-tutorial, sendo eles sistema de tiro ao alvo, melhoramento de tirar vida do carro e sistema de apenas Bazuca pode destruir carros blindados dos COP.

    Ah, e eu nгo sumi. Sу me adicionar no Skype para contato.


    Creditos Jonathan Feitosa



    [Tutorial] Funcionalidades novas 0.3z RC D07Xwqb
    [Tutorial] Funcionalidades novas 0.3z RC Yjab9HN

      Data/hora atual: Dom 19 maio 2024 - 10:48