Advertisement
Guest User

Untitled

a guest
May 20th, 2014
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.91 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3. #include <sscanf>
  4.  
  5. #define MESSAGE "im gay" //Change to your own likings
  6. new noexit[MAX_PLAYERS], toggle[MAX_PLAYERS], text[MAX_PLAYERS];
  7.  
  8. //Trolling Tools
  9. CMD:fakechat(playerid, params[])
  10. {
  11. new id, msg[256], string[256];
  12. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "SERVER: Unknown command.");
  13. if(sscanf(params,"ds",id,msg)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /fakechat [id] [msg]");
  14. format(string, sizeof(string), "%s",msg);
  15. SendPlayerMessageToAll(id, string);
  16. return 1;
  17. }
  18.  
  19. CMD:bubblechat(playerid, params[])
  20. {
  21. new id, msg[256];
  22. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "SERVER: Unknown command.");
  23. if(sscanf(params,"ds",id,msg)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /bubblechat [id] [msg]");
  24. SetPlayerChatBubble(id, msg, -1, 100.0, 9999999);
  25. return 1;
  26. }
  27.  
  28. CMD:undercover(playerid, params[])
  29. {
  30. new msg[256], string[256], string1[128], string2[256];
  31. new name1[MAX_PLAYER_NAME];
  32. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "SERVER: Unknown command.");
  33. if(sscanf(params,"s",msg)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /undercover [newname]");
  34. format(string, sizeof(string), "%s",msg);
  35. GetPlayerName(playerid, name1, sizeof(name1)); //here, enter your ENTER/EXIT messages, something like this:
  36. format(string1, sizeof(string1), "%s [%d] has left the server.",name1,playerid);
  37. format(string2, sizeof(string2), "%s [%d] has joined the server.",name1,playerid);
  38. SendClientMessageToAll(-1, string1);
  39. SendClientMessageToAll(-1, string2); // NOTE: DO NOT USE THE SAME ENTER/EXIT MESSAGES, SET TO YOUR OWN!
  40. SetPlayerName(playerid, string);
  41. return 1;
  42. }
  43.  
  44. CMD:putinveh(playerid, params[])
  45. {
  46. new id;
  47. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "SERVER: Unknown command.");
  48. if(sscanf(params,"d",id)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /putinveh [id]");
  49. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You must be on vehicle!");
  50. if(noexit[id] == 1) noexit[id] = 0;
  51. noexit[id] = 1;
  52. PutPlayerInVehicle(id, GetPlayerVehicleID(playerid), 1);
  53. return 1;
  54. }
  55.  
  56. CMD:toghs(playerid, params[])
  57. {
  58. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "SERVER: Unknown command.");
  59. if(toggle[playerid] == 1) {
  60. SendClientMessage(playerid, -1, "Toggle HS off.");
  61. toggle[playerid] = 0;
  62. return 1; }
  63. if(toggle[playerid] == 0) {
  64. SendClientMessage(playerid, -1, "Toggle HS on.");
  65. SendClientMessage(playerid, -1, "To use this shitty headshot, just shoot a player even if it's on the body, and boom!");
  66. toggle[playerid] = 1;
  67. return 1; }
  68. return 1;
  69. }
  70.  
  71. CMD:togtxt(playerid, params[])
  72. {
  73. if(!IsPlayerAdmin(playerid)) return 0;
  74. new id;
  75. if(sscanf(params,"d",id)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /togtxt [id]");
  76. if(text[id] == 1) {
  77. SendClientMessage(playerid, -1, "Toggle text off.");
  78. text[id] = 0;
  79. return 1; }
  80. if(text[id] == 0) {
  81. SendClientMessage(playerid, -1, "Toggle text on.");
  82. text[id] = 1;
  83. return 1; }
  84. return 1;
  85. }
  86.  
  87. public OnPlayerText(playerid, text[])
  88. {
  89. if(text[playerid] == 1) {
  90. new pText[144];
  91. format(pText, sizeof (pText), "%s", MESSAGE);
  92. SendPlayerMessageToAll(playerid, pText);
  93. return 0; }// ignore the default text and send the custom one
  94. return 1;
  95. }
  96.  
  97. public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
  98. {
  99. //You must hit the player for auto headshot
  100. if(weaponid == 34 && toggle[playerid] == 1 && hittype == BULLET_HIT_TYPE_PLAYER) {
  101. SetPlayerHealth(hitid, 0.0);
  102. GameTextForPlayer(hitid, "~r~headshot!", 1000, 5); }
  103. return 1;
  104. }
  105.  
  106. public OnPlayerExitVehicle(playerid, vehicleid)
  107. {
  108. if(noexit[playerid] == 1) {
  109. PutPlayerInVehicle(playerid, GetPlayerVehicleID(playerid), 1); }
  110. return 1;
  111. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement