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.

    OnPlayerClickPlayerTextDraw

    Weslley_Script
    Weslley_Script
    SS - Fundador
    SS - Fundador


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

    OnPlayerClickPlayerTextDraw Empty OnPlayerClickPlayerTextDraw

    Mensagem por Weslley_Script Seg 3 Abr 2023 - 15:42

    Descrição:
    Este retorno de chamada é chamado quando um jogador clica em um player-textdraw. Não é chamado quando o jogador cancela o modo de seleção (ESC) - no entanto, OnPlayerClickTextDraw é.

    Parâmetros:
    (playerid, PlayerText:playertextid)
    ID do jogador O ID do jogador que selecionou um textdraw
    playertextid O ID do player-textdraw que o jogador selecionou.

    Valores de retorno:
    Retornar 1/true neste retorno de chamada impedirá que ele seja chamado em outros scripts. Isso deve ser usado para sinalizar que o textdraw no qual eles clicaram foi 'encontrado' e nenhum processamento adicional é necessário. Você deve retornar 0/false se o textdraw no qual eles clicaram não foi encontrado, assim como em OnPlayerCommandText .
    Ele é sempre chamado primeiro em filterscripts, portanto, retornar 1 também bloqueia outros scripts de vê-lo.

    Exemplo de uso:

    Código:
    new  PlayerText :gPlayerTextDraw [ MAX_PLAYERS ] ;

    Código:
    public  OnPlayerConnect ( playerid )
    {
        // Cria o textdraw
        gPlayerTextDraw [ playerid ] = CreatePlayerTextDraw ( playerid, 10.000000 , 141.000000 , "MyTextDraw" ) ;
        PlayerTextDrawTextSize ( playerid, gPlayerTextDraw [ playerid ] , 60.000000 , 20.000000 ) ;
        PlayerTextDrawAlignment ( playerid, gPlayerTextDraw [ playerid ] , 0 ) ;
        PlayerTextDrawBackgroundColor ( playerid, gPlayerTextDraw [ playerid ] , 0x000000ff ) ;
        PlayerTextDrawFont ( playerid, gPlayerTextDraw [ playerid ] , 1 ) ;
        PlayerTextDrawLetterSize ( playerid, gPlayerTextDraw [ playerid ] , 0,250000 , 1,000000 ) ;
        PlayerTextDrawColor ( playerid, gPlayerTextDraw [ playerid ] , 0xffffffff ) ;
        PlayerTextDrawSetProportional ( playerid, gPlayerTextDraw [ playerid ] , 1 ) ;
        PlayerTextDrawSetShadow ( playerid, gPlayerTextDraw [ playerid ] , 1 ) ;
     
        // Torna selecionável
        PlayerTextDrawSetSelectable ( playerid, gPlayerTextDraw [ playerid ] , 1 ) ; 
     
        // Mostra para o player
        PlayerTextDrawShow ( playerid, gPlayerTextDraw [ playerid ] ) ;
        retornar  1 ;
    }

    Código:
    public  OnPlayerKeyStateChange ( playerid, newkeys, oldkeys )
    {
        if ( newkeys == KEY_SUBMISSION )
        {
            SelectTextDraw ( playerid, 0xFF4040AA ) ;
        }
        retorna  1 ;
    }

    Código:
    public OnPlayerClickPlayerTextDraw ( playerid, PlayerText :playertextid )
    {
        if ( playertextid == gPlayerTextDraw [ playerid ] )
        {
            SendClientMessage ( playerid, 0xFFFFFFAA, "Você clicou em um desenho de texto." ) ;
            CancelSelectTextDraw ( playerid ) ;
            retornar  1 ;
        }
        retorna  0 ;
    }

    Código:
    Imagem:32px-Circle-style-warning.png

    Nota importante

    Quando um jogador pressiona ESC para cancelar a seleção de um textdraw,

    Creditos: WIKI SA-MP



    OnPlayerClickPlayerTextDraw D07Xwqb
    OnPlayerClickPlayerTextDraw Yjab9HN

      Data/hora atual: Sex 17 maio 2024 - 0:38