23.05.2012, 11:29
Hi,
I have a problem,
ID 0 sees the speedo perfectly, but ID 1 sees in double, ID 3 in triple, etc..
Here the ID 5 screenshot for example:
http://www.noelshack.com/2012-21-133...-sa-mp-094.png
Here my script:
IN THE TOP:
the array [6] is for some decor of my speedo
The Timer:
Under OnPlayerConnect I create textdraw for player:
What's wrong please ?
Thanks and Have a nice day
I have a problem,
ID 0 sees the speedo perfectly, but ID 1 sees in double, ID 3 in triple, etc..
Here the ID 5 screenshot for example:
http://www.noelshack.com/2012-21-133...-sa-mp-094.png
Here my script:
IN THE TOP:
pawn Код:
new PlayerText:speedo[MAX_PLAYERS][6];
The Timer:
pawn Код:
public Speedometer()
{
new fstring[32], string[512];
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
// I have other stuff here, but i have comment them
format(fstring,sizeof(fstring),"~n~Km/h: ~w~%d", GetPlayerSpeed(i, true));
strcat(string, fstring, sizeof(string));
PlayerTextDrawSetString(i, speedo[i][5], string);
}
}
}
pawn Код:
speedo[playerid][5] = CreatePlayerTextDraw(playerid,436.000000, 319.000000, " ");
PlayerTextDrawBackgroundColor(playerid,speedo[playerid][5], 255);
PlayerTextDrawFont(playerid,speedo[playerid][5], 1);
PlayerTextDrawLetterSize(playerid,speedo[playerid][5], 0.470000, 1.400000);
PlayerTextDrawColor(playerid,speedo[playerid][5], -1);
PlayerTextDrawSetOutline(playerid,speedo[playerid][5], 0);
PlayerTextDrawSetProportional(playerid,speedo[playerid][5], 1);
PlayerTextDrawSetShadow(playerid,speedo[playerid][5], 1);
What's wrong please ?
Thanks and Have a nice day