18/12/2020 08:58
(Esta mensagem foi modificada pela última vez a: 18/12/2020 09:03 por guikommander2.)
Eu tinha esse mesmo problema. Fiz dessa forma:
(OBS: é só um exemplo, adapte ao seu código)
Código PHP:
#define CreatePlayerTextDraw(%0,%1,%2,%3) \
PlayerTextDrawCreateEx(%0,%1,%2,%3)
new Float:PosicoesPTD[MAX_PLAYERS][PlayerText:MAX_PLAYER_TEXTDRAWS][2];
stock PlayerText:PlayerTextDrawCreateEx(playerid, Float:tdX, Float:tdY, text[])
{
#undef CreatePlayerTextDraw
new PlayerText:playertextid = CreatePlayerTextDraw(playerid, tdX, tdY, text);
PosicoesPTD[playerid][PlayerText:playertextid][0] = tdX;
PosicoesPTD[playerid][PlayerText:playertextid][1] = tdY;
#define CreatePlayerTextDraw(%0,%1,%2,%3) PlayerTextDrawCreateEx(%0,%1,%2,%3)
return playertextid;
}
if(IsPlayerAndroid(playerid))
{
Loop(i, sizeof(PTDVelocimetro[]))
{
new PlayerText:ptd = PTDVelocimetro[playerid][i];
if(0 <= i <= 4) PlayerTextDrawSetPos(playerid, ptd, PosicoesPTD[playerid][ptd][0] + 70.0, PosicoesPTD[playerid][ptd][1]);
else PlayerTextDrawSetPos(playerid, ptd, PosicoesPTD[playerid][ptd][0] - 70.0, PosicoesPTD[playerid][ptd][1]);
}
}
else
{
Loop(i, sizeof(PTDVelocimetro[]))
{
new PlayerText:ptd = PTDVelocimetro[playerid][i];
PlayerTextDrawSetPos(playerid, ptd, PosicoesPTD[playerid][ptd][0], PosicoesPTD[playerid][ptd][1]);
}
}
(OBS: é só um exemplo, adapte ao seu código)