SA-MP Forums Archive
[ANNOUNCEMENT STYLE HELP] I need help fixing my announcement command style! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [ANNOUNCEMENT STYLE HELP] I need help fixing my announcement command style! (/showthread.php?tid=469819)



[ANNOUNCEMENT STYLE HELP] I need help fixing my announcement command style! - lottoboy - 14.10.2013

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.");
}



Re: [ANNOUNCEMENT STYLE HELP] I need help fixing my announcement command style! - InglewoodRoleplay - 14.10.2013

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


Re: [ANNOUNCEMENT STYLE HELP] I need help fixing my announcement command style! - DanishHaq - 14.10.2013

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.


Re: [ANNOUNCEMENT STYLE HELP] I need help fixing my announcement command style! - lottoboy - 14.10.2013

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


Re: [ANNOUNCEMENT STYLE HELP] I need help fixing my announcement command style! - DanishHaq - 14.10.2013

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.


Re: [ANNOUNCEMENT STYLE HELP] I need help fixing my announcement command style! - lottoboy - 14.10.2013

gametext

ok lemme try this


Re: [ANNOUNCEMENT STYLE HELP] I need help fixing my announcement command style! - lottoboy - 14.10.2013

but i want the colour of it in white not yellow


Re: [ANNOUNCEMENT STYLE HELP] I need help fixing my announcement command style! - DanishHaq - 14.10.2013

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.


Re: [ANNOUNCEMENT STYLE HELP] I need help fixing my announcement command style! - lottoboy - 14.10.2013

thanks!! its perfect works now great


Re: [ANNOUNCEMENT STYLE HELP] I need help fixing my announcement command style! - lottoboy - 15.10.2013

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