SA-MP Forums Archive
/ann - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /ann (/showthread.php?tid=68936)



/ann - Agent Smith - 14.03.2009

Hi, in alot of servers there is an announcement command which does not show the admins name, this is used for telling players about IC stuff, if someone can create a script where it doesnt show the name of the admin who is speaking that would be great,

Thanks in advance


Re: /ann - Zoopaman - 14.03.2009

Try this:
pawn Код:
if(strcmp(cmd, "/ann", true) == 0)
    {
        if (IsPlayerAdmin(playerid))
        {
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[64];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Enter a message, Mr. Retard-o");
                return 1;
            }
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    GameTextForPlayer(i, result, 5000, 6);
                }
            }
            return 1;
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "Log into RCON to use this");
            return 1;
        }
    }



Re: /ann - Agent Smith - 14.03.2009

Hey, thanks for replying so quickly, i used pawno to compile it and i made it into an FS but when i load up the server it doesn work

Quote:

[21:18:28] Loading filter script 'announce.amx'...
[21:18:28] Failed to load 'filterscripts/announce.amx.amx' filter script.
[21:18:28] Unable to load filter script 'announce.amx'.
[21:18:28] Loaded 0 filter scripts.

I didnt change the code at all, do you need to add it into the gamemode? if you do where?


Re: /ann - Zoopaman - 14.03.2009

Quote:

[21:18:28] Failed to load 'filterscripts/announce.amx.amx' filter script.

ummm...

your "filterscripts" line in server.cfg doesn't match the filename


Re: /ann - Agent Smith - 14.03.2009

Quote:

[21:51:13] Filter Scripts
[21:51:13] ---------------
[21:51:13] Loading filter script 'announce.amx'...
[21:51:13] Failed to load 'filterscripts/announce.amx.amx' filter script.
[21:51:13] Unable to load filter script 'announce.amx'.
[21:51:13] Loaded 0 filter scripts.

Quote:

filterscripts announce

they are the same though


Re: /ann - StrickenKid - 14.03.2009

Quote:
Originally Posted by samdudes01
Quote:

[21:51:13] Filter Scripts
[21:51:13] ---------------
[21:51:13] Loading filter script 'announce.amx'...
[21:51:13] Failed to load 'filterscripts/announce.amx.amx' filter script.
[21:51:13] Unable to load filter script 'announce.amx'.
[21:51:13] Loaded 0 filter scripts.

Quote:

filterscripts announce

they are the same though
how do you get the times?? in brackets?


Re: /ann - Agent Smith - 14.03.2009

its on the server log, it has all the times of when something has loaded, crahsed, etc


Re: /ann - StrickenKid - 14.03.2009

o, lol i thought that was from the ms dos.
i feel stupid


Re: /ann - Zoopaman - 14.03.2009

what is the filename in /filterscripts/ folder? maybe you have set file extensions to be hidden?

You could also try this:

Open control panel -> folder options -> View
This needs to be unchecked:

Make sure it is, then check the file name again


Re: /ann - Agent Smith - 14.03.2009

announce.amx and announce.pwn but the announce.amx file when i opened it up it has nothing inside, 0 KB