20.06.2012, 17:33
pawn Код:
static
Text:Matou[MAX_PLAYERS],
Deaths[MAX_PLAYERS],
text[20]
;
public OnGameModeInit()
{
for(new x = 0; x < MAX_PLAYERS; x++) {
Matou[x] = TextDrawCreate(20.000000, 186.000000, " ");
TextDrawBackgroundColor(Matou[x], 255);
TextDrawFont(Matou[x], 2);
TextDrawLetterSize(Matou[x], 0.260000, 1.200000);
TextDrawColor(Matou[x], -1);
TextDrawSetOutline(Matou[x], 0);
TextDrawSetProportional(Matou[x], 1);
TextDrawSetShadow(Matou[x], 1);
}
return true;
}
public OnPlayerUpdate(playerid)
{
format(text, sizeof(text), "Matou: %d", Deaths[playerid]);
TextDrawShowForPlayer(playerid, Matou[playerid]);
TextDrawSetString(Matou[playerid], text);
return true;
}
public OnPlayerDeath(playerid, killerid, reason)
{
Deaths[killerid] ++;
return true;
}