Advertisement
Guest User

MakeMeDrunkFilterscript[Pawn]

a guest
Aug 1st, 2012
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.01 KB | None | 0 0
  1. #include <a_samp>
  2. #define FILTERSCRIPT
  3. #define blue 0x375FFFFF
  4. #define red 0xAA3333AA
  5.  
  6. public OnFilterScriptInIt()
  7. {
  8.     print("/n-------------------------------");
  9.     print(" NoahF's useful FilterScript has loaded successfully."); //Shows a message in Samp-Server.exe saying the FilterScript has loaded successfully.
  10.     print("-------------------------------/n");
  11.     return 1;
  12. }
  13. public OnFilterScriptExit()
  14. {
  15.     return 1;
  16. }
  17. public OnPlayerCommandText(playerid, cmdtext[])
  18. {
  19.     new pName[24];
  20.     new str[128];
  21.    
  22.     if(!strcmp(cmdtext, "/makemedrunk", true, 12))  //The command that turns on the drunk effects.
  23.     {
  24.         SetPlayerDrunkLevel (playerid, 50000);
  25.         GetPlayerName(playerid, pName, 24);
  26.         format(str, 128, "%s Has made themselves drunk with the /makemedrunk command! Be careful not to drink and drive a vehicle or it may result in an accident!");
  27.         SendClientMessage(playerid, blue, "You have made yourself drunk! Don't drink and drive ;)");
  28.         SendClientMessage(playerid, blue, "If you want to turn off the drunk effects, just type /notdrunk!");
  29.         SendClientMessageToAll(red, str);
  30.         return 1;
  31.     }
  32.     if(!strcmp(cmdtext, "/notdrunk", true, 9))  //The command that turns off the drunk effects.
  33.     {
  34.         SetPlayerDrunkLevel (playerid, 0);
  35.         SendClientMessage(playerid, blue, "You have turned off the drunk effects! It is now safe to drive.");
  36.         SendClientMessageToAll(red, str);
  37.         return 1;
  38.     }
  39.     return 0;
  40. }
  41.  
  42.    
  43. /*
  44. -----------------------------------------CREDITS----------------------------------------
  45. MakeMeDrunk FilterScript scripted/created by Noah Fallon (NoahF) on 7/31/12.
  46. Please do not remove these credits.
  47. Changing things are allowed but when you do please post the newly modified code in a reply to my SA-MP Forums topic on this FS.
  48. Thanks for using ;)
  49. Also, don't be afraid to put some constructive criticism in a reply to the topic! This is my first FS and I would like to know how I can improve on future scripts. :)
  50. -----------------------------------------END OF CREDITS---------------------------------
  51. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement