[Ajuda] Textdraw apenas para o id 0
#1

Bem eu criei a seguinte public, e seteilhe um timer, estб tudo defenido sem problemas mas quando vou no jogo ele apenas mostra a textdraw para o jogador com id 0, enquanto que deveria mostrar para toda a gente de acordo com as condiзхes й claro!

Public:
pawn Код:
public MissionAd(playerid)
{
    if(GetPlayerSkin(playerid) == 277 || GetPlayerSkin(playerid) == 278 || GetPlayerSkin(playerid) == 279)    
    {
        TextDrawHideForPlayer(playerid, Textdraw0);
        TextDrawHideForPlayer(playerid, Textdraw1);        
        TextDrawHideForPlayer(playerid, Textdraw2);        
        TextDrawHideForPlayer(playerid, Textdraw3);
        if(IsPlayerOnMission[playerid] != 0)        
        {          
            new string[50];
            TextDrawSetString(Textdraw0, "Incendio");
            TextDrawShowForPlayer(playerid, Textdraw0);            
            format(string,sizeof(string),"Fogos: %d",Number);
            TextDrawSetString(Textdraw1, string);
            TextDrawShowForPlayer(playerid, Textdraw1);
            if(Location == 0)
            {
                TextDrawSetString(Textdraw2, "Pershing Square, Los Santos");
                TextDrawShowForPlayer(playerid, Textdraw2);                            
                SetPlayerCheckpoint(playerid,1488.9510,-1707.3540,15.1903,0.0);                
            }            
            else if(Location == 1)            
            {            
                TextDrawSetString(Textdraw2, "Red Country");                
                TextDrawShowForPlayer(playerid,Textdraw2);          
                SetPlayerCheckpoint(playerid,1925.5500,166.6042,30.7756,0.0);                
            }
            else
            {            
                TextDrawSetString(Textdraw2, "Unknown");                
                TextDrawShowForPlayer(playerid, Textdraw2);
            }
        }
        else
        {
            TextDrawSetString(Textdraw0, "Incendio");
            TextDrawShowForPlayer(playerid, Textdraw0);
            TextDrawSetString(Textdraw3, "Escreve /missao para mais info.")
            TextDrawShowForPlayer(playerid, Textdraw3)
            DisablePlayerCheckpoint(playerid);                  
        }
        if(Number == 0)
        {        
            TextDrawHideForPlayer(playerid, Textdraw0);
            TextDrawHideForPlayer(playerid, Textdraw1);        
            TextDrawHideForPlayer(playerid, Textdraw2);        
            TextDrawHideForPlayer(playerid, Textdraw3);            
            IsPlayerOnMission[playerid] = 0;
            DisablePlayerCheckpoint(playerid);            
        }          
    }
    else
    {
        TextDrawHideForPlayer(playerid, Textdraw0);
        TextDrawHideForPlayer(playerid, Textdraw1);        
        TextDrawHideForPlayer(playerid, Textdraw2);        
        TextDrawHideForPlayer(playerid, Textdraw3);
        IsPlayerOnMission[playerid] = 0;
        DisablePlayerCheckpoint(playerid);
    }    
    return 1;
}
Reply
#2

Provavelmente o problema estб aonde vocк estб chamando a public.
Reply
#3

Quote:
Originally Posted by Kuddy
Посмотреть сообщение
Provavelmente o problema estб aonde vocк estб chamando a public.
Eu estou a chamala na public onfilterscriptinit com um timer infinito
Reply
#4

pawn Код:
forward MissionAd();
public MissionAd()
{
     for(new i; i < MAX_PLAYERS; ++i)
     {
          //passe todos playerid para i.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)