[Ajuda] Level pegando no NPC.
#5

Quote:
Originally Posted by [BOPE]Seu._.Madruga
Посмотреть сообщение
PHP код:

new Text3D:LevelPlayer[MAX_PLAYERS];
public 
OnGameModeInit()
{
    
SetTimer("UpdateLabel"20000true);
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
    new 
str[256];
    if(!
IsPlayerNPC(playerid)) {
        
format(str,sizeof(str),"Level: %d"Player[playerid][pLevel]);
        
LevelPlayer[playerid] = Create3DTextLabel(str, -130.040.050.040.00);
        
Attach3DTextLabelToPlayer(LevelPlayer[playerid], playerid ,0.00.00.7);
    }
    return 
1;
}
public 
OnPlayerDisconnect(playeridreason)
{
    
Delete3DTextLabel(LevelPlayer[playerid]);
    return 
1;
}
stock UpdateLabel() {
    new 
str[256];
    for(new 
0MAX_PLAYERS; ++i) {
        if(!
IsPlayerNPC(i)) {
            
format(str,sizeof(str),"Level: %d",Player[i][pLevel]);
            
Update3DTextLabelText(LevelPlayer[i], COR_BRANCO,str);
        }
    }

funfou quase perfeitamente, apenas o level do player que nгo estб atualizando, apenas quando ele reloga ae aparece lv 15, e como se estivesse duas Create3DTextLabel uma por cima da outra.
Reply


Messages In This Thread
Level pegando no NPC. - by JhefTFJ - 08.04.2017, 00:29
Re: Level pegando no NPC. - by HoodScript - 08.04.2017, 00:43
Re: Level pegando no NPC. - by [BOPE]Seu._.Madruga - 08.04.2017, 00:45
Re: Level pegando no NPC. - by [BOPE]Seu._.Madruga - 08.04.2017, 00:52
Re: Level pegando no NPC. - by JhefTFJ - 08.04.2017, 01:17

Forum Jump:


Users browsing this thread: 2 Guest(s)