29.10.2018, 18:21
i want to crate a top
new participants = 10,damage[MAX_PLAYERS],string[128];
how can i get max value of damage?
for use in command like /top
YCMD:top(playerid, params[], help)
{
for(new i = 0; i <= participants; i++) {
if(damage[i] == 0) return SendClientMessage(playerid,COLOR_WHITE,"No one!");
format(string,128,"top %d with %d damage",i,damage[i]);
SendClientMessage(playerid,COLOR_WHITE,string);
return 1;
}
how can i get max value of damage?
new participants = 10,damage[MAX_PLAYERS],string[128];
how can i get max value of damage?
for use in command like /top
YCMD:top(playerid, params[], help)
{
for(new i = 0; i <= participants; i++) {
if(damage[i] == 0) return SendClientMessage(playerid,COLOR_WHITE,"No one!");
format(string,128,"top %d with %d damage",i,damage[i]);
SendClientMessage(playerid,COLOR_WHITE,string);
return 1;
}
how can i get max value of damage?