Textdraw0 = TextDrawCreate(5.666635, 430.992584, "TOP 3 KILLSTREAKS: 1. KILLS 2. KILLS 3. KILLS"); TextDrawLetterSize(Textdraw0, 0.193333, 1.421629); TextDrawAlignment(Textdraw0, 1); TextDrawColor(Textdraw0, -16776961); TextDrawSetShadow(Textdraw0, 0); TextDrawSetOutline(Textdraw0, 1); TextDrawBackgroundColor(Textdraw0, 51); TextDrawFont(Textdraw0, 1); TextDrawSetProportional(Textdraw0, 1);
Sorry if i create theme again not here where i should, i don't really know where exactly i should create this type support application. So sorry for it.
So guys i want create top3 players system which show the best player who made the most frag at that moment like. Like this ![]() So this is me textdraw Код:
Textdraw0 = TextDrawCreate(5.666635, 430.992584, "TOP 3 KILLSTREAKS: 1. KILLS 2. KILLS 3. KILLS"); TextDrawLetterSize(Textdraw0, 0.193333, 1.421629); TextDrawAlignment(Textdraw0, 1); TextDrawColor(Textdraw0, -16776961); TextDrawSetShadow(Textdraw0, 0); TextDrawSetOutline(Textdraw0, 1); TextDrawBackgroundColor(Textdraw0, 51); TextDrawFont(Textdraw0, 1); TextDrawSetProportional(Textdraw0, 1); |
Hello !
You can use any Killstreak system and add TextdrawSetString In OnPlayerDeath Function for create this ![]() |
new Slot1 = -1, Slot2 = -1, Slot3 = -1, Slot4 = -1, Slot5 = -1, Highestkills = 0;
new Text:Textdraw0;
public OnGameModeInit()
{
Textdraw0 = TextDrawCreate(476.875000, 216.833282, " ");
TextDrawLetterSize(Textdraw0, 0.400000, 1.600000);
TextDrawTextSize(Textdraw0, 621.000000, 0.000000);
TextDrawAlignment(Textdraw0, 1);
TextDrawColor(Textdraw0, -1);
TextDrawUseBox(Textdraw0, 1);
TextDrawBoxColor(Textdraw0, 255);
TextDrawSetShadow(Textdraw0, 0);
TextDrawSetOutline(Textdraw0, 0);
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetShadow(Textdraw0, 0);
return 1;
}
CMD:showtop(playerid, params[])
{
/*Note:
You have to change your kills variable with PlayerInfo[x][kills]
*/
for(new x=0; x<MAX_PLAYERS; x++) if (IsPlayerConnected(x)) if (PlayerInfo[x][kills] >= Highestkills)
{
Highestkills = PlayerInfo[x][kills];
Slot1 = x;
}
Highestkills = 0;
for(new x=0; x<MAX_PLAYERS; x++) if (IsPlayerConnected(x) && x != Slot1) if (PlayerInfo[x][kills] >= Highestkills)
{
Highestkills = PlayerInfo[x][kills];
Slot2 = x;
}
Highestkills = 0;
for(new x=0; x<MAX_PLAYERS; x++) if (IsPlayerConnected(x) && x != Slot1 && x != Slot2) if (PlayerInfo[x][kills][x] >= Highestkills)
{
Highestkills = PlayerInfo[x][kills];
Slot3 = x;
}
Highestkills = 0;
format(string, sizeof(string), "_______Top_3_Killers~n~~n~1-~g~~y~%s_(Kills_%d)~n~~n~", PlayerName(Slot1), PlayerInfo[Slot1][kills]);
if(Slot2 != -1)
{
format(string, sizeof(string), "_______Top_3_Killers~n~~n~1-~g~%s_(Kills_%d)~n~2-~y~%s_(Kills_%d)~n~~n~", PlayerName(Slot2),PlayerInfo[Slot2][kills]);
}
if(Slot3 != -1)
{
format(string, sizeof(string), "_______Top_3_Killers~n~~n~1-~g~%s_(Kills_%d)~n~2-~y~%s_(Kills_%d)~n~3-~y~%s_(Kills_%d)~n~~n~", PlayerName2(Slot3), PlayerInfo[Slot3][kills]);
}
TextDrawSetString(Textdraw0, string);
TextDrawShowForPlayer(playerid, Textdraw0);
return 1;
}
This is wrong section for requesting scripts
i have created for you one and its working i have tested it give a try PHP код:
|
PlayerName2(playerid)
{
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
return pname;
}