[AJUDA] TextDraw Diferente para cada player
#2

Tenta assim.

PHP код:
new Text:Coisa[MAX_PLAYERS];

public 
OnFilterScriptInit()
{
    
SetTimer("Killstreak"5000true);
    for(new 
0iMAX_PLAYERS i++)
    {
        
Coisa[i] = TextDrawCreate(160.000000360.000000"__");
        
TextDrawBackgroundColor(Coisa255);
        
TextDrawFont(Coisa[i], 1);
        
TextDrawLetterSize(Coisa[i], 0.3000001.000000);
        
TextDrawColor(Coisa[i], -1);
        
TextDrawSetOutline(Coisa[i], 1);
        
TextDrawSetProportional(Coisa[i], 1);
        
TextDrawUseBox(Coisa[i], 0);
        
TextDrawBoxColor(Coisa[i], 255);
        
TextDrawTextSize(Coisa[i], 620.0000000.000000);
        
TextDrawShowForPlayer(playeridCoisa[i]);
    }
    return 
true;
}

public 
OnPlayerConnect(playerid)
{
   
TextDrawShowForPlayer(playerid,  Coisa[playerid]);
   return 
true;
}

public 
OnFilterScriptExit()
{
   
TextDrawHideForAll(Coisa[playerid]);
   
TextDrawDestroy(Coisa[playerid]);
   return 
true;
}

forward Killstreak();
public 
Killstreak()
{
    for(new 
playerid 0playerid MAX_PLAYERSplayerid ++)
    {
        if(
IsPlayerConnected(playerid))
        {
                new 
str[128];
                new 
lvl2;
                new 
lvl = (pDataInfo[playerid][Matou]+pDataInfo[playerid][Kills]-lvl2/5)/5;
                if(
lvl 0)
                {
                    
lvl2=0;
                }
                else 
lvl2=lvl;
                
format(str128"~w~Info /score /vip : ~n~~g~Matou: ~w~%d ~n~~g~Morreu: ~w~%d ~n~~y~Respeito: ~w~%d ~n~~b~Score: ~w~%d" pDataInfo[playerid][Matou]+ pDataInfo[playerid][Kills], pDataInfo[playerid][Morreu]+ pDataInfo[playerid][Deaths], pDataInfo[playerid][Matou]+ pDataInfo[playerid][Kills]-(5*lvl2), lvl2);
                
TextDrawSetString(Text:Coisa[playerid], str);
                return 
true;
        }
        return 
true;
    }
    return 
true;

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)