SA-MP Forums Archive
[HELP]Rank Textdraw - 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: [HELP]Rank Textdraw (/showthread.php?tid=553041)



[HELP]Rank Textdraw - AgusZ - 27.12.2014

How to change 0 to rookie, 1 to private, 3 to corporal dst.

Код:
public OnPlayerUpdate( playerid )
{
	new string[ 128 ];
	if(GetPlayerScore(playerid) >= 1000) rank[ playerid ] = 6; //this
	else if(GetPlayerScore(playerid) >= 700) rank[ playerid ] = 5; //this
	else if(GetPlayerScore(playerid) >= 500) rank[ playerid ] = 4; //this
	else if(GetPlayerScore(playerid) >= 200) rank[ playerid ] = 3; //this
	else if(GetPlayerScore(playerid) >= 100) rank[ playerid ] = 2; //this
	else if(GetPlayerScore(playerid) >= 50) rank[ playerid ] = 1; //this
	else if(GetPlayerScore(playerid) >= 0) rank[ playerid ] = 0; //this
	format( string, sizeof string, "Rank:~p~ %d", rank[ playerid ] );
	TextDrawSetString( Textdraw0, string );
	return 1;
}