• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Help Add
#5
(2021-02-27, 09:10 PM)Virsenas Wrote:
(2021-02-27, 09:05 PM)Hitler Wrote:
(2021-02-27, 09:02 PM)Virsenas Wrote:
Quote:the problem is that when I restart the server when a player kills another player, the team score returns to 1 and it is adding again

Sounds like a loading problem. Did you debug the loading? Did you check what it loads?

It loads well, the problem is when is added

Can you show the loading code?

Code:
CMD:ranking(playerid)
{
mysql_pquery(con, "SELECT `Team`, `Score` FROM `Ranking` WHERE `Score` > 0 ORDER BY `Score` DESC LIMIT 4", "Rank", "d", playerid);
return 1;
}

funcion Rank(playerid)
{
new rows = cache_num_rows(), prueba[300], Escore, team[MAX_PLAYER_NAME];
if(rows > 0)
{
prueba = "{FFFFFF}Ranking Teams\n\n";
for (new i = 0; i < rows; i)
{
cache_get_value_name_int(i, "Score", Escore);
cache_get_value_name(i, "Team", team, MAX_PLAYER_NAME);
format(prueba, sizeof(prueba), "%s#%d %s? ? %d\n", prueba, i  1, team, Escore);
}
ShowPlayerDialog(playerid, 777, DIALOG_STYLE_MSGBOX, "Ranking Teams", prueba, "Cerrar", "");
}
return 1;
}
Programador b?sico

  Reply


Messages In This Thread
Help Add - by Hitler - 2021-02-27, 08:57 PM
RE: Help Add - by Virsenas - 2021-02-27, 09:02 PM
RE: Help Add - by Hitler - 2021-02-27, 09:05 PM
RE: Help Add - by Virsenas - 2021-02-27, 09:10 PM
RE: Help Add - by Hitler - 2021-02-27, 09:28 PM
RE: Help Add - by Virsenas - 2021-02-27, 10:42 PM
RE: Help Add - by Radical - 2021-02-27, 11:28 PM

Forum Jump: