[Ajuda] Veja se estou CERTO
#1

pawn Код:
new Text:TextdrawPing2;

TextDrawShowForPlayer(playerid, TextdrawPing2);

SetTimer("Ping2", 300, 1);

    TextdrawPing2 = TextDrawCreate(560.000000, 400.000000, "-");
TextDrawBackgroundColor(TextdrawPing2, 255);
TextDrawFont(TextdrawPing2, 1);
TextDrawLetterSize(TextdrawPing2, 0.500000, 1.000000);
TextDrawColor(TextdrawPing2, -1);
TextDrawSetOutline(TextdrawPing2, 0);
TextDrawSetProportional(TextdrawPing2, 1);
TextDrawSetShadow(TextdrawPing2, 1);

forward Ping2(giveplayerid);
public Ping2(giveplayerid)
{
    new str[128];
    format(str, sizeof(str), "~p~Ping:~y~%d", GetPlayerPing(giveplayerid));
    TextDrawSetString(TextdrawPing2, str);
    return true;
}
o Ping so fica do id 0
Reply
#2

Crie um loop, talvez resolva.
Reply
#3

Tente Adpitar ele ao seu Gamemode !

pawn Код:
new Text:Ping[MAX_PLAYERS];

    for(new i=0; i < MAX_PLAYERS; i++){
    Ping[i] = TextDrawCreate(560.000000, 400.000000, " ");
    TextDrawBackgroundColor(Ping[i], 255);
    TextDrawFont(Ping[i], 3);
    TextDrawLetterSize(Ping[i], 0.230000, 1.400000);
    TextDrawColor(Ping[i], -1);
    TextDrawSetOutline(Ping[i], 0);
    TextDrawSetOutline(Ping[i], 1);
    TextDrawSetProportional(Ping[i], 1);

public OnPlayerSpawn(playerid)
{
    new VVString[128];
    format( VVString, sizeof VVString, "~w~Ping:~r~ %d/1200", GetPlayerPing(playerid));
    TextDrawSetString(Ping[playerid], VVString);
    TextDrawShowForPlayer( playerid, Ping[playerid] );
    return 1;
}

public OnPlayerUpdate(playerid)
{
    new VVString[128];
    format( VVString, sizeof VVString, "~w~Ping:~r~ %d/1200", GetPlayerPing(playerid));
    TextDrawSetString(Ping[playerid], VVString);
    TextDrawShowForPlayer( playerid, Ping[playerid] );
    return 1;
}

//-----------------------------------------------------------------------------------------------//

new Text:TextdrawPing2[MAX_PLAYERS];

TextDrawShowForPlayer(playerid, TextdrawPing2[playerid]);

SetTimer("Ping2", 300, 1);

for(new playerid=0; playerid < MAX_PLAYERS; playerid++){
TextdrawPing2[playerid] = TextDrawCreate(560.000000, 400.000000, "-");
TextDrawBackgroundColor(TextdrawPing2[playerid], 255);
TextDrawFont(TextdrawPing2[playerid], 1);
TextDrawLetterSize(TextdrawPing2[playerid], 0.500000, 1.000000);
TextDrawColor(TextdrawPing2[playerid], -1);
TextDrawSetOutline(TextdrawPing2[playerid], 0);
TextDrawSetProportional(TextdrawPing2[playerid], 1);
TextDrawSetShadow(TextdrawPing2[playerid], 1);

forward Ping2(giveplayerid);
public Ping2(giveplayerid)
{
    new str[128];
    format(str, sizeof(str), "~p~Ping:~y~%d", GetPlayerPing(giveplayerid));
    TextDrawSetString(TextdrawPing2[playerid], str);
    return true;
}
Em Caso de Dъvidas manda Msg por Privado ^_^
Reply
#4

[QUOTE=VivendoVirtual;2562782]
pawn Код:
new Text:Ping[MAX_PLAYERS]; //PING

    for(new i=0; i < MAX_PLAYERS; i++){
    Ping[i] = TextDrawCreate(560.000000, 400.000000, " ");
    TextDrawBackgroundColor(Ping[i], 255);
    TextDrawFont(Ping[i], 3);
    TextDrawLetterSize(Ping[i], 0.230000, 1.400000);
    TextDrawColor(Ping[i], -1);
    TextDrawSetOutline(Ping[i], 0);
    TextDrawSetOutline(Ping[i], 1);
    TextDrawSetProportional(Ping[i], 1);

public OnPlayerSpawn(playerid)
{
    new VVString[128];
    format( VVString, sizeof VVString, "~w~Ping:~r~ %d/1200", GetPlayerPing(playerid));
    TextDrawSetString(Ping[playerid], VVString);
    TextDrawShowForPlayer( playerid, Ping[playerid] );
    return 1;
}

public OnPlayerUpdate(playerid)
{
    new VVString[128];
    format( VVString, sizeof VVString, "~w~Ping:~r~ %d/1200", GetPlayerPing(playerid));
    TextDrawSetString(Ping[playerid], VVString);
    TextDrawShowForPlayer( playerid, Ping[playerid] );
    return 1;
}

Seu

new Text:TextdrawPing2[MAX_PLAYERS];

TextDrawShowForPlayer(playerid, TextdrawPing2[MAX_PLAYERS]);

SetTimer("Ping2", 300, 1);

for(new playerid=0; playerid < MAX_PLAYERS; playerid++){
TextdrawPing2[playerid] = TextDrawCreate(560.000000, 400.000000, "-");
TextDrawBackgroundColor(TextdrawPing2[playerid], 255);
TextDrawFont(TextdrawPing2[playerid], 1);
TextDrawLetterSize(TextdrawPing2[playerid], 0.500000, 1.000000);
TextDrawColor(TextdrawPing2[playerid], -1);
TextDrawSetOutline(TextdrawPing2[playerid], 0);
TextDrawSetProportional(TextdrawPing2[playerid], 1);
TextDrawSetShadow(TextdrawPing2[playerid], 1);

forward Ping2(giveplayerid);
public Ping2(giveplayerid)
{
    new str[128];
    format(str, sizeof(str), "~p~Ping:~y~%d", GetPlayerPing(giveplayerid));
    TextDrawSetString(TextdrawPing2[playerid], str);
    return true;
}
Esta errado o seu, Use playertextdraw.
Reply
#5

Editado o Poste !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)