16.08.2012, 08:44
TeamTalk by iToast
TeamTalk is for small servers with teams already implemented that want to add team chatting without any hastle!
TeamTalk has one command, /t <msg> to chat with your team, all messages ARE logged!
Source:
TeamTalk is for small servers with teams already implemented that want to add team chatting without any hastle!
TeamTalk has one command, /t <msg> to chat with your team, all messages ARE logged!
Source:
Код:
/* TeamTalk - Your Team 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("TeamTalk by iToast Loaded"); return 1; } public OnFilterScriptExit() { print("TeamTalk by iToast Un-Loaded!"); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { dcmd(t, 1, cmdtext); return false; } dcmd_t(playerid, params[]) { if(GetPlayerTeam(playerid) != NO_TEAM) { new team = GetPlayerTeam(playerid); new msg[300], name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(msg, sizeof(msg), "[TeamTalk] %s: %s", name, params); print(msg); for(new i = 0; i < MAX_PLAYERS; i++) { if(GetPlayerTeam(i) == team) { SendClientMessage(i, COLOR_YELLOW, msg); } } }else{ SendClientMessage(playerid, COLOR_RED, "[TeamTalk] You're not in any teams!"); } return 1; }