[FilterScript] AdminTalk - A simple admin chatroom - 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: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] AdminTalk - A simple admin chatroom (
/showthread.php?tid=369208)
AdminTalk - A simple admin chatroom -
iToast - 16.08.2012
AdminTalk by iToast
AdminTalk is for small servers that need a admin only chatroom!
AdminTalk has one command, /a <msg> to chat with your admins, all messages ARE logged!
Source:
Код:
/*
AdminTalk - Your Admin Chatting needs!
Copyright © 2012 iToast / iToasterman
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <a_samp>
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_RED 0xAA3333AA
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
public OnFilterScriptInit()
{
print("AdminTalk by iToast Loaded");
return 1;
}
public OnFilterScriptExit()
{
print("AdminTalk by iToast Un-Loaded!");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(a, 1, cmdtext);
return false;
}
dcmd_a(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new msg[300], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(msg, sizeof(msg), "[Admin] %s: %s", name, params);
print(msg);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerAdmin(i))
{
SendClientMessage(i, COLOR_YELLOW, msg);
}
}
}else{
SendClientMessage(playerid, COLOR_RED, "[AdminTalk] You're not in a admin!");
}
return 1;
}
This IS a FORK of TeamTalk
Re: AdminTalk - A simple admin chatroom -
KarimCms - 10.07.2014
+1 Work
Re: AdminTalk - A simple admin chatroom -
Faix - 10.07.2014
Good job.
Re: AdminTalk - A simple admin chatroom -
mrikill - 23.09.2014
gj
Re: AdminTalk - A simple admin chatroom -
Uberanwar - 29.09.2014
That's pretty simple, but nice one.