MuhammadZeeshan

ggasdasd

Jun 1st, 2017
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.20 KB | None | 0 0
  1. // ===== onCheckpointEntered ======
  2. case 6:
  3. status[ player.ID ].CheckpointEntered = true;
  4. SendMessage( "Wanna buy some drinks? Use /products for available product list", player );
  5. break;
  6.  
  7. // ===== onCheckpointExited =======
  8. function onCheckpointExited( player, checkpoint )
  9. {
  10. switch( checkpoint )
  11. {
  12. case 6:
  13. status[ player.ID ].CheckpointEntered = false;
  14. break;
  15.  
  16. case 7:
  17. status[ player.ID ].CheckpointEntered = false;
  18. break;
  19.  
  20. }
  21. }
  22.  
  23. // ===== COMMAND ======
  24. else if ( cmd == "buydrink" )
  25. {
  26. if ( status[ player.ID ].Registered == false ) ErrorMessage( "[#FFFFFF]You need to be a part of our community to use this command.", player );
  27. else if ( status[ player.ID ].Logged == false ) ErrorMessage( "[#FFFFFF]You need to be identified to use this command.", player );
  28. else if (!text) ErrorMessage( "/"+cmd+" <Product name>, use /products for available products list.", player );
  29. else if ( status[ player.ID ].CheckpointEntered == false ) ErrorMessage( "You must be at pole position or malibu club checkpoints to buy some drinks", player );
  30. else
  31. {
  32. if ( text == "beer" )
  33. {
  34. MessagePlayer( GREEN+"You have drank a glass of beer for $50 and now you're drunk walk/drive carefully.", player );
  35. player.SetDrunkLevel( 30, 30 );
  36. DecCash( player, 50 );
  37. }
  38.  
  39. else if ( text == "vodka" )
  40. {
  41. MessagePlayer( GREEN+"You have drank a vodka botel for $30 and now you're drunk walk/drive carefully.", player );
  42. player.SetDrunkLevel( 20, 20 );
  43. DecCash( player, 30 );
  44. }
  45.  
  46. else if ( text == "whisky" )
  47. {
  48. MessagePlayer( GREEN+"You have drank a glass of whisky for $100 and now you're drunk walk/drive carefully.", player );
  49. player.SetDrunkLevel( 50, 50 );
  50. DecCash( player, 100 );
  51. }
  52.  
  53. else if ( text == "goldslick" )
  54. {
  55. MessagePlayer( GREEN+"You have drank a botel of goldslick for $110 and now you're drunk walk/drive carefully.", player );
  56. player.SetDrunkLevel( 60, 60 );
  57. DecCash( player, 110 );
  58. }
  59.  
  60. else if ( text == "colddrink" )
  61. {
  62. MessagePlayer( GREEN+"You have drank a botel of Cold drink for $25 and your health has increased by +1.", player );
  63. player.Health += 1;
  64. DecCash( player, 25 );
  65. }
  66.  
  67. else ErrorMessage( "The product you want is not available here. Use /products for available product list.", player );
  68. }
  69. }
Add Comment
Please, Sign In to add comment