Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #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("");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("");
- 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), "{F83934}[TeamTalk]:{8B8B8B} %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, "{F83934}[TeamTalk]:{8B8B8B} Nisi u nikojem timu!");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment