daily pastebin goal
28%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //------------------------------------------------------------------------------
  2. #include <a_samp>
  3. #include <dini>
  4. #pragma tabsize 0
  5. #define CashBomb 5000
  6. #define NumberBomb 10
  7. new Float:x, Float:y, Float:z;
  8. new BlowBomb[MAX_PLAYERS];
  9. new BuyBomb[MAX_PLAYERS];
  10. new BString[100];
  11. new Bomb;
  12. //------------------------------------------------------------------------------
  13. public OnPlayerConnect(playerid)
  14. {
  15.     return 1;
  16. }
  17. //------------------------------------------------------------------------------
  18. public OnPlayerDisconnect(playerid)
  19. {
  20.     return 1;
  21. }
  22. //------------------------------------------------------------------------------
  23. public OnPlayerCommandText(playerid, cmdtext[])
  24. {
  25.     new cmd[256],idx;
  26.     cmd = strtok(cmdtext,idx);
  27.     if(!strcmp(cmd,"/buybomb",true))
  28.     {
  29.         PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
  30.         if(BuyBomb[playerid] == NumberBomb) return ShowPlayerDialog(playerid,409,DIALOG_STYLE_MSGBOX," ","{FF0000}äîâáìä ùì äôööåú òã - 10 - ôööåú áìáã\n/Usebomb - ìäúîðú ôööåú ä÷ìã àú äô÷åãä","àéùåø","");
  31.         if(GetPlayerMoney(playerid) < CashBomb) return ShowPlayerDialog(playerid,501,DIALOG_STYLE_MSGBOX," ","{FF0000}$5000 - àéï ìê îñôé÷ ëñó ì÷ðåú ôööä òìåú äôööä äéà","àéùåø","");
  32.         GivePlayerMoney(playerid,-5000);
  33.         BuyBomb[playerid] += 1;
  34.         format(BString, sizeof(BString), "{00FF00}[%d] - :îñôø äôööåú ùàúä ÷ðéú ëøâò äí\n{FF0000}/Usebomb - ìäúîðú ôööåú ä÷ìã àú äô÷åãä", BuyBomb);
  35.         ShowPlayerDialog(playerid,11111,DIALOG_STYLE_MSGBOX," ",BString,"àéùåø","");
  36.         return 1;
  37.     }
  38. //------------------------------------------------------------------------------
  39.     if(!strcmp(cmd,"/usebomb",true))
  40.     {
  41.         PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
  42.         if(BuyBomb[playerid] == 0) return ShowPlayerDialog(playerid,502,DIALOG_STYLE_MSGBOX," ","{FF0000}/Buybomb - àéï ìê ôööä ì÷ðééä ä÷ìã","àéùåø","");
  43.         {
  44.             if(BuyBomb[playerid] > 0)
  45.             {
  46.                 GetPlayerPos(playerid,x,y,z);
  47.                 Bomb = CreatePickup(1252,23,x,y,z,-1);
  48.                 ApplyAnimation(playerid, "BOMBER","BOM_Plant_In",4.0,0,0,0,0,0);
  49.                 BuyBomb[playerid] -= 1;
  50.                 BlowBomb[playerid] = 1;
  51.                 format(BString, sizeof(BString), "{00FF00}[%d] - :îñôø äôööåú ùàúä ÷ðéú ëøâò äí\n{FF0000}/BlowBomb - ìäôòìú äôööåú ä÷ìã àú äô÷åãä", BuyBomb);
  52.                 ShowPlayerDialog(playerid,503,DIALOG_STYLE_MSGBOX," ",BString,"àéùåø","");
  53.             }
  54.         }
  55.         return 1;
  56.     }
  57. //------------------------------------------------------------------------------
  58.     if(!strcmp(cmd,"/blowbomb",true))
  59.     {
  60.         PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
  61.         if(BlowBomb[playerid] == 0) return  ShowPlayerDialog(playerid,504,DIALOG_STYLE_MSGBOX," ","{FF0000}/Usebomb - àúä ìà äúîðú ùåí ôööä ìäúîðä ä÷ìã","àéùåø","");
  62.         ShowPlayerDialog(playerid,505,DIALOG_STYLE_MSGBOX," ","{FF0000}æäéøåú! äôööä äåôòìä åúôåöõ áòåã 10 ùðéåú","àéùåø","");
  63.         SetTimer("bombing",10000,false);
  64.         BlowBomb[playerid] = 0;
  65.         return 1;
  66.     }
  67. //------------------------------------------------------------------------------
  68.     if(!strcmp(cmd,"/numbomb",true))
  69.     {
  70.         PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
  71.         if(BuyBomb[playerid] == 0) return ShowPlayerDialog(playerid,502,DIALOG_STYLE_MSGBOX," ","{FF0000}àéï ìê ôööåú æîéðåú","àéùåø","");
  72.         format(BString, sizeof(BString), "{00FF00}[%d] - îñôø äôööåú ùìê äåà", BuyBomb);
  73.         ShowPlayerDialog(playerid,503,DIALOG_STYLE_MSGBOX," ",BString,"àéùåø","");
  74.         return 1;
  75.     }
  76.     return 0;
  77. }
  78. //------------------------------------------------------------------------------
  79. forward bombing();
  80. public bombing()
  81. {
  82.     GetPlayerPos(Bomb,x,y,z);
  83.     CreateExplosion(x,y,z,7,10);
  84.     DestroyPickup(Bomb);
  85.     SetTimer("bombing1",250,false);
  86.     return 0;
  87. }
  88. //------------------------------------------------------------------------------
  89. forward bombing1();
  90. public bombing1()
  91. {
  92.     GetPlayerPos(Bomb,x,y,z);
  93.     CreateExplosion(x,y,z,7,10);
  94.     DestroyPickup(Bomb);
  95.     SetTimer("bombing2",250,false);
  96.     return 0;
  97. }
  98. //------------------------------------------------------------------------------
  99. forward bombing2();
  100. public bombing2()
  101. {
  102.     GetPlayerPos(Bomb,x,y,z);
  103.     CreateExplosion(x,y,z,7,10);
  104.     DestroyPickup(Bomb);
  105.     SetTimer("bombing3",250,false);
  106.     return 0;
  107. }
  108. //------------------------------------------------------------------------------
  109. forward bombing3();
  110. public bombing3()
  111. {
  112.     GetPlayerPos(Bomb,x,y,z);
  113.     CreateExplosion(x,y,z,7,10);
  114.     DestroyPickup(Bomb);
  115.     SetTimer("bombing4",250,false);
  116.     return 0;
  117. }
  118. //------------------------------------------------------------------------------
  119. forward bombing4();
  120. public bombing4()
  121. {
  122.     GetPlayerPos(Bomb,x,y,z);
  123.     CreateExplosion(x,y,z,7,10);
  124.     DestroyPickup(Bomb);
  125.     SetTimer("bombing5",250,false);
  126.     return 0;
  127. }
  128. //------------------------------------------------------------------------------
  129. forward bombing5();
  130. public bombing5()
  131. {
  132.     GetPlayerPos(Bomb,x,y,z);
  133.     CreateExplosion(x,y,z,7,10);
  134.     DestroyPickup(Bomb);
  135.     return 0;
  136. }
  137. //------------------------------------------------------------------------------
  138. strtok(const string[], &index)
  139. {
  140.     new length = strlen(string);
  141.     while ((index < length) && (string[index] <= ' '))
  142.     {
  143.         index++;
  144.     }
  145.  
  146.     new offset = index;
  147.     new result[20];
  148.     while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  149.     {
  150.         result[index - offset] = string[index];
  151.         index++;
  152.     }
  153.     result[index - offset] = EOS;
  154.     return result;
  155. }
  156. //------------------------------------------------------------------------------
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top