Textdraw announce.
#1

How can i make a textdraw announce instead of GameTextForAll

textdraw
pawn Код:
TAnnoUNce = TextDrawCreate(1.000000,1.000000,"            /cmd");
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);
announce command

pawn Код:
CMD:announce(playerid,params[]) {
    if(PlayerInfo[playerid][Level] >= 3 || IsPlayerAdmin(playerid)) {
        if(isnull(params)) return SendClientMessage(playerid,red,"USAGE: /announce <text>");
        CMDMessageToAdmins(playerid,"Announce");
        return GameTextForAll(params,4000,3);
    } else return SendClientMessage(playerid,GREEN,"You need to be a level 3 admin to use this command");}
Reply
#2

maybe that works;

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;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)