Rank System
#1

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

Reply
#2

Just Search In Forum
Reply
#3

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

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;
}
Reply
#5

Up 44444
Reply
#6

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.
Reply
#7

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);
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)