//Player ProgressBar
new PlayerBar:Bar0[MAX_PLAYERS] = {INVALID_PLAYER_BAR_ID};
new PlayerBar:Bar1[MAX_PLAYERS] = {INVALID_PLAYER_BAR_ID};
new PlayerBar:Bar2[MAX_PLAYERS] = {INVALID_PLAYER_BAR_ID};
new PlayerBar:Bar3[MAX_PLAYERS] = {INVALID_PLAYER_BAR_ID};
new PlayerBar:Bar4[MAX_PLAYERS] = {INVALID_PLAYER_BAR_ID};
new PlayerBar:PB[MAX_PLAYERS] = {INVALID_PLAYER_BAR_ID};
// Player Textdraws
new PlayerText:Arrow[MAX_PLAYERS][5] = {PlayerText:INVALID_TEXT_DRAW, ...};
new PlayerText:EXPSkillCount[MAX_PLAYERS][5] = {PlayerText:INVALID_TEXT_DRAW, ...};
new PlayerText:SkillTD[MAX_PLAYERS][6] = {PlayerText:INVALID_TEXT_DRAW, ...};
new PlayerText:RoundStatsString[MAX_PLAYERS][11] = {PlayerText:INVALID_TEXT_DRAW, ...};
new PlayerText:WeedTexts[MAX_PLAYERS][4] = {PlayerText:INVALID_TEXT_DRAW, ...};
new PlayerText:SpreeT[MAX_PLAYERS][2] = {PlayerText:INVALID_TEXT_DRAW, ...};
new PlayerText:PlayerKill[MAX_PLAYERS][2] = {PlayerText:INVALID_TEXT_DRAW, ...};
new PlayerText:MultiKill[MAX_PLAYERS][2] = {PlayerText:INVALID_TEXT_DRAW, ...};
new PlayerText:SpecText[MAX_PLAYERS][4] = {PlayerText:INVALID_TEXT_DRAW, ...};
new PlayerText:ExpTexts[MAX_PLAYERS][2] = {PlayerText:INVALID_TEXT_DRAW, ...};
new PlayerText:SBText[MAX_PLAYERS][4] = {PlayerText:INVALID_TEXT_DRAW, ...};
new PlayerText:PlayerMainText1[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...};
new PlayerText:PlayerMainText2[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...};
new PlayerText:PlayerMainText3[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...};
new PlayerText:PlayerMainText4[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...};
DestroyRegisterTextdraws(playerid);
DestroyWeedTextDraws(playerid);
DestroyRoundStatsTextDraws(playerid);
DestroyPlayerKillTextDraws(playerid);
DestroyMultiKillTextDraws(playerid);
DestroySpreeTextDraws(playerid);
DestroySkillTextDraw(playerid);
DestroySkillBar(playerid);
DestroyEXPSkillCount(playerid);
DestroyArrows(playerid);
Destroy******TextDraws(playerid);
DestroyEXPBar(playerid);
DestroyWatchTexts(playerid);
DestroyMainText(playerid);
DestroyArrows(playerid)
{
PlayerTextDrawHide(playerid,Arrow[playerid][0]);
PlayerTextDrawHide(playerid,Arrow[playerid][1]);
PlayerTextDrawHide(playerid,Arrow[playerid][2]);
PlayerTextDrawHide(playerid,Arrow[playerid][3]);
PlayerTextDrawHide(playerid,Arrow[playerid][4]);
PlayerTextDrawDestroy(playerid,Arrow[playerid][0]);
PlayerTextDrawDestroy(playerid,Arrow[playerid][1]);
PlayerTextDrawDestroy(playerid,Arrow[playerid][2]);
PlayerTextDrawDestroy(playerid,Arrow[playerid][3]);
PlayerTextDrawDestroy(playerid,Arrow[playerid][4]);
Arrow[5][playerid] = PlayerText:INVALID_TEXT_DRAW;
}
DestroyMainText(playerid)
{
PlayerTextDrawDestroy(playerid, PlayerMainText1[playerid]);
PlayerTextDrawDestroy(playerid, PlayerMainText2[playerid]);
PlayerTextDrawDestroy(playerid, PlayerMainText3[playerid]);
PlayerTextDrawDestroy(playerid, PlayerMainText4[playerid]);
PlayerMainText1[playerid] = PlayerText:INVALID_TEXT_DRAW;
PlayerMainText2[playerid] = PlayerText:INVALID_TEXT_DRAW;
PlayerMainText3[playerid] = PlayerText:INVALID_TEXT_DRAW;
PlayerMainText4[playerid] = PlayerText:INVALID_TEXT_DRAW;
}
DestroyRoundStatsTextDraws(playerid)
{
PlayerTextDrawHide(playerid, RoundStatsString[playerid][0]);
PlayerTextDrawHide(playerid, RoundStatsString[playerid][1]);
PlayerTextDrawHide(playerid, RoundStatsString[playerid][2]);
PlayerTextDrawHide(playerid, RoundStatsString[playerid][3]);
PlayerTextDrawHide(playerid, RoundStatsString[playerid][4]);
PlayerTextDrawHide(playerid, RoundStatsString[playerid][5]);
PlayerTextDrawHide(playerid, RoundStatsString[playerid][6]);
PlayerTextDrawHide(playerid, RoundStatsString[playerid][7]);
PlayerTextDrawHide(playerid, RoundStatsString[playerid][8]);
PlayerTextDrawHide(playerid, RoundStatsString[playerid][9]);
PlayerTextDrawHide(playerid, RoundStatsString[playerid][10]);
PlayerTextDrawDestroy(playerid, RoundStatsString[playerid][0]);
PlayerTextDrawDestroy(playerid, RoundStatsString[playerid][1]);
PlayerTextDrawDestroy(playerid, RoundStatsString[playerid][2]);
PlayerTextDrawDestroy(playerid, RoundStatsString[playerid][3]);
PlayerTextDrawDestroy(playerid, RoundStatsString[playerid][4]);
PlayerTextDrawDestroy(playerid, RoundStatsString[playerid][5]);
PlayerTextDrawDestroy(playerid, RoundStatsString[playerid][6]);
PlayerTextDrawDestroy(playerid, RoundStatsString[playerid][7]);
PlayerTextDrawDestroy(playerid, RoundStatsString[playerid][8]);
PlayerTextDrawDestroy(playerid, RoundStatsString[playerid][9]);
PlayerTextDrawDestroy(playerid, RoundStatsString[playerid][10]);
RoundStatsString[11][playerid] = PlayerText:INVALID_TEXT_DRAW;
}
/* Account Management */
new Query[256];
format(Query, sizeof(Query),"SELECT * FROM `players` WHERE Name = '%s'", GetName(playerid));
mysql_query(MySQL, Query);
mysql_store_result();
if(mysql_num_rows() != 0) {
PlayerTextDrawSetString(playerid, PlayerMainText1[playerid], "Your account is ~g~Registered~n~~w~~h~Click on 'Sign in' to sign in.");
PlayerTextDrawSetString(playerid, PlayerMainText2[playerid], "~w~ LOG IN ACCOUNT");
} else {
PlayerTextDrawSetString(playerid, PlayerMainText1[playerid], "Your account is ~y~not registered~n~~w~~h~Click on 'Register' to register.");
PlayerTextDrawSetString(playerid, PlayerMainText2[playerid], "~w~ REGISTER ACCOUNT");
}
SecurityStuff(playerid); ******Reports = false; KickInfo(playerid); PlayerTextDrawSetString(playerid, SBText[playerid][1],"System kicked you for~n~~n~~n~~n~~n~ Please remove it"); Kick(playerid);
CMD:skills(playerid,params[])
{
if(SkillShowing[playerid] == 1)
{
SkillShowing[playerid] = 0;
HideSkillTextDraw(playerid);
HideSkillBar(playerid);
HideEXPSkillCount(playerid);
HideArrows(playerid);
CancelSelectTextDraw(playerid);
return 1;
}
else
{
SkillShowing[playerid] = 1;
SendClientMessage(playerid, -1, "Use {FF0000}/skills{FFFFFF} again to hide the Textdraws or click on the {FF0000}red X.");
SelectTextDraw(playerid, 0x00FF00FF); // Highlight green when hovering over
ShowSkillBar(playerid);
ShowSkillTextDraw(playerid);
ShowArrows(playerid);
SetPlayerProgressBarValue(playerid,Bar0[playerid],pData[playerid][P_DoubleEXP]*20);
new string[5];
format(string,sizeof(string),"%d%",20*pData[playerid][P_DoubleEXP]);
PlayerTextDrawSetString(playerid, EXPSkillCount[playerid][0], string);
switch(pData[playerid][P_DoubleEXP])
{
case 5:SetPlayerProgressBarColour(playerid, Bar0[playerid], 0x008000FF);
case 4:SetPlayerProgressBarColour(playerid, Bar0[playerid], 0x80FF00FF);
case 3:SetPlayerProgressBarColour(playerid, Bar0[playerid], 0xFFFF00FF);
case 2:SetPlayerProgressBarColour(playerid, Bar0[playerid], 0xFF8000FF);
case 1:SetPlayerProgressBarColour(playerid, Bar0[playerid], 0xFF0000FF);
case 0:SetPlayerProgressBarColour(playerid, Bar0[playerid], 0xC0C0C0FF);
}
SetPlayerProgressBarValue(playerid,Bar1[playerid],pData[playerid][P_DoubleWeed]*20);
format(string,sizeof(string),"%d%",20*pData[playerid][P_DoubleWeed]);
PlayerTextDrawSetString(playerid, EXPSkillCount[playerid][1], string);
switch(pData[playerid][P_DoubleWeed])
{
case 5:SetPlayerProgressBarColour(playerid, Bar1[playerid], 0x008000FF);
case 4:SetPlayerProgressBarColour(playerid, Bar1[playerid], 0x80FF00FF);
case 3:SetPlayerProgressBarColour(playerid, Bar1[playerid], 0xFFFF00FF);
case 2:SetPlayerProgressBarColour(playerid, Bar1[playerid], 0xFF8000FF);
case 1:SetPlayerProgressBarColour(playerid, Bar1[playerid], 0xFF0000FF);
case 0:SetPlayerProgressBarColour(playerid, Bar1[playerid], 0xC0C0C0FF);
}
SetPlayerProgressBarValue(playerid,Bar2[playerid],pData[playerid][P_DeathExplosion]*20);
format(string,sizeof(string),"%d%",20*pData[playerid][P_DeathExplosion]);
PlayerTextDrawSetString(playerid, EXPSkillCount[playerid][2], string);
switch(pData[playerid][P_DeathExplosion])
{
case 5:SetPlayerProgressBarColour(playerid, Bar2[playerid], 0x008000FF);
case 4:SetPlayerProgressBarColour(playerid, Bar2[playerid], 0x80FF00FF);
case 3:SetPlayerProgressBarColour(playerid, Bar2[playerid], 0xFFFF00FF);
case 2:SetPlayerProgressBarColour(playerid, Bar2[playerid], 0xFF8000FF);
case 1:SetPlayerProgressBarColour(playerid, Bar2[playerid], 0xFF0000FF);
case 0:SetPlayerProgressBarColour(playerid, Bar2[playerid], 0xC0C0C0FF);
}
SetPlayerProgressBarValue(playerid,Bar3[playerid],pData[playerid][P_ArmourSpawn]*20);
format(string,sizeof(string),"%d%",20*pData[playerid][P_ArmourSpawn]);
PlayerTextDrawSetString(playerid, EXPSkillCount[playerid][3], string);
switch(pData[playerid][P_ArmourSpawn])
{
case 5:SetPlayerProgressBarColour(playerid, Bar3[playerid], 0x008000FF);
case 4:SetPlayerProgressBarColour(playerid, Bar3[playerid], 0x80FF00FF);
case 3:SetPlayerProgressBarColour(playerid, Bar3[playerid], 0xFFFF00FF);
case 2:SetPlayerProgressBarColour(playerid, Bar3[playerid], 0xFF8000FF);
case 1:SetPlayerProgressBarColour(playerid, Bar3[playerid], 0xFF0000FF);
case 0:SetPlayerProgressBarColour(playerid, Bar3[playerid], 0xC0C0C0FF);
}
SetPlayerProgressBarValue(playerid,Bar4[playerid],pData[playerid][P_DoublePickUpHealth]*20);
format(string,sizeof(string),"%d%",20*pData[playerid][P_DoublePickUpHealth]);
PlayerTextDrawSetString(playerid, EXPSkillCount[playerid][4], string);
switch(pData[playerid][P_DoublePickUpHealth])
{
case 5:SetPlayerProgressBarColour(playerid, Bar4[playerid], 0x008000FF);
case 4:SetPlayerProgressBarColour(playerid, Bar4[playerid], 0x80FF00FF);
case 3:SetPlayerProgressBarColour(playerid, Bar4[playerid], 0xFFFF00FF);
case 2:SetPlayerProgressBarColour(playerid, Bar4[playerid], 0xFF8000FF);
case 1:SetPlayerProgressBarColour(playerid, Bar4[playerid], 0xFF0000FF);
case 0:SetPlayerProgressBarColour(playerid, Bar4[playerid], 0xC0C0C0FF);
}
ShowSkillBar(playerid);
ShowEXPSkillCount(playerid);
}
return 1;
}
if(pData[killerid][P_DoubleEXP] >= 1 && random(10) < pData[killerid][P_DoubleEXP])
{
//Player is Skill Level 1+ and double XP appeared
PlayerTextDrawShow(killerid, PlayerKill[killerid][0]);
PlayerTextDrawShow(killerid, PlayerKill[killerid][1]);
PlayerTextDrawSetString(killerid, PlayerKill[killerid][0], "+50");
PlayerTextDrawSetString(killerid, PlayerKill[killerid][1], "EXP(x2)");
SetTimerEx("KillTextdrawPlayerKill", 3000, false, "ii", killerid, 0);
GivePlayerExp(killerid, 50);
}
else
{
//Player is Skill Level 0 or the Double XP Chance didn't appear.
PlayerTextDrawShow(killerid, PlayerKill[killerid][0]);
PlayerTextDrawShow(killerid, PlayerKill[killerid][1]);
PlayerTextDrawSetString(killerid, PlayerKill[killerid][0], "+25");
PlayerTextDrawSetString(killerid, PlayerKill[killerid][1], "Killing");
SetTimerEx("KillTextdrawPlayerKill", 3000, false, "ii", killerid, 0);
GivePlayerExp(killerid, 25);
}
}
}
if(dialogid == D_UpgradeEXP)
{
if(response) //Yes
{
new string[5];
if(pData[playerid][P_DoubleEXP] >= 5)
{
SendClientMessage(playerid, COLOR_RED, "You've reached the maximum Skill already.");
SelectTextDraw(playerid, 0x00FF00FF);
return 1;
}
if(pData[playerid][P_SkillPoints] <1)
{
SelectTextDraw(playerid, 0x00FF00FF);
SendClientMessage(playerid, -1, "You need at least one {FF0000}Skill Point{FFFFFF} to be able to upgrade a Skill. {FF0000}Level up{FFFFFF} to gain Skill Points.");
return 1;
}
if(pData[playerid][P_Weed] < Upgrade_Price)
{
SelectTextDraw(playerid, 0x00FF00FF);
new missingweed[128];
format(missingweed, sizeof(missingweed),"You don't have {FF0000}enough{FFFFFF} weed, you need at least {FF0000}%dg weed.",Upgrade_Price);
SendClientMessage(playerid, -1, missingweed);
return 1;
}
SelectTextDraw(playerid, 0x00FF00FF);
HideSkillBar(playerid);
pData[playerid][P_DoubleEXP]++; //Updating Skill + 1 Level
format(string,sizeof(string),"%d%",20*pData[playerid][P_DoubleEXP]);
PlayerTextDrawSetString(playerid, EXPSkillCount[playerid][0], string); //Upgrade Percent Textdraw
SetPlayerProgressBarValue(playerid,Bar0[playerid],pData[playerid][P_DoubleEXP]*20); //Upgrading Bar
switch(pData[playerid][P_DoubleEXP])
{
case 5:SetPlayerProgressBarColour(playerid, Bar0[playerid], 0x008000FF);
case 4:SetPlayerProgressBarColour(playerid, Bar0[playerid], 0x80FF00FF);
case 3:SetPlayerProgressBarColour(playerid, Bar0[playerid], 0xFFFF00FF);
case 2:SetPlayerProgressBarColour(playerid, Bar0[playerid], 0xFF8000FF);
case 1:SetPlayerProgressBarColour(playerid, Bar0[playerid], 0xFF0000FF);
case 0:SetPlayerProgressBarColour(playerid, Bar0[playerid], 0xC0C0C0FF);
}
ShowSkillBar(playerid);
SendClientMessage(playerid, -1, "You've {00FF00}upgraded{FFFFFF} your {00FF00}EXP Skill Level!");
PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
//Price
pData[playerid][P_Weed] -= Upgrade_Price; //Taking weed
pData[playerid][P_SkillPoints]--; //Taking one Skill Point away
}
else
{
SelectTextDraw(playerid, 0x00FF00FF);
}
return 1;
}
if(!(Round[r_time][RTIME_MINUTES] <= 0 && Round[r_time][RTIME_SECONDS] <= 0))
{
new str[15];
format(str, sizeof(str), " ~w~%02d:%02d", Round[r_time][RTIME_MINUTES], Round[r_time][RTIME_SECONDS]);
TextDrawSetString(RoundTime, str);
return 1;
}
new str[15];
format(str, sizeof(str), " ~w~%02d:%02d", Round[r_time][RTIME_MINUTES], Round[r_time][RTIME_SECONDS]);
TextDrawSetString(RoundTime, str);
format(str, sizeof(str), "ARENA:~b~ %02d", Round[r_areaid]);
TextDrawSetString(ArenaTextID, str);
UpdateProgessBar(playerid) {
SetPlayerProgressBarValue(playerid, PB[playerid], pData[playerid][P_Exp] / (pData[playerid][P_MExp] / 1000));
new string[24];
format(string, sizeof string, "%d/%d", pData[playerid][P_Exp],pData[playerid][P_MExp]);
PlayerTextDrawSetString(playerid, ExpTexts[playerid][1], string);
PlayerTextDrawShow(playerid, ExpTexts[playerid][1]);
format(string, sizeof string, "Level: %d", pData[playerid][P_Level]);
PlayerTextDrawSetString(playerid, ExpTexts[playerid][0], string);
PlayerTextDrawShow(playerid, ExpTexts[playerid][0]);
return 1;
}
|
This problem has been fixed by Multi Kill, the topic can be locked or deleted already.
|