Rank - 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 (
/showthread.php?tid=392167)
Rank -
MrReBzz - 13.11.2012
Hi I Have A Rank System And Her's My Code
PHP код:
new iScore = GetPlayerScore(playerid);
switch(iScore)
{
case 0..100:
{
pRank[playerid] = RANK_NEWBIE;
new string2[41];
format(string2, sizeof(string2), "Rank: Newbie");
TextDrawSetString(Textdraw3, string2);
}
case 101..200:
{
pRank[playerid] = RANK_PROFESSIONAL;
new string2[41];
format(string2, sizeof(string2), "Rank: Professional");
TextDrawSetString(Textdraw3, string2);
}
case 201..300:
{
pRank[playerid] = RANK_ASSASINATOR;
new string2[41];
format(string2, sizeof(string2), "Rank: Assasinator");
TextDrawSetString(Textdraw3, string2);
}
case 301..400:
{
pRank[playerid] = RANK_HITMAN;
new string2[41];
format(string2, sizeof(string2), "Rank: Hitman");
TextDrawSetString(Textdraw3, string2);
}
case 401..9999:
{
pRank[playerid] = RANK_SILENTASSASINATOR;
new string2[41];
format(string2, sizeof(string2), "Rank: SilentAssasinator");
TextDrawSetString(Textdraw3, string2);
}
}
And How Can I Make The Rank Silentassasinator If The Player Has Higher Than Score 401?
Re: Rank -
Faisal_khan - 13.11.2012
This might help you.
pawn Код:
if(GetPlayerScore(playerid) >401)
Re: Rank -
Gangster-rocks - 13.11.2012
pawn Код:
new iScore = GetPlayerScore(playerid);
switch(iScore)
{
case 0..100:
{
pRank[playerid] = RANK_NEWBIE;
new string2[41];
format(string2, sizeof(string2), "Rank: Newbie");
TextDrawSetString(Textdraw3, string2);
}
case 101..200:
{
pRank[playerid] = RANK_PROFESSIONAL;
new string2[41];
format(string2, sizeof(string2), "Rank: Professional");
TextDrawSetString(Textdraw3, string2);
}
case 201..300:
{
pRank[playerid] = RANK_ASSASINATOR;
new string2[41];
format(string2, sizeof(string2), "Rank: Assasinator");
TextDrawSetString(Textdraw3, string2);
}
case 301..400:
{
pRank[playerid] = RANK_HITMAN;
new string2[41];
format(string2, sizeof(string2), "Rank: Hitman");
TextDrawSetString(Textdraw3, string2);
}
case 401..9999: // change the 401 to what ever you want
{
pRank[playerid] = RANK_SILENTASSASINATOR;
new string2[41];
format(string2, sizeof(string2), "Rank: SilentAssasinator");
TextDrawSetString(Textdraw3, string2);
}
}
Re: Rank -
blackbhuta - 13.11.2012
Your code is look right, when the player have score more than 401 to 9999 they are SilentAssasinator.