(Stats: Kills/Deaths/Score [+REPs])
#5

Код:
    new Text:TEAM[MAX_PLAYERS];
	new Text:SCORE[MAX_PLAYERS];
	new Text:KILL[MAX_PLAYERS];
	new Text:DEATH[MAX_PLAYERS];
public OnGameModeInit()
{
SetTimer("Status", 300, 1);
for(new i = 0; i < MAX_PLAYERS; i++)
    {
    TEAM[i] = TextDrawCreate(495.000000, 118.000000, "_");
    TextDrawBackgroundColor(TEAM[i], 255);
    TextDrawFont(TEAM[i], 1);
    TextDrawLetterSize(TEAM[i], 0.420000, 1.900000);
    TextDrawColor(TEAM[i], -1);
    TextDrawSetOutline(TEAM[i], 1);
    TextDrawSetProportional(TEAM[i], 1);

    SCORE[i] = TextDrawCreate(495.000000, 136.000000, "_");
    TextDrawBackgroundColor(SCORE[i], 255);
    TextDrawFont(SCORE[i], 1);
    TextDrawLetterSize(SCORE[i], 0.420000, 1.900000);
    TextDrawColor(SCORE[i], -1);
    TextDrawSetOutline(SCORE[i], 1);
    TextDrawSetProportional(SCORE[i], 1);

    KILL[i] = TextDrawCreate(495.000000, 156.000000, "_");
    TextDrawBackgroundColor(KILL[i], 255);
    TextDrawFont(KILL[i], 1);
    TextDrawLetterSize(KILL[i], 0.420000, 1.900000);
    TextDrawColor(KILL[i], -1);
    TextDrawSetOutline(KILL[i], 1);
    TextDrawSetProportional(KILL[i], 1);

    DEATH[i] = TextDrawCreate(495.000000, 175.000000, "_");
    TextDrawBackgroundColor(DEATH[i], 255);
    TextDrawFont(DEATH[i], 1);
    TextDrawLetterSize(DEATH[i], 0.420000, 1.900000);
    TextDrawColor(DEATH[i], -1);
    TextDrawSetOutline(DEATH[i], 1);
    TextDrawSetProportional(DEATH[i], 1);
	}
return 1;
}
public OnGameModeExit()
{
for(new i = 0;i < MAX_PLAYERS; i++)
{
        TextDrawDestroy(TEAM[i]);
        TextDrawDestroy(SCORE[i]);
        TextDrawDestroy(KILL[i]);
        TextDrawDestroy(DEATH[i]);
}
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
	return 1;
}

public OnPlayerSpawn(playerid)
{
    TextDrawShowForPlayer(playerid, TEAM[playerid]);
    TextDrawShowForPlayer(playerid, SCORE[playerid]);
    TextDrawShowForPlayer(playerid, KILL[playerid]);
    TextDrawShowForPlayer(playerid, DEATH[playerid]);
	return 1;
}
forward Status(playerid);
public Status(playerid)
{
    new String[256];

    format(String, sizeof(String), "Team: %s");
    TextDrawSetString(TEAM[playerid], String);

    format(String, sizeof(String), "Score: %d");
    TextDrawSetString(SCORE[playerid], String);

    format(String, sizeof(String), "Kills: %d");
    TextDrawSetString(KILL[playerid], String);

    format(String, sizeof(String), "Deaths: %d");
    TextDrawSetString(DEATH[playerid], String);
}
Reply


Messages In This Thread
(Stats: Kills/Deaths/Score [+REPs]) - by SPA - 28.06.2014, 05:03
Re: (Stats: Kills/Deaths/Score [+REPs]) - by BroZeus - 28.06.2014, 05:07
Re: (Stats: Kills/Deaths/Score [+REPs]) - by SPA - 28.06.2014, 05:48
Re: (Stats: Kills/Deaths/Score [+REPs]) - by BroZeus - 28.06.2014, 05:51
Re: (Stats: Kills/Deaths/Score [+REPs]) - by SPA - 28.06.2014, 06:11
Re: (Stats: Kills/Deaths/Score [+REPs]) - by SPA - 28.06.2014, 10:06

Forum Jump:


Users browsing this thread: 2 Guest(s)