Guest User

Untitled

a guest
Feb 4th, 2014
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1.  
  2. #include <a_samp>
  3.  
  4. #define COLOR_YELLOW 0xFFFF00AA
  5. #define COLOR_RED 0xAA3333AA
  6.  
  7. #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
  8.  
  9. public OnFilterScriptInit()
  10. {
  11. print("");
  12. return 1;
  13. }
  14.  
  15. public OnFilterScriptExit()
  16. {
  17. print("");
  18. return 1;
  19. }
  20.  
  21. public OnPlayerCommandText(playerid, cmdtext[])
  22. {
  23. dcmd(t, 1, cmdtext);
  24. return false;
  25. }
  26.  
  27. dcmd_t(playerid, params[])
  28. {
  29. if(GetPlayerTeam(playerid) != NO_TEAM)
  30. {
  31. new team = GetPlayerTeam(playerid);
  32. new msg[300], name[MAX_PLAYER_NAME];
  33. GetPlayerName(playerid, name, sizeof(name));
  34. format(msg, sizeof(msg), "{F83934}[TeamTalk]:{8B8B8B} %s: %s", name, params);
  35. print(msg);
  36. for(new i = 0; i < MAX_PLAYERS; i++)
  37. {
  38. if(GetPlayerTeam(i) == team)
  39. {
  40. SendClientMessage(i, COLOR_YELLOW, msg);
  41. }
  42. }
  43. }else{
  44. SendClientMessage(playerid, COLOR_RED, "{F83934}[TeamTalk]:{8B8B8B} Nisi u nikojem timu!");
  45. }
  46. return 1;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment