Advertisement
Guest User

Cueball

a guest
Aug 30th, 2008
589
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. // This Name Tags FS is made by OutlawAK alias [GoD]Outlaw
  2. // Mainly i made this GM for movie making
  3. // Enjoy this stuff !!!
  4. // Date: 30.08.2008
  5. // Feel free to do anything with credits, but i hope your respect my job
  6.  
  7. #include <a_samp>
  8.  
  9. #define COLOR_GREY 0xAFAFAFAA
  10. #define COLOR_RED 0xFF4646FF
  11.  
  12. new gNameTags[MAX_PLAYERS];
  13.  
  14. #define FILTERSCRIPT
  15. #if defined FILTERSCRIPT
  16.  
  17. public OnFilterScriptInit()
  18. {
  19. print("\n--------------------------------------");
  20. print(" Name Tags Off/On by Outlaw ");
  21. print(" LOADED Perfectly ");
  22. print("--------------------------------------\n");
  23. return 1;
  24. }
  25.  
  26. #endif
  27.  
  28. public OnPlayerConnect(playerid)
  29. {
  30. SendClientMessage(playerid, COLOR_GREY, "|�| You can turn on/off the nametags: /tagshelp");
  31. gNameTags[playerid] = 1;
  32.  
  33. for(new i; i < MAX_PLAYERS; i++)
  34. if(IsPlayerConnected(i) && gNameTags[i] == 0)
  35. ShowPlayerNameTagForPlayer(i, playerid, 0);
  36.  
  37. return 1;
  38. }
  39.  
  40. public OnPlayerDisconnect(playerid, reason)
  41. {
  42. gNameTags[playerid] = 0;
  43. return 1;
  44. }
  45.  
  46. public OnPlayerCommandText(playerid, cmdtext[])
  47. {
  48. if(strcmp("/tagshelp", cmdtext, true, 9) == 0)
  49. {
  50. SendClientMessage(playerid, COLOR_GREY, "|�| To turn nametags OFF type: /tagsoff");
  51. SendClientMessage(playerid, COLOR_GREY, "|�| To turn nametags ON type: /tagson");
  52. SendClientMessage(playerid, COLOR_GREY, "|�| Credits: OutlawAK ");
  53. return 1;
  54. }
  55.  
  56. if(strcmp("/tagsoff", cmdtext, true, 8) == 0)
  57. {
  58. SendClientMessage(playerid, COLOR_RED, "|�| You have turned the nametags OFF");
  59. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  60.  
  61. for(new i; i < MAX_PLAYERS; i++)
  62. if(IsPlayerConnected(i))
  63. ShowPlayerNameTagForPlayer(playerid, i, 0);
  64.  
  65. gNameTags[playerid] = 0;
  66.  
  67. return 1;
  68. }
  69.  
  70. if(strcmp("/tagson", cmdtext, true, 7) == 0)
  71. {
  72. SendClientMessage(playerid, COLOR_RED, "|�| You have turned the nametags ON");
  73. PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
  74.  
  75. for(new i; i < MAX_PLAYERS; i++)
  76. if(IsPlayerConnected(i))
  77. ShowPlayerNameTagForPlayer(playerid, i, 1);
  78.  
  79. gNameTags[playerid] = 1;
  80.  
  81. return 1;
  82. }
  83.  
  84. return 0;
  85. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement