Colors
#1

Hello!
How to add more many colors for this?:

Код:
/*
		M3HR4N 's Rank System
Version 1 :
/rank cmd for your rank
/ranks for know all ranks

What Will Be Add :
/getplayerrank(gpr) [id] shows other players rank

seen any bug / had any suggestions ? tell me on forums by posting or pm
*/

#include <a_samp>
#include <zcmd>


CMD:rank(playerid, params[])
{
    new string[256];
    format(string, sizeof(string),"Pontjaid : %s | Rangod : %s", GetPlayerScore(playerid), GPR(playerid));
    SendClientMessage(playerid, 0x00FFFFFF, string);
    return 1;
}
CMD:ranks(playerid, params[])
{
   ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX,"{00FFFF}Ranks","Rank 0-Novice-0 Score\nRank 1-Private-50 Scores\nRank 2-Corporal-100 Scores\nRank 3-Sergeant-300 Scores\nRank 4-Lieutenant-Scores:600\nRank 5-Officer-Scores:800\nRank 6-Captain-Scores:2000\nRank 7-Colonel-Scores:4000\nRank 8-Major-Scores:7000\nRank 9-Major General-Scores:9000\nRank 10-General-Scores: 12000\nRank 11-General OF the Army-15000 Scores\nRank 12-Master Of War-20000 Scores","Ok","Close");
   return 1;
}

public OnPlayerText(playerid,text[])
{
    new szChat[144];
    format(szChat,sizeof (szChat),"[%s] %s{007f9c}(%d): {ffffff}%s", GPR(playerid), pName(playerid), playerid, text);
    SendClientMessageToAll(-1, szChat);
)
	new
		string[128],
		rand,
		name[MAX_PLAYER_NAME];

	GetPlayerName(playerid,name,sizeof(name));
	rand = random(sizeof(color));
	format(string,sizeof(string),"[%d] %s: %s",playerid,name,text);
	SendClientMessageToAll(color[rand][0],string);
	return 0;
}

stock pName(playerid)
{
    new name[24];
    GetPlayerName(playerid,name,24);
    return name;
}

stock GPR(playerid)
{
   new str[50];
   new score = GetPlayerScore(playerid);

   if(score == 0) format(str,sizeof(str),"Novice");
   if(score >= 50 && score <= 99) format(str,sizeof(str),"Private");
   if(score >= 100 && score <= 299) format(str,sizeof(str),"Corporal");
   if(score >= 300 && score <= 599) format(str,sizeof(str),"Sergeant");
   if(score >= 600 && score <= 799) format(str,sizeof(str),"Lieutenant");
   if(score >= 800 && score <= 1999) format(str,sizeof(str),"Officer");
   if(score >= 2000 && score <= 3999) format(str,sizeof(str),"Captain");
   if(score >= 4000 && score <= 5999) format(str,sizeof(str),"Colonel");
   if(score >= 7000 && score <= 8999) format(str,sizeof(str),"Major");
   if(score >= 9000 && score <= 12999) format(str,sizeof(str),"Major General");
   if(score >= 12000 && score <= 14999) format(str,sizeof(str),"General");
   if(score >= 15000 && score <= 19999) format(str,sizeof(str),"General OF the Army");
   if(score >= 20000) format(str,sizeof(str),"Master Of War");
   return str;
}
Reply


Messages In This Thread
Colors - by hnlrasta - 08.10.2013, 18:55
Re: Colors - by iFiras - 08.10.2013, 18:57
Re: Colors - by [EnErGyS]KING - 08.10.2013, 19:19
Re: Colors - by hnlrasta - 08.10.2013, 19:26
Re: Colors - by [EnErGyS]KING - 08.10.2013, 19:29
Re: Colors - by hnlrasta - 08.10.2013, 19:32
Re: Colors - by [EnErGyS]KING - 08.10.2013, 19:47
Re: Colors - by hnlrasta - 08.10.2013, 19:59
Re: Colors - by [EnErGyS]KING - 08.10.2013, 20:12
Re: Colors - by hnlrasta - 08.10.2013, 20:17

Forum Jump:


Users browsing this thread: 2 Guest(s)