[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.