Advertisement
Guest User

MakeMeDrunkv1.2

a guest
Aug 24th, 2012
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.58 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("****************************------------------------------");
  9.     print(" NoahF's useful FilterScript has loaded successfully."); //Shows a message in Samp-Server.exe saying the FilterScript has loaded successfully.
  10.     print("****************************------------------------------");
  11.     return 1;
  12. }
  13. public OnFilterScriptExit()
  14. {
  15.     print("****************************----------------------------");
  16.     print("NoahF's MakeMeDrunk Filterscript successfully unloaded.");
  17.     print("****************************----------------------------");
  18.     return 1;
  19. }
  20. public OnPlayerCommandText(playerid, cmdtext[])
  21. {
  22.     new pName[24];
  23.     new str[128];
  24.     new pName2[24];
  25.     new str2[128];
  26.  
  27.     if(!strcmp(cmdtext, "/makemedrunk", true, 12))  //The command that turns on the drunk effects.
  28.     {
  29.         SetPlayerDrunkLevel (playerid, 50000);
  30.         GetPlayerName(playerid, pName, 24);
  31.         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!");
  32.         SendClientMessage(playerid, blue, "You have made yourself drunk! Don't drink and drive ;)");
  33.         SendClientMessage(playerid, blue, "If you want to turn off the drunk effects, just type /notdrunk!");
  34.         SendClientMessageToAll(red, str);
  35.         ApplyAnimation(playerid,"PED","WALK_DRUNK",4.1,1,1,1,0,0,0);
  36.         ApplyAnimation(playerid,"RIOT","RIOT_FUKU",4.1,1,1,1,0,0,0);
  37.         return 1;
  38.     }
  39.  
  40.     if(!strcmp(cmdtext, "/notdrunk", true, 9))  //The command that turns off the drunk effects.
  41.     {
  42.         SetPlayerDrunkLevel (playerid, 0);
  43.         GetPlayerName(playerid, pName2, 24);
  44.         format(str2, 128, "%s has turned off the drunk effects! It is now safe for them to drive.");
  45.         SendClientMessage(playerid, blue, "You have turned off the drunk effects! It is now safe to drive.");
  46.         SendClientMessageToAll(red, str2);
  47.         ClearAnimations(playerid);
  48.         return 1;
  49.     }
  50.     return 0;
  51. }
  52.  
  53.    
  54. /*
  55. -----------------------------------------CREDITS----------------------------------------
  56. MakeMeDrunk FilterScript scripted/created by Noah Fallon (NoahF) on 7/31/12.
  57. Please do not remove these credits.
  58. 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.
  59. Thanks for using ;)
  60. 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. :)
  61. -----------------------------------------END OF CREDITS---------------------------------
  62. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement