[ANNOUNCEMENT STYLE HELP] I need help fixing my announcement command style!
#1

I want my announcement style like this:

please help me!

My code:
Код:
dcmd_announce(playerid,params[]) {
    if(PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid)) {
    	if(!strlen(params)) return SendClientMessage(playerid,red,"USAGE: /announce <text>");
    	CMDMessageToAdmins(playerid,"ANNOUNCE");
		TextDrawSetString(Announce, params);
		TextDrawShowForAll(Announce);
		AnnTick = GetTickCount();
		return GameTextForAll(params,4000,3);
    } else return SendClientMessage(playerid,red,"Unknown command. Type /cmds to see a list of available commands.");
}
Reply
#2

You have to provide a bit of code for us to be able to help you.
Reply
#3

Do you want to be using text draws or just standard game text's? Be more specific when posting these topics so we understand exactly what you want.
Reply
#4

i want when i type my /announce command it shud be announce [text] and the text shud come up like the one i showed in screenshot . also my code is below the screenshot i posted it.
when i type announce [text] it comes up in different style from my code not like the one I showed in screenshot. I want to make it come like that
Reply
#5

pawn Код:
dcmd_announce(playerid,params[])
{
    if(PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid))
    {
        if(!strlen(params)) return SendClientMessage(playerid,red,"USAGE: /announce <text>");
        CMDMessageToAdmins(playerid,"ANNOUNCE");
        return GameTextForAll(params, 9000, 0);
    } else return SendClientMessage(playerid,red,"Unknown command. Type /cmds to see a list of available commands.");
}
You still didn't say whether you wanted a game text or a text draw, try that and see if you like it.
Reply
#6

gametext

ok lemme try this
Reply
#7

but i want the colour of it in white not yellow
Reply
#8

Quote:
Originally Posted by lottoboy
Посмотреть сообщение
but i want the colour of it in white not yellow
pawn Код:
dcmd_announce(playerid,params[])
{
    if(PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid))
    {
        if(!strlen(params)) return SendClientMessage(playerid,red,"USAGE: /announce <text>");
        CMDMessageToAdmins(playerid,"ANNOUNCE");
        new string[100];
        format(string, sizeof(string), "~w~%s", params);
        return GameTextForAll(string, 9000, 0);
    } else return SendClientMessage(playerid,red,"Unknown command. Type /cmds to see a list of available commands.");
}
Sorry, I forgot you wanted that :P, here you go.
Reply
#9

thanks!! its perfect works now great
Reply
#10

Quote:
Originally Posted by DanishHaq
Посмотреть сообщение
pawn Код:
dcmd_announce(playerid,params[])
{
    if(PlayerInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid))
    {
        if(!strlen(params)) return SendClientMessage(playerid,red,"USAGE: /announce <text>");
        CMDMessageToAdmins(playerid,"ANNOUNCE");
        new string[100];
        format(string, sizeof(string), "~w~%s", params);
        return GameTextForAll(string, 9000, 0);
    } else return SendClientMessage(playerid,red,"Unknown command. Type /cmds to see a list of available commands.");
}
Sorry, I forgot you wanted that :P, here you go.
theres a problem now with this code, sometimes it announces two times, please help me again
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)