SA-MP Forums Archive
Rank System - 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 System (/showthread.php?tid=487408)



Rank System - P100 - 13.01.2014

Hello! I'm looking Rank or Level System for DM with textdraw.
example:
if(GetPlayerScore(playerid) => 50
GivePlayerRank(Noob)
SetPlayerArmour(playerid, 100);




Re: Rank System - amirab - 13.01.2014

Just Search In Forum


Re: Rank System - xZdadyZx - 13.01.2014

Dude this is scripting help not searching help. Check around the forums and search for some similar system.


Re: Rank System - MatriXgaMer - 13.01.2014

pawn Код:
public OnPlayerConnect(playerid)
{
     if(GetPlayerScore(playerid) => 50)
     {
          SetPlayerChatBubble(playerid, Noob,COLOR, 100.0, 10000); //Replace color with your color
          SendClientMessage(playerid, COLOR, "You have the Noob rank."); //Not Tested YET.
          SetPlayerArmour(playerid, 100.0)// Setting players Armour.
 
     }
     return 1;
}



Re: Rank System - P100 - 14.01.2014

Up 44444


Re: Rank System - Beckett - 14.01.2014

This is a Scripting Help section not "Request a code" do a code and test it if it didn't work we'll help you.


Re: Rank System - Eth - 14.01.2014

pawn Код:
at the top of script:
new Text:_score[MAX_PLAYERS];
new Text:_ranks[MAX_PLAYERS];
new ranks[MAX_PLAYERS];

//onplayerconnect:
    _score[playerid] = TextDrawCreate(508 ,111, "K:~r~");
    TextDrawBackgroundColor(_score[playerid], 0x000000FF);
    TextDrawFont(_score[playerid], 2);
    TextDrawLetterSize(_score[playerid], 0.529999, 2.599999);
    TextDrawColor(_score[playerid], 0xeb1e1eFF);
    TextDrawSetOutline(_score[playerid], 1);
    TextDrawSetProportional(_score[playerid], 1);

    _ranks[playerid] = TextDrawCreate(508 ,131 , "R:~r~");
    TextDrawBackgroundColor(_ranks[playerid], 0x000000FF);
    TextDrawFont(_ranks[playerid], 2);
    TextDrawLetterSize(_ranks[playerid], 0.529999, 2.599999);
    TextDrawColor(_ranks[playerid], 0xeb1e1eFF);
    TextDrawSetOutline(_ranks[playerid], 1);
    TextDrawSetProportional(_ranks[playerid], 1);
//onplayerspawn
TextDrawShowForPlayer( playerid, _ranks[playerid]);
TextDrawShowForPlayer( playerid, _score[playerid]);
//onplayerupdate
    new string1111[128];
    new score = GetPlayerScore(playerid);
    format(string1111, sizeof(string1111), "K:~r~ %d", score);
    TextDrawSetString(_score[playerid], string1111);
    if(GetPlayerScore(playerid)>= 15000) ranks[ playerid ] = 10;
    else if(GetPlayerScore(playerid)>= 10000 && GetPlayerScore(playerid) < 15000) ranks[ playerid ] = 9;
    else if(GetPlayerScore(playerid) >= 7500 && GetPlayerScore(playerid) < 10000) ranks[ playerid ]= 8;
    else if(GetPlayerScore(playerid) >= 5500 &&  GetPlayerScore(playerid) < 7500) ranks[ playerid ] = 7;
    else if(GetPlayerScore(playerid) >= 2500 && GetPlayerScore(playerid) < 5500) ranks[ playerid ] = 6;
    else if(GetPlayerScore(playerid) >= 1500 && GetPlayerScore(playerid) < 2500) ranks[ playerid ] = 5;
    else if(GetPlayerScore(playerid) >= 1000 && GetPlayerScore(playerid) < 1500) ranks[ playerid ] = 4;
    else if(GetPlayerScore(playerid) >= 500 && GetPlayerScore(playerid) < 1000) ranks[ playerid ] = 3;
    else if(GetPlayerScore(playerid) >= 200 && GetPlayerScore(playerid) < 500) ranks[ playerid ] = 2;
    else if(GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) < 200) ranks[ playerid ] = 1;
    else if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) < 100) ranks[ playerid ] = 0;
        format(string1111, sizeof string1111, "R:~r~ %d", ranks[ playerid ] );
    TextDrawSetString( _ranks[playerid], string1111);