Guest User

HOT DOG SYSTEM BY Antonio Cadenas

a guest
Nov 1st, 2012
747
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.42 KB | None | 0 0
  1. /*
  2. ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  3. --------------------FilterScript Created By: Antonio_Cadenas--------------------
  4. ----------------------------------HOTDOG SYSTEM---------------------------------
  5. -----------------------------[DO NOT REMOVE CREDITS]----------------------------
  6. ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  7. */
  8.  
  9. #define FILTERSCRIPT
  10. #include <a_samp>
  11. #include <zcmd>
  12.  
  13.  
  14. #define Gray                0xAFAFAFAA
  15. #define COLOR_RED           0xFF0000AA
  16. #define COLOR_WHITE         0xFFFFFFAA
  17.  
  18. new HasHotDog[MAX_PLAYERS];
  19.  
  20. public OnFilterScriptInit()
  21. {
  22.     Create3DTextLabel("Hot Dog Stall, Use {FFFFFF}/HotDog ",0xFF0000AA,1497.3090,-1633.5553,14.0469,20.0,0); // < Sin funcion (No borrar)
  23.     Create3DTextLabel("Hot Dog Stall, Use {FFFFFF}/HotDog ",0xFF0000AA,1497.3090,-1633.5553,14.0469,20.0,0);
  24.     Create3DTextLabel("Hot Dog Stall, Use {FFFFFF}/HotDog",0xFF0000AA,1468.1287,-1678.5992,14.0469,20.0,0);
  25.     Create3DTextLabel("Hot Dog Stall, Use {FFFFFF}/HotDog",0xFF0000AA,1811.2280,-1843.0420,13.5781,20.0,0);
  26.  
  27.     CreatePickup(1239, 1, 1497.3090,-1633.5553,14.0469); // < Sin funcion (No borrar)
  28.     CreatePickup(1239, 1, 1497.3090,-1633.5553,14.0469);
  29.     CreatePickup(1239, 1, 1468.1287,-1678.5992,14.0469);
  30.     CreatePickup(1239, 1, 1811.2280,-1843.0420,13.5781);
  31.  
  32.     CreateObject(1340, 1496.6999511719, -1632.6999511719, 14.199999809265, 0, 0, 306);
  33.     CreateObject(1341, 1467, -1678.9000244141, 14, 0, 0, 32);
  34.     CreateObject(1340, 1810.5, -1843.8000488281, 13.699999809265, 0, 0, 44);
  35.     return 1;
  36. }
  37.  
  38. CMD:eathotdog(playerid, params[])
  39. {
  40.     if(IsPlayerConnected(playerid))
  41.     {
  42.         if(HasHotDog[playerid] == 0)
  43.         {
  44.             SendClientMessage(playerid, COLOR_WHITE, "You Dont Have Any HotDog");
  45.             return 1;
  46.         }
  47.         HasHotDog[playerid] --;
  48.         new string[256];
  49.         format(string, 256, "{FFFFFF}As You Have Eaten A HotDog. Now You Have Left {FF0000}%d {FFFFFF}HotDog(s)", HasHotDog);
  50.         SendClientMessage(playerid, Gray, string);
  51.         SetPlayerHealth(playerid, 100.0);
  52.     }
  53.     return 1;
  54. }
  55.  
  56. CMD:hotdog(playerid, params[])
  57. {
  58.     if(IsPlayerInRangeOfPoint(playerid,2,1497.3090,-1633.5553,14.0469) || IsPlayerInRangeOfPoint(playerid,2,1468.1287,-1678.5992,14.0469) || IsPlayerInRangeOfPoint(playerid,2,1811.2280,-1843.0420,13.5781))
  59.     {
  60.         if(HasHotDog[playerid] == 3)
  61.         {
  62.             SendClientMessage(playerid, Gray, "{FFFFFF}You Can Only Buy{FF0000}3 {FFFFFF}HotDog.");
  63.             return 1;
  64.         }
  65.         if(GetPlayerMoney(playerid) < 50)
  66.         {
  67.             SendClientMessage(playerid, Gray, "{FFFFFF}You Dont Have Enough Money To Buy HotDog. You Need{FF0000}$50 {FFFFFF}To Buy A HotDog.");
  68.             return 1;
  69.         }
  70.         HasHotDog[playerid] += 1;
  71.         new string[256];
  72.         format(string, 256, "{FFFFFF}You Bought A HotDog For {FF0000}$50{FFFFFF}, You Now Have Total Number Of {FF0000}%d {FFFFFF}HotDog(s)", HasHotDog);
  73.         SendClientMessage(playerid, Gray, string);
  74.         GivePlayerMoney(playerid, -50);
  75.     }
  76.     else
  77.     {
  78.         SendClientMessage(playerid, COLOR_WHITE, "You Are Not Near To Any of The HotDog Stalls");
  79.         return 1;
  80.     }
  81.     return 1;
  82. }
  83.  
  84. /*
  85. ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  86. --------------------FilterScript Created By: Antonio_Cadenas--------------------
  87. ----------------------------------HOTDOG SYSTEM---------------------------------
  88. -----------------------------[DO NOT REMOVE CREDITS]----------------------------
  89. ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  90. */
Advertisement
Add Comment
Please, Sign In to add comment