29.07.2011, 03:06
Are you scripting this in a game-mode that already saves player stuff? Or in some standalone filterscript?
for the stats command you'd just need to do something like this:
Then just use the "rank" variable in a formatted string:
Then add that to the stats command. I'm sure you can make your own stats command
for the stats command you'd just need to do something like this:
pawn Код:
new rank[128];
if(pRank[playerid] == 1)
{
rank = "Rank Name for Rank 1";
}
if(pRank[playerid] == 2)
{
rank = "Rank name for rank 2";
}
if(etc. etc..)
{
//another rank
}
else if(pRank[playerid] == 0) // unset .. no rank.
{
rank = "No rank";
}
pawn Код:
format(string, sizeof(string), "Player rank: %s", rank);