How can I convert exp to percentage?
#1

PHP код:
forward PlayerCheck();
public 
PlayerCheck()
{
    static
        
str[128];
        
    foreach (new 
Player)
    {
        new 
exp_max 50 + (Player[playerid][Level] - 2) * 50 50;
        
        
format(strsizeof(str), "%d"PlayerInfo[i][pLevel]);
        
PlayerTextDrawSetString(ipTextDraws[i][4], str);
        
format(strsizeof(str), "(%d%c)"PlayerInfo[i][pExp], '%');
        
PlayerTextDrawSetString(ipTextDraws[i][3], str);
        
PlayerTextDrawTextSize(ipTextDraws[i][1], PlayerInfo[i][pExp]*1.0915.749994);  // max progress = 109.559906
        
        
PlayerTextDrawShow(ipTextDraws[i][1]);
        if(
PlayerInfo[i][pExp] >= exp_max)
        {
            
PlayerTextDrawTextSize(ipTextDraws[i][1], 0.015.749994);
            
PlayerTextDrawShow(ipTextDraws[i][1]);
            
PlayerInfo[i][pLevel]++;
            
PlayerInfo[i][pExp] = 0;
        }
    }
    return 
1;

Here is the code
Level 1 = 50 exp and *2 after every next level
Reply


Messages In This Thread
How can I convert exp to percentage? - by zowzow - 21.11.2018, 08:10
Re: How can I convert exp to percentage? - by PT - 21.11.2018, 12:45
Re: How can I convert exp to percentage? - by Joe Staff - 21.11.2018, 13:31
Re: How can I convert exp to percentage? - by zowzow - 21.11.2018, 17:22
Re: How can I convert exp to percentage? - by Cheryl666 - 21.11.2018, 17:47

Forum Jump:


Users browsing this thread: 1 Guest(s)