Jump to content

Recommended Posts

Posted

#function UpdateProgress(playerid, bar) {
    if(PlayerInfo[playerid][pShowProgress][bar] == 0) return 1;
    new string[64];
    switch(bar) {
        case 0: {
            format(string, sizeof(string), "Level: %d-%d (%d/%d RP)", PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pLevel]+1, PlayerInfo[playerid][pExp], PlayerInfo[playerid][pLevel]*levelexp);
            PlayerTextDrawSetString(playerid, HudTD[bar], string);
            PlayerTextDrawShow(playerid, HudTD[bar]);
            SetPlayerProgressBarMaxValue(playerid, HudProgress[playerid][bar], PlayerInfo[playerid][pLevel]*levelexp);
            SetPlayerProgressBarValue(playerid, HudProgress[playerid][bar], PlayerInfo[playerid][pExp]);
            SetPlayerProgressBarColor(playerid, HudProgress[playerid][bar], GetHudColor3(PlayerInfo[playerid][pShowProgress][0]));    
        }
        case 1: {
            if(PlayerInfo[playerid][pJob] != 0) {
                new job = PlayerInfo[playerid][pJob]; 
                if(GetPlayerSkill(playerid) == 5) format(string, sizeof(string), "Job %s: Skill maxim (%d)", JobInfo[job][jName], GetPlayerSkill(playerid), JobPoints(playerid), GetNeedPoints(playerid, job));
                else format(string, sizeof(string), "Job %s: %d-%d (%d/%d)", JobInfo[job][jName], GetPlayerSkill(playerid), GetPlayerSkill(playerid)+1, JobPoints(playerid), GetNeedPoints(playerid, job));
                PlayerTextDrawSetString(playerid, HudTD[bar], string);
                PlayerTextDrawShow(playerid, HudTD[bar]);
                
                if(GetPlayerSkill(playerid) == 5) SetPlayerProgressBarMaxValue(playerid, HudProgress[playerid][bar], 0);
                else SetPlayerProgressBarMaxValue(playerid, HudProgress[playerid][bar], GetNeedPoints(playerid, job));
                
                SetPlayerProgressBarValue(playerid, HudProgress[playerid][bar], JobPoints(playerid));
                SetPlayerProgressBarColor(playerid, HudProgress[playerid][bar], GetHudColor3(PlayerInfo[playerid][pShowProgress][1]));    
            }
            else return DestroyProgress(playerid, bar);
        }
    }
    ShowPlayerProgressBar(playerid, HudProgress[playerid][bar]);
    return 1;
}
 

 

EORIRLE:

C:\Users\doaga\Desktop\blacknoir gm\gamemodes\doagaw.pwn(27228) : error 025: function heading differs from prototype
C:\Users\doaga\Desktop\blacknoir gm\gamemodes\doagaw.pwn(27228) : error 025: function heading differs from prototype
C:\Users\doaga\Desktop\blacknoir gm\gamemodes\doagaw.pwn(27228) : error 021: symbol already defined: "UpdateProgress"
C:\Users\doaga\Desktop\blacknoir gm\gamemodes\doagaw.pwn(27228) : fatal error 107: too many error messages on one line

Posted
#function UpdateProgress(playerid, bar) {

>>

forward UpdateProgress(playerid, bar);
public UpdateProgress(playerid, bar) {

 

Posted
1 hour ago, Pa4enka said:
#function UpdateProgress(playerid, bar) {

>>

forward UpdateProgress(playerid, bar);
public UpdateProgress(playerid, bar) {

 

what do u mean?

Posted

Replace your code section with my code.

I want to remove legacy from your code. This is important to get to the core of your problem.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.