textdraw no se oculta :S
#1

Hola, tengo esto asi:

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
   
    if(PlayerToPoint(2.0,playerid,1759.9247,-1924.5101,13.5753))
    {
    TextDrawShowForPlayer(playerid, alt);
    }
    else
    {
    TextDrawHideForPlayer(playerid, alt);
    }
   
    return 1;
}
y cuando entro al checkpoint si se ve el textdraw, pero cuando salgo no se oculta el textdraw :S
Reply
#2

Mejor pone el CP sin funcion y en OnPLayerUpdate pones

pawn Код:
public OnPlayerUpdate(playerid)
{
   
    if(IsPlayerInRangeOfPoint(playerid,2.0,CORDEANDAS DEL CP))
    {
        TextDrawShowForPlayer(playerid, alt);
    }
    else
    {
        TextDrawHideForPlayer(playerid, alt);
    }
   
    return 1;
}
Edit:

Sino usa asi:

pawn Код:
public OnPlayerLeaveCheckpoint(playerid)
{
    TextDrawHideForPlayer(playerid, alt);
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{  
    if(PlayerToPoint(2.0,playerid,1759.9247,-1924.5101,13.5753))
    {
        TextDrawShowForPlayer(playerid, alt);
    }
    return 1;
}
Reply
#3

ok gracias
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)