Advertisement
noahfallon

NoahF's Rick Roll FilterScript LUXADMIN Edition

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