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] Criando ProgressBar By. Paulo

    Weslley_Script
    Weslley_Script
    SS - Fundador
    SS - Fundador


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

    [Tutorial] Criando ProgressBar By. Paulo Empty [Tutorial] Criando ProgressBar By. Paulo

    Mensagem por Weslley_Script Sáb 3 Jun 2023 - 10:10

    Minha 1° Video Aula para o Forum SA-MP.


    Nгo tem muito o que falar, vejam o Video e Comentem!!




    pawn Код:


    Código:
    #define pSpeed 100 //Velocidade da Barra em Ms
    new Text: pTd[3];

    public OnGameModeInit() {
        SetGameModeText("Blank Script");
        AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
       
        pTd[0] = TextDrawCreate(38.000000, 320.000000, "_"); //Fundo Preto
        TextDrawLetterSize(pTd[0], 0.500000, 1.100000);
        TextDrawUseBox(pTd[0], 1);
        TextDrawBoxColor(pTd[0], 255);
        TextDrawTextSize(pTd[0], 142.000000, 0.000000);

        pTd[1] = TextDrawCreate(39.000000, 322.000000, "_"); //Fundo da Progress
        TextDrawLetterSize(pTd[1], 0.500000, 0.699999);
        TextDrawUseBox(pTd[1], 1);
        TextDrawBoxColor(pTd[1], (0x99 | (~0xFF & 0xFF0000FF)));
        TextDrawTextSize(pTd[1], 141.000000, 0.000000);

        pTd[2] = TextDrawCreate(39.000000, 322.000000, "_"); //Progress
        TextDrawLetterSize(pTd[2], 0.500000, 0.699999);
        TextDrawUseBox(pTd[2], 1);
        TextDrawBoxColor(pTd[2], 0xFF0000FF);
        TextDrawTextSize(pTd[2], 36.000000, 0.000000); //102px
        return 1;
    }

    forward ProgrecoBar(playerid);
    public ProgrecoBar(playerid) {
        static Float: Progress;
        TextDrawTextSize(pTd[2], (39.0 + ((102.0 * ++Progress) / 100)), 0.0);
        TextDrawShowForPlayer(playerid, pTd[2]);
        if(Progress < 100.0) SetTimerEx("ProgrecoBar", pSpeed, false, "i", playerid);
        //else - Terminou o Progresso.
        return 1;
    }

    public OnPlayerConnect(playerid) {
        TextDrawShowForPlayer(playerid, pTd[0]);
        TextDrawShowForPlayer(playerid, pTd[1]);
        TextDrawShowForPlayer(playerid, pTd[2]);
        return 1;
    }

    public OnPlayerCommandText(playerid, cmdtext[]) {
        if(!strcmp("/iniciar", cmdtext)) {
            SetTimerEx("ProgrecoBar", pSpeed, false, "i", playerid);
            SendClientMessage(playerid, -1, "Progresso Iniciado!!");
            return 1;
        }
        return 0;
    }


    Espero que Gostem!!


    Creditos: Paulo



    [Tutorial] Criando ProgressBar By. Paulo D07Xwqb
    [Tutorial] Criando ProgressBar By. Paulo Yjab9HN

      Data/hora atual: Qui 9 maio 2024 - 0:46