11.07.2012, 13:56
maybe that works;
EDIT: fixed a bug
EDIT: fixed a bug
pawn Код:
new Text:TAnnoUNce;
forward HideAnn();
public OnGameModeInit() {
TAnnoUNce = TextDrawCreate(1.000000,1.000000," ");
TextDrawUseBox(TAnnoUNce,1);
TextDrawBoxColor(TAnnoUNce,0x0000ff33);
TextDrawTextSize(TAnnoUNce,471.000000,3.000000);
TextDrawAlignment(TAnnoUNce,0);
TextDrawBackgroundColor(TAnnoUNce,0x000000ff);
TextDrawFont(TAnnoUNce,1);
TextDrawLetterSize(TAnnoUNce,0.699999,1.300000);
TextDrawColor(TAnnoUNce,0xffffffff);
TextDrawSetOutline(TAnnoUNce,1);
TextDrawSetProportional(TAnnoUNce,1);
TextDrawSetShadow(TAnnoUNce,1);
return 1;
}
public HideAnn()
{
TextDrawHideForAll(TAnnoUNce);
return 1;
}
CMD:announce(playerid,params[]) {
if(PlayerInfo[playerid][Level] >= 3 || IsPlayerAdmin(playerid)) {
if(isnull(params)) return SendClientMessage(playerid,red,"USAGE: /announce <text>");
CMDMessageToAdmins(playerid,"Announce");
TextDrawSetString(TAnnoUNce, params);
TextDrawShowForAll(TAnnoUNce);
SetTimer("HideAnn", 5000, false);
} else return SendClientMessage(playerid,GREEN,"You need to be a level 3 admin to use this command");
return 1;
}