Advertisement
noahfallon

NoahF's Rick Roll FilterScript

Aug 29th, 2012
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.41 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3. #include <sscanf2>
  4. #define FILTERSCRIPT
  5. #define COLOR_RED 0xFF0000FF
  6. #define COLOR_GREY 0xAFAFAFAA
  7. #define COLOR_DBLUE 0x00007AFF
  8.  
  9. public OnFilterScriptInit()
  10. {
  11.     print("*********************************************");
  12.     print("NoahF's RickRoll Filterscript has loaded!");
  13.     print("*********************************************");
  14.     return 1;
  15. }
  16. public OnFilterScriptExit()
  17. {
  18.     print("************************************************");
  19.     print("NoahF's RickRoll Filterscript has unloaded!");
  20.     print("************************************************");
  21.     return 1;
  22. }
  23.  
  24. CMD:rickroll(playerid, params[])
  25.     {
  26.         if(IsPlayerAdmin(playerid)) {
  27.             new PlayerID; //The variable for the Player ID you put in for the player we want to Rick Roll.
  28.             new reason[64]; //The reason for the Rick Roll.
  29.             new str[128]; //Our variable for a message string.
  30.             new pName[MAX_PLAYER_NAME], adName[MAX_PLAYER_NAME]; //Defines the function with the player name you want to get.
  31.             GetPlayerName(playerid, adName, sizeof(adName)); //Defines the function with the admin name you want to get.
  32.             GetPlayerName(playerid, pName, sizeof(pName));
  33.             if(sscanf(params, "us[64]", PlayerID,reason)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /rickroll [playerid] [reason]"); //Tell SSCANF if the parameters/the syntax is written wrong to return a message (PlayerID and the reason used here)
  34.  
  35.             if(!IsPlayerConnected(playerid)) //If the ID is wrong or not connected, return the message below:
  36.             return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");
  37.  
  38.             format(str, sizeof(str), "'%s' has been Rick Roll'd by Administrator '%s'. Reason: %s ", pName, adName, reason); //format the string we've defined to send the message, playername and adminname are used to receive the information about the names
  39.             SendClientMessageToAll(COLOR_RED, str); //Send the message we formatted with format using the str variable we declared/made.
  40.             PlayAudioStreamForPlayer(playerid, "http://www.geekspeakradio.us/jocofullinterview41.mp3"); //Play the Rick Roll song. (Never Gonna Give You Up - Rick Astley.)
  41.             GameTextForPlayer(playerid, "~r~You have been Rick Roll'd by an Admin!", 4000, 3); //Send a message to the players screen.
  42.             SetPlayerHealth(playerid, 0.3); //Set the players health to %30.
  43.         }
  44.         else //If he isn't logged into RCON, then do:
  45.         {
  46.             SendClientMessage(playerid, COLOR_DBLUE, "You need to be an RCON Admin to use that command!"); //Send this message if they are not RCON.
  47.         }
  48.         return 1;
  49.     }
  50.    
  51.  
  52.  
  53. /*-----------------------------------------------------------------------------------------------------------------------------------
  54. Hi! Thanks for checking out my Rick Roll FilterScript ;)
  55. I would greatly appreciate it if you won't remove these credits.
  56. This FilterScript was made on 8/28/2012 at 8:00 P.M. by NoahF.
  57. Don't be afraid to post constructive criticism in a reply to this topic! I'd like to make this script better if I can. ;)
  58. Again, thanks for using!
  59. Also, thanks to Zeex for ZCMD
  60. Thanks to Y_Less for SSCANF
  61. Thanks to iGetty for some more help ;)
  62. Thanks to Luxorion for LuxAdmin and the <ladmin> include
  63. ---------------------------------------------------------END OF CREDITS--------------------------------------------------------------
  64. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement