Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- FileScript name: Rank System.
- Аuthor: proSeryoga
- Date: 16.03.2013
- */
- #include <a_samp>
- new PlayerText:Rang[MAX_PLAYERS][3];
- public OnFilterScriptInit()
- {
- print("Loading....");
- print("Rank System loaded!");
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- Rang[playerid][0] = CreatePlayerTextDraw(playerid,496.000000, 101.000000, " ");
- PlayerTextDrawBackgroundColor(playerid,Rang[playerid][0], 0x00000033);
- PlayerTextDrawFont(playerid,Rang[playerid][0], 2);
- PlayerTextDrawLetterSize(playerid,Rang[playerid][0], 1.100000, 2.300001);
- PlayerTextDrawColor(playerid,Rang[playerid][0], -1);
- PlayerTextDrawSetOutline(playerid,Rang[playerid][0], 1);
- PlayerTextDrawSetProportional(playerid,Rang[playerid][0], 1);
- Rang[playerid][1] = CreatePlayerTextDraw(playerid,496.000000, 101.000000, "IIIIIIIIIIIIII");
- PlayerTextDrawBackgroundColor(playerid,Rang[playerid][1], 0x00000000);
- PlayerTextDrawFont(playerid,Rang[playerid][1], 2);
- PlayerTextDrawLetterSize(playerid,Rang[playerid][1], 1.100000, 2.300001);
- PlayerTextDrawColor(playerid,Rang[playerid][1], 0xFFFFFF33);
- PlayerTextDrawSetOutline(playerid,Rang[playerid][1], 1);
- PlayerTextDrawSetProportional(playerid,Rang[playerid][1], 1);
- Rang[playerid][2] = CreatePlayerTextDraw(playerid,500.000000, 120.000000, " ");
- PlayerTextDrawBackgroundColor(playerid,Rang[playerid][2], 255);
- PlayerTextDrawFont(playerid,Rang[playerid][2], 3);
- PlayerTextDrawLetterSize(playerid,Rang[playerid][2], 0.519999, 1.600000);
- PlayerTextDrawColor(playerid,Rang[playerid][2], 0xFFFF00AA);
- PlayerTextDrawSetOutline(playerid,Rang[playerid][2], 1);
- PlayerTextDrawSetProportional(playerid,Rang[playerid][2], 1);
- PlayerTextDrawSetSelectable(playerid,Rang[playerid][2], 0);
- PlayerTextDrawShow(playerid, Rang[playerid][0]);
- PlayerTextDrawShow(playerid, Rang[playerid][1]);
- PlayerTextDrawShow(playerid, Rang[playerid][2]);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- SetPlayerStarRang(playerid);
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- #pragma unused reason
- if(killerid != INVALID_PLAYER_ID)
- {
- SetPlayerScore (killerid, GetPlayerScore (killerid) + 1);
- SetPlayerStarRang(playerid);
- }
- return 1;
- }
- stock SetPlayerStarRang(playerid)
- {
- new string[20];
- new ran = GetPlayerScore(playerid);
- format(string, sizeof (string), "%d", ran);
- if(ran>=0&&ran<=49)
- {
- PlayerTextDrawSetString(playerid,Rang[playerid][0], "I");
- PlayerTextDrawSetString(playerid,Rang[playerid][2], "Noob");
- }
- if(ran>=50&&ran<=99)
- {
- PlayerTextDrawSetString(playerid,Rang[playerid][0], "II");
- PlayerTextDrawSetString(playerid,Rang[playerid][2], "Strelok");
- }
- if(ran>=100&&ran<=449)
- {
- PlayerTextDrawSetString(playerid,Rang[playerid][0], "III");
- PlayerTextDrawSetString(playerid,Rang[playerid][2], "Bandit");
- }
- if(ran>=500&&ran<=999)
- {
- PlayerTextDrawSetString(playerid,Rang[playerid][0], "IIII");
- PlayerTextDrawSetString(playerid,Rang[playerid][2], "Killer");
- }
- if(ran>=1000&&ran<=1499)
- {
- PlayerTextDrawSetString(playerid,Rang[playerid][0], "IIIII");
- PlayerTextDrawSetString(playerid,Rang[playerid][2], "Gangster");
- }
- if(ran>=1500&&ran<=1999)
- {
- PlayerTextDrawSetString(playerid,Rang[playerid][0], "IIIIII");
- PlayerTextDrawSetString(playerid,Rang[playerid][2], "Hitman");
- }
- if(ran>=2000&&ran<=2999)
- {
- PlayerTextDrawSetString(playerid,Rang[playerid][0], "IIIIIII");
- PlayerTextDrawSetString(playerid,Rang[playerid][2], "proGamer");
- }
- if(ran>=3000&&ran<=3999)
- {
- PlayerTextDrawSetString(playerid,Rang[playerid][0], "IIIIIIII");
- PlayerTextDrawSetString(playerid,Rang[playerid][2], "Kent");
- }
- if(ran>=4000&&ran<=4999)
- {
- PlayerTextDrawSetString(playerid,Rang[playerid][0], "IIIIIIIII");
- PlayerTextDrawSetString(playerid,Rang[playerid][2], "Narcomaniac");
- }
- if(ran>=5000&&ran<=5999)
- {
- PlayerTextDrawSetString(playerid,Rang[playerid][0], "IIIIIIIIII");
- PlayerTextDrawSetString(playerid,Rang[playerid][2], "Baron");
- }
- if(ran>=6000&&ran<=6999)
- {
- PlayerTextDrawSetString(playerid,Rang[playerid][0], "IIIIIIIIIII");
- PlayerTextDrawSetString(playerid,Rang[playerid][2], "Maestro");
- }
- if(ran>=7000&&ran<=7999)
- {
- PlayerTextDrawSetString(playerid,Rang[playerid][0], "IIIIIIIIIIII");
- PlayerTextDrawSetString(playerid,Rang[playerid][2], "Maniac");
- }
- if(ran>=8000&&ran<=9998)
- {
- PlayerTextDrawSetString(playerid,Rang[playerid][0], "IIIIIIIIIIIII");
- PlayerTextDrawSetString(playerid,Rang[playerid][2], "ProKiller");
- }
- if(ran == 9999)
- {
- PlayerTextDrawSetString(playerid,Rang[playerid][0], "IIIIIIIIIIIIII");
- PlayerTextDrawSetString(playerid,Rang[playerid][2], "Terminator");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement