11.12.2010, 00:20
ok when i use the cmd to set the textdraw's string, the textdraw it shows a red text saying "lol" then hides the textdraw
//ongamemodeinit
//one second timer
pawn Код:
new Text:AnnounceTextDraw;
new Announced=0;
pawn Код:
TextDrawDestroy(AnnounceTextDraw);
pawn Код:
if(Announced >= 1)Announced --;
if(Announced == 0){
Announced =0;
TextDrawHideForAll(AnnounceTextDraw);
}
pawn Код:
CMD:announce(playerid,params[])
{
if(PlayerInfo[playerid][AdminLevel] == 0) return 0;
new NewAnn[110];
if(sscanf(params, "s[110]", NewAnn)) return SendClientMessage(playerid,0xFF0000AA,"USAGE: /Announce <text>");
TextDrawSetString(AnnounceTextDraw,NewAnn);
TextDrawShowForAll(AnnounceTextDraw);
Announced = 7;
return 1;
}
pawn Код:
AnnounceTextDraw = TextDrawCreate(315.000000, 210.000000, "Announcement");
TextDrawAlignment(AnnounceTextDraw, 2);
TextDrawBackgroundColor(AnnounceTextDraw, 255);
TextDrawFont(AnnounceTextDraw, 3);
TextDrawLetterSize(AnnounceTextDraw, 0.529999, 2.499999);
TextDrawColor(AnnounceTextDraw, -1);
TextDrawSetOutline(AnnounceTextDraw, 1);
TextDrawSetProportional(AnnounceTextDraw, 1);