Leaderboard [help?]
#23

Code:
new Name[5][MAX_PLAYER_NAME], string[5][64];

GetPlayerName(first, Name[0], MAX_PLAYER_NAME);
GetPlayerName(second, Name[1], MAX_PLAYER_NAME);
GetPlayerName(third, Name[2], MAX_PLAYER_NAME);
GetPlayerName(fourth, Name[3], MAX_PLAYER_NAME);
GetPlayerName(fifth, Name[4], MAX_PLAYER_NAME);

format(string[0], sizeof(string[0]), "~R~#1 - ~W~%s", Name[0],);
format(string[1], sizeof(string[1]), "~R~#2 - ~W~%s", Name[1],);
format(string[2], sizeof(string[2]), "~R~#3 - ~W~%s", Name[2],);
format(string[3], sizeof(string[3]), "~R~#4 - ~W~%s", Name[3],);
format(string[4], sizeof(string[4]), "~R~#5 - ~W~%s", Name[4],);

TextDrawSetString(Textdraw19, string[0]);
TextDrawSetString(Textdraw20, string[1]);
TextDrawSetString(Textdraw21, string[2]);
TextDrawSetString(Textdraw22, string[3]);
TextDrawSetString(Textdraw23, string[4]);

TextDrawShowForPlayer(playerid, Textdraw19);
TextDrawShowForPlayer(playerid, Textdraw20);
TextDrawShowForPlayer(playerid, Textdraw21);
TextDrawShowForPlayer(playerid, Textdraw22);
TextDrawShowForPlayer(playerid, Textdraw23);

SetTimerEx("TextdrawHide", 5000, false, "uiiiii", playerid, Textdraw19, Textdraw20, Textdraw21, Textdraw22, Textdraw23); //A timer which will hide the textdraw, it\'s set to 5 seconds and you can change that if you want to...

//Now put this under the new kills...

forward TextdrawHide(playerid, textdraw1, textdraw2, textdraw3, textdraw4, textdraw5);

//And put this down where other public functions are...

public TextdrawHide(playerid, textdraw1, textdraw2, textdraw3, textdraw4, textdraw5)
{
    TextDrawHideForPlayer(playerid, textdraw1);
    TextDrawHideForPlayer(playerid, textdraw2);
    TextDrawHideForPlayer(playerid, textdraw3);
    TextDrawHideForPlayer(playerid, textdraw4);
    TextDrawHideForPlayer(playerid, textdraw5);
    return 1;
}
And read my last comment I changed it a bit


Please, if you get any errors send them to me and I\'ll fix them...


EDIT:I changed the code just coppy it...
Reply


Messages In This Thread
Leaderboard [help?] - by Thanks - 11.06.2017, 21:51
Re: Leaderboard [help?] - by Toroi - 11.06.2017, 21:54
Re: Leaderboard [help?] - by Thanks - 11.06.2017, 21:55
Re: Leaderboard [help?] - by Thanks - 11.06.2017, 22:17
Re: Leaderboard [help?] - by Thanks - 12.06.2017, 00:14
Re: Leaderboard [help?] - by Private200 - 12.06.2017, 00:20
Re: Leaderboard [help?] - by Thanks - 12.06.2017, 00:23
Re: Leaderboard [help?] - by Thanks - 12.06.2017, 01:04
Re: Leaderboard [help?] - by RedRex - 12.06.2017, 09:08
Re: Leaderboard [help?] - by Thanks - 12.06.2017, 17:26
Re: Leaderboard [help?] - by RedRex - 12.06.2017, 22:03
Re: Leaderboard [help?] - by Thanks - 12.06.2017, 22:31
Re: Leaderboard [help?] - by Thanks - 13.06.2017, 18:19
Re: Leaderboard [help?] - by Sew_Sumi - 13.06.2017, 20:40
Re: Leaderboard [help?] - by Thanks - 13.06.2017, 22:14
Re: Leaderboard [help?] - by Sew_Sumi - 14.06.2017, 03:53
Re: Leaderboard [help?] - by Thanks - 14.06.2017, 06:30
Re: Leaderboard [help?] - by CheezIt - 14.06.2017, 06:56
Re: Leaderboard [help?] - by Thanks - 14.06.2017, 09:25
Re: Leaderboard [help?] - by andrejc999 - 14.06.2017, 10:26
Re: Leaderboard [help?] - by Thanks - 14.06.2017, 10:31
Re: Leaderboard [help?] - by Thanks - 14.06.2017, 10:44
Re: Leaderboard [help?] - by andrejc999 - 14.06.2017, 10:47
Re: Leaderboard [help?] - by andrejc999 - 14.06.2017, 10:50
Re: Leaderboard [help?] - by Thanks - 14.06.2017, 21:29
Re: Leaderboard [help?] - by Sew_Sumi - 15.06.2017, 02:03
Re: Leaderboard [help?] - by Thanks - 15.06.2017, 08:10
Re: Leaderboard [help?] - by Thanks - 16.06.2017, 01:03
Re: Leaderboard [help?] - by CheezIt - 16.06.2017, 01:05
Re: Leaderboard [help?] - by Thanks - 16.06.2017, 01:09
Re: Leaderboard [help?] - by CheezIt - 16.06.2017, 04:18

Forum Jump:


Users browsing this thread: 1 Guest(s)