21.11.2018, 08:10
(
Последний раз редактировалось zowzow; 21.11.2018 в 09:49.
)
PHP код:
forward PlayerCheck();
public PlayerCheck()
{
static
str[128];
foreach (new i : Player)
{
new exp_max = 50 + (Player[playerid][Level] - 2) * 50 + 50;
format(str, sizeof(str), "%d", PlayerInfo[i][pLevel]);
PlayerTextDrawSetString(i, pTextDraws[i][4], str);
format(str, sizeof(str), "(%d%c)", PlayerInfo[i][pExp], '%');
PlayerTextDrawSetString(i, pTextDraws[i][3], str);
PlayerTextDrawTextSize(i, pTextDraws[i][1], PlayerInfo[i][pExp]*1.09, 15.749994); // max progress = 109.559906
PlayerTextDrawShow(i, pTextDraws[i][1]);
if(PlayerInfo[i][pExp] >= exp_max)
{
PlayerTextDrawTextSize(i, pTextDraws[i][1], 0.0, 15.749994);
PlayerTextDrawShow(i, pTextDraws[i][1]);
PlayerInfo[i][pLevel]++;
PlayerInfo[i][pExp] = 0;
}
}
return 1;
}
Level 1 = 50 exp and *2 after every next level