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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Rank System (/showthread.php?tid=110996)



Rank System - [ATC]eRaZoR - 29.11.2009

Hallo,
ich will ein Rang system, jede 20 kills, soll der rang wechseln.
Es soll ein textdraw sein.
es sollen 10 rдnge geben..
bitte helft mir
SCREENS:



Re: Rank System - miokie - 29.11.2009

This is a english speaking part of the forum.
And also, ask in the script request thread.


Re: Rank System - Luka P. - 29.11.2009

Create textdraw.

pawn Код:
forward RankUpdate(playerid);
pawn Код:
new playerKills[MAX_PLAYERS];
pawn Код:
public OnPlayerConnect(playerid)
{
    playerKills[playerid] = 0;
    SetTimerEx("RankUpdate",3000,1,"i",playerid);
    return 1;
}
pawn Код:
public OnPlayerDeath(playerid,killerid,reason)
{
    playerKills[killerid] ++;
    return 1;
}
pawn Код:
public RankUpdate(playerid)
{
    if(playerKills[playerid] >= 20 && playerKills[playerid] =< 40)
    {
        // change textdraw text here
    }
    if(playerKills[playerid] >= 40 && playerKills[playerid] =< 60)
    {
        // change textdraw text here
    }
    return 1;
}