[ajuda] 'Procurado' Attach3DTextLabelToPlayer
#1

Bem galerinha, criei aqui um codigo para que qndo o playes estiver sendo procurado, aparecer em cima dele o nome 'PROCURADO', mas qndo o player eh morto ou preзo, o nome nao esta desaparecendo. alguem pode me ajudar?

PHP код:
public OnPlayerUpdate(playerid)
{
    if(
IsPlayerConnected(playerid))
    {
// procurado em cima do nome
        
new Text3D:procurado[MAXPLAYERS];
        new 
procuradolevel GetPlayerWantedLevel(playerid);
        new 
Text3d[MAXPLAYERS];
        if(
procuradolevel 0)
        {
            if(
Text3d[playerid] == 0)
            {
                
Text3d[playerid] = 1;
                
procurado[playerid] = Create3DTextLabel("~x PROCURADO x~"COLOR_RED5.05.05.05.000);
                
Attach3DTextLabelToPlayer(procurado[playerid], playerid0.00.00.4);
            }
            
Update3DTextLabelText(procurado[playerid], COLOR_RED"~x PROCURADO x~");
        }
        if(
Text3d[playerid] == 1)
        {
            if(
procuradolevel == 0)
            {
                
Delete3DTextLabel(procurado[playerid]);
            }
            
Delete3DTextLabel(procurado[playerid]);
        }
//fim procurado em cima do nome 
Reply
#2

pawn Код:
#include <  a_samp  >

new Text3D:procurado [ MAX_PLAYERS ] ;
new Text3d [ MAX_PLAYERS ] ;

public OnPlayerUpdate ( playerid )
{
    if ( IsPlayerConnected ( playerid ) )
    {
        new procuradolevel = GetPlayerWantedLevel ( playerid ) ;
        if ( procuradolevel > 0 )
        {
            if ( Text3d [ playerid ] == 1)
            {
                Text3d [ playerid ] = 1 ;
                procurado [ playerid ] = Create3DTextLabel ( "~x PROCURADO x~", 0xFF0000AA , 5.0, 5.0, 5.0, 5.0, 0, 0 ) ;
                Attach3DTextLabelToPlayer ( procurado [ playerid ] , playerid , 0.0 , 0.0 , 0.4 ) ;
            }
            Update3DTextLabelText ( procurado [ playerid ] , 0xFF0000AA , "~x PROCURADO x~" ) ;
        }
        if ( Text3d [ playerid ] == 0 )
        {
            if ( procuradolevel == 0 )
            {
                Delete3DTextLabel ( procurado [ playerid ] ) ;
            }
            Delete3DTextLabel ( procurado [ playerid ] ) ;
        }
    }
    return 1 ;
}

public OnPlayerDeath ( playerid , killerid ) Delete3DTextLabel ( procurado [ playerid ] ) ;
Reply
#3

ow mano, coloquei desse jeito, mas nao esta criando o texto'-'
Reply
#4

pawn Код:
#include <  a_samp  >

new Text3D:procurado [ MAX_PLAYERS ] ;
new Text3d [ MAX_PLAYERS ] ;

public OnPlayerUpdate ( playerid )
{
    if ( IsPlayerConnected ( playerid ) )
    {
        new procuradolevel = GetPlayerWantedLevel ( playerid ) ;
        if ( procuradolevel > 0 )
        {
            if ( Text3d [ playerid ] == 1)
            {
                Text3d [ playerid ] = 1 ;
                procurado [ playerid ] = Create3DTextLabel ( "~x PROCURADO x~", 0xFF0000AA , 5.0, 5.0, 5.0, 5.0, 0, 0 ) ;
                Attach3DTextLabelToPlayer ( procurado [ playerid ] , playerid , 0.0 , 0.0 , 0.4 ) ;
            }
            Update3DTextLabelText ( procurado [ playerid ] , 0xFF0000AA , "~x PROCURADO x~" ) ;
        }
        if ( Text3d [ playerid ] == 0 )
        {
            if ( procuradolevel == 0 ) Delete3DTextLabel ( procurado [ playerid ] ) ;
            Delete3DTextLabel ( procurado [ playerid ] ) ;
            Text3d [ playerid ] = 0 ;
        }
    }
    return 1 ;
}

public OnPlayerDeath ( playerid , killerid ) Delete3DTextLabel ( procurado [ playerid ] ) ;
@Edit /\


Quote:
Originally Posted by BreakDriFT
Посмотреть сообщение
Se voce for o jogador procurado , voce nгo vai conseguir ver . apenas os outros jogadores !!
Reply
#5

Se voce for o jogador procurado , voce nгo vai conseguir ver . apenas os outros jogadores !!
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)