Advertisement
Guest User

**Ice Cream System - Different Ice creams - From Scratch**

a guest
May 3rd, 2013
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.59 KB | None | 0 0
  1. // Ice Cream System
  2. // By SimpalK from Scratch
  3. // Thanks for using ;)
  4.  
  5. #include <a_samp>
  6. #include <zcmd>
  7.  
  8. #define COLOR_YELLOW 0xFFFF00AA
  9. #define COLOR_RED 0xAA3333AA
  10.  
  11. public OnFilterScriptInit()
  12. {
  13.     print("\n--------------------------------------");
  14.     print(" Ice Cream System - By SimpalK - Loaded ");
  15.     print("--------------------------------------\n");
  16.     CreateObject(170, 1030.96, 1361.74, 10.80,   92.00, 105.00, 66.00);
  17.     return 1;
  18. }
  19.  
  20. public OnFilterScriptExit()
  21. {
  22.     print("\n--------------------------------------");
  23.     print(" Ice Cream System - By SimpalK - Unloaded ");
  24.     print("--------------------------------------\n");
  25.     return 1;
  26. }
  27.  
  28. public OnPlayerSpawn(playerid)
  29. {
  30.     CreateObject(170, 1030.96, 1361.74, 10.80,   92.00, 105.00, 66.00);
  31.     return 1;
  32. }
  33.  
  34. CMD:icecream(playerid, params[])
  35. {
  36.     SetPlayerCheckpoint(playerid, 1032.3879,1362.8142,10.8203, 1.0);
  37.     SendClientMessage(playerid, COLOR_RED,"Ice cream Shop is now Shown to you on Map.");
  38.     return 1;
  39. }
  40.  
  41. public OnPlayerEnterCheckpoint(playerid)
  42. {
  43.     if(GetPlayerMoney(playerid) < 100)
  44.     {
  45.         SendClientMessage(playerid, COLOR_RED,"You Need $100 To buy Ice Cream.");
  46.     }
  47.     if(GetPlayerMoney(playerid) >= 100)
  48.     {
  49.         new IceCreams;
  50.         IceCreams = random(4);
  51.         switch(IceCreams)
  52.         {
  53.                case 0:
  54.                {
  55.                   SendClientMessage(playerid, COLOR_YELLOW,"You have Bought Choclate Flavoured Ice Cream.");
  56.                   GivePlayerMoney(playerid, GetPlayerMoney(playerid) - 100);
  57.                   DisablePlayerCheckpoint(playerid);
  58.                }
  59.                case 1:
  60.                {
  61.                   SendClientMessage(playerid, COLOR_YELLOW,"You have Bought Vanilla Flavoured Ice Cream.");
  62.                   GivePlayerMoney(playerid, GetPlayerMoney(playerid) - 100);
  63.                   DisablePlayerCheckpoint(playerid);
  64.                }
  65.                case 2:
  66.                {
  67.                   SendClientMessage(playerid, COLOR_YELLOW,"You have Bought Butter Scotch Flavoured Ice Cream.");
  68.                   GivePlayerMoney(playerid, GetPlayerMoney(playerid) - 100);
  69.                   DisablePlayerCheckpoint(playerid);
  70.                }
  71.                case 3:
  72.                {
  73.                   SendClientMessage(playerid, COLOR_YELLOW,"You have Bought Mango Flavoured Ice Cream.");
  74.                   GivePlayerMoney(playerid, GetPlayerMoney(playerid) - 100);
  75.                   DisablePlayerCheckpoint(playerid);
  76.                }
  77.        }
  78.     }
  79.     return 1;
  80. }
  81.  
  82. //////////////////////////////////////////////////////////////////////////////// Thanks for using!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement