SA-MP Forums Archive
rank fs - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: rank fs (/showthread.php?tid=508038)



rank fs - DavidUk - 20.04.2014

hello all i need a fs like this /setrank <nameofran> color and then in game it wil show like this
David<myrank>(id):message also this command must be only fols VIP lvl 1 pls is there anyone who can help me , i can give maps in reward im a mapper .


Re: rank fs - doreto - 20.04.2014




Re: rank fs - lonalovegood1 - 20.04.2014

its my idea , use like this
but you must have a database for your user ranks
example dini or y_ini to get rank value and to show it
Код:
#define COLOR_WHITE     0xFFFFFFFF
public OnPlayerText(playerid, text[])
{
	new rank,Player[64],pName[MAX_PLAYER_NAME],string[128];
	GetPlayerName(playerid, pName, sizeof(pName)); //  This get's the player name with the name length
	format(Player, sizeof(Player),"/Accounts/%s.txt",pName); // Formatting file
        format(string,sizeof(string),"%s <%d>(%d): %s",pName,rank,playerid,text);
        printf(string);
        SendClientMessageToAll(COLOR_WHITE,string);
}
and this setrank cmd for vip.
you must work hard with your data bases ...
Код:
CMD:setrank(playerid,params[])
{
        if(playerlevel[playerid]==1) //playerlevel[playerid] == 1 (is player vip)
        {
        new rnk;
        sscanf(params,"d",rnk);
        playerinfo[playerid][rank] = rnk;
        }
	return 1;
}
if i knew what is your plan and whatare you using , i would tell you a better way ...