Posts: 71
Threads: 16
Joined: Apr 2015
Hi guys... I need rank system...
example
"Rank: 1/Total Registered Players(mysql)"
NOT:
new rankname[32];
switch(rankid)
{
case 1: rankname = "Rank1";
case 2: rankname = "Rank2";
case 3: rankname = "Rank3";
default: rankname = "None";
}
return rankname;
}
Posts: 1,113
Threads: 127
Joined: Jul 2008
Reputation:
0
Do you need help with something your creating or are you asking for someone to write all of the code for you?
Posts: 71
Threads: 16
Joined: Apr 2015
Quote:
Originally Posted by dusk
Do you need help with something your creating or are you asking for someone to write all of the code for you?
|
I need only example...
like:
Код:
stock PlayerRank(playerid)
{
format(query,sizeof(query),"SELECT ID FROM `users` WHERE totalscore > '%d'",PlayerInfo[playerid][pTotalScore]);
mysql_query(query);
mysql_store_result();
new str[256];
new num = mysql_num_rows();
mysql_free_result();
strdel(str,0,strlen(str));
format(str,sizeof(str),"You are in position %d with %d total score",(num + 1),PlayerInfo[playerid][pTotalScore]);
SendClientMessage(playerid,COLOR,str);
return true;
}
Posts: 1,113
Threads: 127
Joined: Jul 2008
Reputation:
0
So what are you trying to achieve? What is the problem?
Posts: 1,071
Threads: 24
Joined: Aug 2014
Reputation:
0
Explain us what you want? is it some kind of Team Ranks like as in a Faction or normal Ranks like if player's score(or any other thing) is xyz then he is in abc rank?