17.05.2014, 23:33
Put this in OnGameModeInit:
Then, instead of using TextDrawDestroy to hide the announcement from players, use TextDrawHideForAll.
pawn Код:
public AnnText()
{
ann = TextDrawCreate(314.000000, 198.000000, " ");
TextDrawAlignment(ann, 2);
TextDrawBackgroundColor(ann, 255);
TextDrawFont(ann, 3);
TextDrawLetterSize(ann, 1.1, 2.400003);
TextDrawColor(ann, -1);
TextDrawSetOutline(ann, 1);
TextDrawSetProportional(ann, 1);
}
pawn Код:
CMD:announce(playerid, params[])
{
new string[150];
format(string, sizeof string, "~w~%s", text);
TextDrawSetString(ann, string);
TextDrawShowForAll(ann);
annTextOnScreen = true;
return 1;
}