Advertisement
DominikMarvLisy

Call of Duty 1.0

Jun 1st, 2013
743
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 81.13 KB | None | 0 0
  1. /*
  2.  * Call of Duty
  3.  * © by Michal 'Exitus' Bělčík & Dominik 'MARV' Lisy
  4.  * Spolupracoval som s nim na mode, no sa to vymklo z ruk, a skončila naša
  5.  * spolupráca.
  6.  * Prosím, neprepisovať autora.
  7.  *******************************************************************************
  8.  * Mod obsahuje rôzne scripty ktoré sa našli aj pomocov Google.
  9.  * Taktiež obsahuje admin script by StaKeR, ktorý som prerobil.
  10.  * Ak by ste mali nejaké otázky ohladom módu, stačí napísať.
  11.  * Niesom kopirak, ak su nejaké veci tvoje a nahodov som nezverejnil tvoje meno,
  12.  * tak sa ti hlboko ospravedlnujem, pretože je tu strašne vela veci, ako napr.
  13.  * rank script, admin script, weapon shop atd.
  14.  * + Mod obsahuje QCMD Includ by QWER, ktorého obdivujem :)
  15.  * Chcel som sem pridať QDIALOG, ale už ten mod nebudem prerabať a preto som
  16.  * ho zverejnil
  17.  * To je z mojej strany všetko. Ak by ste mali zaujem o kupu tohoto modu,
  18.  * saomozrejme u zvplne inim nastavenim a inim systemom a verziov, stačí
  19.  * ma kontaktovať.
  20.  * Pastebin: http://pastebin.com/u/DominikMarvLisy
  21.  * Skype: marv.samp
  22.  * Gmail: marv.samp@gmail.com
  23.  */
  24. #include <a_samp>
  25. #include <dini>
  26. #include <dudb>
  27. #include <dutils>
  28. #include <foreach>
  29. #define INFINITY "-2147483648"
  30. #define isnull() (!strcmp(params,"-2147483648"))
  31. #include "Command.pwn"
  32. #pragma unused ret_memcpy
  33. //=FORWARDS=====================================================================
  34. forward hostname(playerid);
  35. forward Reklama();
  36. //=DEFINE=======================================================================
  37. #define Style 1
  38. #define TEAM_GERMANY 0
  39. #define TEAM_IRAQ 1
  40. #define TEAM_RUSSIA 2
  41. #define TEAM_USA 3
  42. #define TEAM_BANGLADESH 4
  43. #define SVETLE1_MODRA 0x0099C8FF
  44. #define CERVENA 0xFF0000FF
  45. #define TMAVE_MODRA 0x2312B8FF
  46. #define TEAM_GERMANY_COLOR 0x80FF8096
  47. #define TEAM_IRAQ_COLOR 0x9400D3AA
  48. #define TEAM_RUSSIA_COLOR 0xFF0000AA
  49. #define TEAM_USA_COLOR 0x0015FFAA
  50. #define TEAM_BANGLADESH_COLOR 0x00FFFFAA
  51. #define ORANGE  0xFF6600
  52. #define GREEN      0x15FF00AA
  53. #define RED       0xFF0000AA
  54. #define ROYALBLUE        0x4169E1FF
  55. #define BLUE      0x0015FFAA
  56. #define MAIN            (101)
  57. #define WEAPONS         (102)
  58. #define ELSE            (103)
  59. #define SCM SendClientMessage
  60. #define SCMTA SendClientMessageToAll
  61. #define COLOR_WHITE         0xFFFFFFAA
  62. #define COLOR_GREY          0xAFAFAFAA
  63. #define COLOR_SYSTEM        0xAFAFAFAA
  64. #define COLOR_BLACK         0x000000AA
  65. #define COLOR_BROWN         0xA52A2AAA
  66. #define COLOR_ADMIN         0x2587CEFF
  67. #define COLOR_YELLOW        0xB8860BAA
  68. #define COLOR_BLUE          0x00FFFF
  69. #define COLOR_GREEN         0x33AA33AA
  70. #define COLOR_PINK          0xFFC0CBAA
  71. #define COLOR_RED           0xE10000AA
  72. #define BARVA_OLIVOVA       0x9ACD32AA
  73. #define BARVA_FIALOVA       0x800080AA
  74. #define COLOR_ORANGE        0xFF9900AA
  75. #define BARVA_SVETLEMODRA   0x33CCFFAA
  76. #define BARVA_TMAVEZELENA   0x008000FF
  77. #define BARVA_SVETLEZELENA  0x7FFF00AA
  78. #undef  MAX_PLAYERS
  79. #define MAX_PLAYERS 100
  80. //=NEW==========================================================================
  81. new logged[MAX_PLAYERS];
  82. new gTeam[MAX_PLAYERS];
  83. new GZ_ZONE1;
  84. new GZ_ZONE2;
  85. new GZ_ZONE3;
  86. new GZ_ZONE4;
  87. new GZ_ZONE5;
  88. new weaponshop1;
  89. new weaponshop2;
  90. new weaponshop3;
  91. new weaponshop4;
  92. new weaponshop5;
  93. new Text:Web;
  94. new Text:CODTU;
  95. new Text:Textdraw0;
  96. new Text:Textdraw1;
  97. new Text:Textdraw2;
  98. new Text:Textdraw3;
  99. new Text:Textdraw4;
  100. new Text:Textdraw5;
  101. new Text:Textdraw6;
  102. main( ) { }
  103. new PlayerText:Rang[MAX_PLAYERS][3];
  104. //=STOCK========================================================================
  105.  
  106. stock PlayerName(playerid)
  107. {
  108.     new name[MAX_PLAYER_NAME];
  109.     GetPlayerName(playerid,name,sizeof(name));
  110.     return name;
  111. }
  112.  
  113.  
  114. new Alvl[MAX_PLAYERS];
  115. new varovani[MAX_PLAYERS];
  116.  
  117. forward muted(playerid);
  118. forward Restart();
  119. forward Off();
  120. forward odmrazit(playerid);
  121. forward acheat(playerid);
  122.  
  123.  
  124. stock Admins(playerid)
  125. {
  126.     new string[25];
  127.     if(IsPlayerAdmin(playerid))
  128.     {
  129.         format(string,sizeof(string),"RCON Admin");
  130.     }
  131.     else if(Alvl[playerid] == 1)
  132.     {
  133.         format(string,sizeof(string),"Helper");
  134.     }
  135.     else if(Alvl[playerid] == 2)
  136.     {
  137.         format(string,sizeof(string),"Moderátor");
  138.     }
  139.     else if(Alvl[playerid] == 3)
  140.     {
  141.         format(string,sizeof(string),"Administrátor");
  142.     }
  143.     else if(Alvl[playerid] >= 4)
  144.     {
  145.         format(string,sizeof(string),"Hlavní Administrátor");
  146.     }
  147.     return string;
  148. }
  149. stock Warp(playerid,Float:x,Float:y,Float:z)
  150. {
  151.     if(IsPlayerInAnyVehicle(playerid))
  152.     {
  153.         new brmbrm = GetPlayerVehicleID(playerid);
  154.         SetVehiclePos(brmbrm,x,y,z);
  155.     }
  156.     else
  157.     {
  158.         SetPlayerPos(playerid,x,y,z);
  159.     }
  160.     return true;
  161. }
  162.  
  163. stock ZakazanaZbran(playerid)
  164. {
  165.     new zbran = GetPlayerWeapon(playerid);
  166.     if(zbran == 15) return true; // páčidlo
  167.     else if(zbran == 16) return true; // granát
  168.     else if(zbran == 17) return true; // slzný plyn
  169.     else if(zbran == 18) return true; // Molotov Coctail
  170.     else if(zbran == 22) return true; // 9mm (pistol)
  171.     else if(zbran == 23) return true; // 9mm s tlumičem
  172.     else if(zbran == 24) return true; // Desert Eagle (magnum)
  173.     else if(zbran == 25) return true; // Brokovnice
  174.     else if(zbran == 26) return true; // Upilovaná brokovnice
  175.     else if(zbran == 27) return true; // Combat Shotgun (zase nějaká brokovnice)
  176.     else if(zbran == 28) return true; // Miscro SMG (mini kulometík :-D)
  177.     else if(zbran == 29) return true; // MP5
  178.     else if(zbran == 30) return true; // AK47
  179.     else if(zbran == 31) return true; // M4
  180.     else if(zbran == 32) return true; // Tec9
  181.     else if(zbran == 33) return true; // Country Rifle
  182.     else if(zbran == 34) return true; // Sniper Rifle (odstrelovacka)
  183.     else if(zbran == 35) return true; // Raketomet
  184.     else if(zbran == 36) return true; // Tepelný raketomet
  185.     else if(zbran == 37) return true; // Plamenomet
  186.     else if(zbran == 38) return true; // minigun
  187.     else if(zbran == 39) return true; // Bomba
  188.     else if(zbran == 40) return true; // Detonátor bomby
  189.     else if(zbran == 41) return true; // Sprej
  190.     else if(zbran == 42) return true; // Hasičák
  191.     else if(zbran == 43) return true; // Kamera (Foťák)
  192.     return false;
  193. }
  194.  
  195.  
  196.  
  197.  
  198. stock sscanf(string[], format[], {Float,_}:...)
  199. {
  200.  
  201.                 if (string[0] == 0 || (string[0] == 1 && string[1] == 0))
  202.                 {
  203.                         return format[0];
  204.                 }
  205.         #pragma tabsize 4
  206.         new
  207.                 formatPos = 0,
  208.                 stringPos = 0,
  209.                 paramPos = 2,
  210.                 paramCount = numargs(),
  211.                 delim = ' ';
  212.         while (string[stringPos] && string[stringPos] <= ' ')
  213.         {
  214.                 stringPos++;
  215.         }
  216.         while (paramPos < paramCount && string[stringPos])
  217.         {
  218.                 switch (format[formatPos++])
  219.                 {
  220.                         case '\0':
  221.                         {
  222.                                 return 0;
  223.                         }
  224.                         case 'i', 'd':
  225.                         {
  226.                                 new
  227.                                         neg = 1,
  228.                                         num = 0,
  229.                                         ch = string[stringPos];
  230.                                 if (ch == '-')
  231.                                 {
  232.                                         neg = -1;
  233.                                         ch = string[++stringPos];
  234.                                 }
  235.                                 do
  236.                                 {
  237.                                         stringPos++;
  238.                                         if ('0' <= ch <= '9')
  239.                                         {
  240.                                                 num = (num * 10) + (ch - '0');
  241.                                         }
  242.                                         else
  243.                                         {
  244.                                                 return -1;
  245.                                         }
  246.                                 }
  247.                                 while ((ch = string[stringPos]) > ' ' && ch != delim);
  248.                                 setarg(paramPos, 0, num * neg);
  249.                         }
  250.                         case 'h', 'x':
  251.                         {
  252.                                 new
  253.                                         num = 0,
  254.                                         ch = string[stringPos];
  255.                                 do
  256.                                 {
  257.                                         stringPos++;
  258.                                         switch (ch)
  259.                                         {
  260.                                                 case 'x', 'X':
  261.                                                 {
  262.                                                         num = 0;
  263.                                                         continue;
  264.                                                 }
  265.                                                 case '0' .. '9':
  266.                                                 {
  267.                                                         num = (num << 4) | (ch - '0');
  268.                                                 }
  269.                                                 case 'a' .. 'f':
  270.                                                 {
  271.                                                         num = (num << 4) | (ch - ('a' - 10));
  272.                                                 }
  273.                                                 case 'A' .. 'F':
  274.                                                 {
  275.                                                         num = (num << 4) | (ch - ('A' - 10));
  276.                                                 }
  277.                                                 default:
  278.                                                 {
  279.                                                         return -1;
  280.                                                 }
  281.                                         }
  282.                                 }
  283.                                 while ((ch = string[stringPos]) > ' ' && ch != delim);
  284.                                 setarg(paramPos, 0, num);
  285.                         }
  286.                         case 'c':
  287.                         {
  288.                                 setarg(paramPos, 0, string[stringPos++]);
  289.                         }
  290.                         case 'f':
  291.                         {
  292.  
  293.                                 new changestr[16], changepos = 0, strpos = stringPos;
  294.                                 while(changepos < 16 && string[strpos] && string[strpos] != delim)
  295.                                 {
  296.                                         changestr[changepos++] = string[strpos++];
  297.                                 }
  298.                                 changestr[changepos] = '\0';
  299.                                 setarg(paramPos,0,_:floatstr(changestr));
  300.                         }
  301.                         case 'p':
  302.                         {
  303.                                 delim = format[formatPos++];
  304.                                 continue;
  305.                         }
  306.                         case '\'':
  307.                         {
  308.                                 new
  309.                                         end = formatPos - 1,
  310.                                         ch;
  311.                                 while ((ch = format[++end]) && ch != '\'') {}
  312.                                 if (!ch)
  313.                                 {
  314.                                         return -1;
  315.                                 }
  316.                                 format[end] = '\0';
  317.                                 if ((ch = strfind(string, format[formatPos], false, stringPos)) == -1)
  318.                                 {
  319.                                         if (format[end + 1])
  320.                                         {
  321.                                                 return -1;
  322.                                         }
  323.                                         return 0;
  324.                                 }
  325.                                 format[end] = '\'';
  326.                                 stringPos = ch + (end - formatPos);
  327.                                 formatPos = end + 1;
  328.                         }
  329.                         case 'u':
  330.                         {
  331.                                 new
  332.                                         end = stringPos - 1,
  333.                                         id = 0,
  334.                                         bool:num = true,
  335.                                         ch;
  336.                                 while ((ch = string[++end]) && ch != delim)
  337.                                 {
  338.                                         if (num)
  339.                                         {
  340.                                                 if ('0' <= ch <= '9')
  341.                                                 {
  342.                                                         id = (id * 10) + (ch - '0');
  343.                                                 }
  344.                                                 else
  345.                                                 {
  346.                                                         num = false;
  347.                                                 }
  348.                                         }
  349.                                 }
  350.                                 if (num && IsPlayerConnected(id))
  351.                                 {
  352.                                         setarg(paramPos, 0, id);
  353.                                 }
  354.                                 else
  355.                                 {
  356.                                         #if !defined foreach
  357.                                                 #define foreach(%1,%2) for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
  358.                                                 #define __SSCANF_FOREACH__
  359.                                         #endif
  360.                                         string[end] = '\0';
  361.                                         num = false;
  362.                                         new
  363.                                                 name[MAX_PLAYER_NAME];
  364.                                         id = end - stringPos;
  365.                                         foreach (Player, playerid)
  366.                                         {
  367.                                                 GetPlayerName(playerid, name, sizeof (name));
  368.                                                 if (!strcmp(name, string[stringPos], true, id))
  369.                                                 {
  370.                                                         setarg(paramPos, 0, playerid);
  371.                                                         num = true;
  372.                                                         break;
  373.                                                 }
  374.                                         }
  375.                                         if (!num)
  376.                                         {
  377.                                                 setarg(paramPos, 0, INVALID_PLAYER_ID);
  378.                                         }
  379.                                         string[end] = ch;
  380.                                         #if defined __SSCANF_FOREACH__
  381.                                                 #undef foreach
  382.                                                 #undef __SSCANF_FOREACH__
  383.                                         #endif
  384.                                 }
  385.                                 stringPos = end;
  386.                         }
  387.                         case 's', 'z':
  388.                         {
  389.                                 new
  390.                                         i = 0,
  391.                                         ch;
  392.                                 if (format[formatPos])
  393.                                 {
  394.                                         while ((ch = string[stringPos++]) && ch != delim)
  395.                                         {
  396.                                                 setarg(paramPos, i++, ch);
  397.                                         }
  398.                                         if (!i)
  399.                                         {
  400.                                                 return -1;
  401.                                         }
  402.                                 }
  403.                                 else
  404.                                 {
  405.                                         while ((ch = string[stringPos++]))
  406.                                         {
  407.                                                 setarg(paramPos, i++, ch);
  408.                                         }
  409.                                 }
  410.                                 stringPos--;
  411.                                 setarg(paramPos, i, '\0');
  412.                         }
  413.                         default:
  414.                         {
  415.                                 continue;
  416.                         }
  417.                 }
  418.                 while (string[stringPos] && string[stringPos] != delim && string[stringPos] > ' ')
  419.                 {
  420.                         stringPos++;
  421.                 }
  422.                 while (string[stringPos] && (string[stringPos] == delim || string[stringPos] <= ' '))
  423.                 {
  424.                         stringPos++;
  425.                 }
  426.                 paramPos++;
  427.         }
  428.         do
  429.         {
  430.                 if ((delim = format[formatPos++]) > ' ')
  431.                 {
  432.                         if (delim == '\'')
  433.                         {
  434.                                 while ((delim = format[formatPos++]) && delim != '\'') {}
  435.                         }
  436.                         else if (delim != 'z')
  437.                         {
  438.                                 return delim;
  439.                         }
  440.                 }
  441.         }
  442.         while (delim > ' ');
  443.         return 0;
  444. }
  445.  
  446. stock IsNumeric(const string[])
  447. {
  448.    new length=strlen(string);
  449.    if (length==0) return false;
  450.    for (new i = 0; i < length; i++)
  451.    {
  452.       if ((string[i] > '9' || string[i] < '0' && string[i]!='-' && string[i]!='+')|| (string[i]=='-' && i!=0)|| (string[i]=='+' && i!=0)) return false;
  453.    }
  454.    if (length==1 && (string[0]=='-' || string[0]=='+')) return false;
  455.    return true;
  456. }
  457.  
  458. //=START========================================================================
  459. public OnGameModeInit()
  460.     {
  461. //=OBJEKTY======================================================================
  462.     CreateObject(12805, 450.12, 2492.50, 29.37,   0.00, 0.00, 93.00);
  463.     CreateObject(11556, 463.46, 2436.15, 15.54,   0.00, 0.00, 0.00);
  464.     CreateObject(8210, 443.87, 2555.44, 18.44,   0.00, 0.00, 0.00);
  465.     CreateObject(8210, 388.57, 2555.32, 18.53,   0.00, 0.00, 0.00);
  466.     CreateObject(8210, 333.17, 2555.41, 18.47,   0.00, 0.00, 0.00);
  467.     CreateObject(8210, 277.84, 2555.58, 18.55,   0.00, 0.00, 0.00);
  468.     CreateObject(8210, 250.53, 2527.54, 18.58,   0.00, 0.00, -90.00);
  469.     CreateObject(3749, 251.69, 2492.31, 21.03,   0.00, 0.00, -90.00);
  470.     CreateObject(8210, 251.34, 2458.26, 18.47,   0.00, 0.00, -90.00);
  471.     CreateObject(3749, 260.63, 2432.48, 21.26,   0.00, 0.00, 0.00);
  472.     CreateObject(3749, 279.72, 2432.43, 21.26,   0.00, 0.00, 0.00);
  473.     CreateObject(8210, 314.35, 2434.42, 18.47,   0.00, 0.00, 0.00);
  474.     CreateObject(8210, 350.86, 2433.92, 18.36,   0.00, 0.00, 0.00);
  475.     CreateObject(14407, 378.00, 2460.87, 16.55,   0.00, 0.00, 0.00);
  476.     CreateObject(14407, 377.99, 2454.21, 21.02,   0.00, 0.00, 0.00);
  477.     CreateObject(3425, 370.45, 2459.58, 26.34,   0.00, 0.00, 0.00);
  478.     CreateObject(3279, 455.12, 2542.68, 17.32,   0.00, 0.00, 0.00);
  479.     CreateObject(3279, 308.21, 2546.39, 15.75,   0.00, 0.00, 0.00);
  480.     CreateObject(3279, 304.19, 2445.32, 15.45,   0.00, 0.00, 0.00);
  481.     CreateObject(5461, 326.07, 2474.99, 19.69,   0.00, 0.00, 0.00);
  482.     CreateObject(8210, -154.53, 2671.51, 64.10,   0.00, 0.00, 90.00);
  483.     CreateObject(8210, -154.36, 2725.08, 64.17,   0.00, 0.00, 90.00);
  484.     CreateObject(8210, -154.34, 2780.14, 64.06,   0.00, 0.00, 90.00);
  485.     CreateObject(3749, -152.17, 2635.84, 68.36,   0.00, 0.00, 90.00);
  486.     CreateObject(8210, -173.92, 2609.87, 61.67,   0.00, 0.00, 40.00);
  487.     CreateObject(8210, -222.50, 2592.13, 63.66,   0.00, 0.00, 0.00);
  488.     CreateObject(8210, -332.90, 2734.03, 65.49,   0.00, 0.00, 90.00);
  489.     CreateObject(8210, -333.27, 2679.84, 65.51,   0.00, 0.00, 90.00);
  490.     CreateObject(987, -333.86, 2648.56, 62.82,   0.00, 0.00, 84.00);
  491.     CreateObject(3749, -337.21, 2639.41, 68.64,   0.00, 0.00, 81.00);
  492.     CreateObject(8210, -317.49, 2614.30, 66.19,   0.00, 0.00, -36.00);
  493.     CreateObject(987, -295.27, 2597.87, 62.29,   0.00, 0.00, -40.00);
  494.     CreateObject(4726, 227.39, 1978.48, 16.61,   0.00, 0.00, 0.00);
  495.     CreateObject(14414, 283.82, 1864.74, 19.33,   0.00, 0.00, 0.00);
  496.     CreateObject(14414, 287.70, 1864.77, 19.30,   0.00, 0.00, 0.00);
  497. //==============================================================================
  498.     CreateVehicle(425, 364.9720, 2538.0386, 17.3092, 184.0000, -1, -1, 100);
  499.     CreateVehicle(520, 268.3366, 2543.3374, 17.3024, 180.0000, -1, -1, 100);
  500.     CreateVehicle(476, 291.3607, 2543.9614, 17.9113, 180.0000, -1, -1, 100);
  501.     CreateVehicle(476, 325.6700, 2542.9197, 17.9014, 180.0000, -1, -1, 100);
  502.     CreateVehicle(470, 307.6615, 2536.2375, 16.7011, 180.0000, -1, -1, 100);
  503.     CreateVehicle(470, 341.9824, 2485.3606, 16.3706, 0.0000, -1, -1, 100);
  504.     CreateVehicle(470, 354.5155, 2538.9507, 16.6278, 180.0000, -1, -1, 100);
  505.     CreateVehicle(470, 346.0322, 2539.6531, 16.4340, 180.0000, -1, -1, 100);
  506.     CreateVehicle(432, 394.7015, 2446.0923, 16.3876, 0.0000, -1, -1, 100);
  507.     CreateVehicle(432, 412.9508, 2446.7751, 16.3942, 0.0000, -1, -1, 100);
  508.     CreateVehicle(433, 386.3125, 2538.8696, 17.0323, 180.0000, -1, -1, 100);
  509.     CreateVehicle(487, 405.3329, 2460.6536, 29.8349, 0.0000, -1, -1, 100);
  510.     CreateVehicle(487, 358.2871, 2490.4832, 28.4258, 0.0000, -1, -1, 100);
  511.     CreateVehicle(520, -233.0517, 2660.5913, 63.4347, 180.0000, -1, -1, 100);
  512.     CreateVehicle(520, -212.9728, 2660.0635, 63.3981, 180.0000, -1, -1, 100);
  513.     CreateVehicle(425, -310.0828, 2680.3740, 63.4143, 0.0000, -1, -1, 100);
  514.     CreateVehicle(433, -228.6775, 2732.7085, 63.1814, 0.0000, -1, -1, 100);
  515.     CreateVehicle(447, -213.0086, 2733.2693, 62.8845, 0.0000, -1, -1, 100);
  516.     CreateVehicle(432, -241.5271, 2774.7251, 62.4544, 180.0000, -1, -1, 100);
  517.     CreateVehicle(432, -165.8552, 2686.1375, 62.3629, 90.0000, -1, -1, 100);
  518.     CreateVehicle(490, -167.0429, 2669.7322, 63.3088, 90.0000, -1, -1, 100);
  519.     CreateVehicle(490, -167.6152, 2658.3682, 63.9821, 90.0000, -1, -1, 100);
  520.     CreateVehicle(601, -209.4082, 2602.3862, 62.5926, 0.0000, -1, -1, 100);
  521.     CreateVehicle(470, -221.6009, 2602.7659, 62.6025, 0.0000, -1, -1, 100);
  522.     CreateVehicle(470, -235.3760, 2602.4441, 62.6025, 0.0000, -1, -1, 100);
  523.     CreateVehicle(470, -30.2696, 2342.0266, 24.0237, 0.0000, -1, -1, 100);
  524.     CreateVehicle(470, 172.9899, 1930.0182, 18.2039, 180.0000, -1, -1, 100);
  525.     CreateVehicle(470, 179.8932, 1930.0627, 17.7880, 180.0000, -1, -1, 100);
  526.     CreateVehicle(447, 201.4775, 1884.5150, 17.8194, 0.0000, -1, -1, 100);
  527.     CreateVehicle(447, 224.4239, 1885.0465, 17.8200, 0.0000, -1, -1, 100);
  528.     CreateVehicle(425, 226.4783, 1981.5138, 19.6279, 90.0000, -1, -1, 100);
  529.     CreateVehicle(500, 291.5969, 1902.0576, 17.8286, 0.0000, -1, -1, 100);
  530.     CreateVehicle(520, 278.9262, 1956.3839, 18.4331, -90.0000, -1, -1, 100);
  531.     CreateVehicle(520, 277.8458, 1990.0569, 18.4299, -90.0000, -1, -1, 100);
  532.     CreateVehicle(520, 278.8977, 2024.7052, 18.7303, -91.0000, -1, -1, 100);
  533.     CreateVehicle(487, 330.2691, 1857.7391, 18.1296, 0.0000, -1, -1, 100);
  534.     CreateVehicle(487, 333.2515, 1896.5369, 18.1270, 0.0000, -1, -1, 100);
  535.     CreateVehicle(487, 279.7356, 1929.3915, 17.8241, 0.0000, -1, -1, 100);
  536.     CreateVehicle(487, 184.9452, 1811.2323, 17.8343, 0.0000, -1, -1, 100);
  537.     CreateVehicle(599, 364.3433, 1937.1143, 17.8183, 90.0000, -1, -1, 100);
  538.     CreateVehicle(599, 361.9468, 1971.8999, 17.8273, 90.0000, -1, -1, 100);
  539.     CreateVehicle(476, 302.6609, 2051.3438, 18.7014, 180.0000, -1, -1, 100);
  540.     CreateVehicle(476, 314.9147, 2051.6223, 18.7380, 180.0000, -1, -1, 100);
  541.     CreateVehicle(470, -362.5944, 2198.6367, 42.3802, 0.0000, -1, -1, 100);
  542.     CreateVehicle(470, -385.9617, 2195.3948, 42.0191, -90.0000, -1, -1, 100);
  543.     CreateVehicle(476, -469.1991, 2232.9861, 46.2906, 180.0000, -1, -1, 100);
  544.     CreateVehicle(522, -423.4416, 2225.9443, 42.0162, 0.0000, -1, -1, 100);
  545.     CreateVehicle(522, -391.5645, 2221.8062, 42.0169, -90.0000, -1, -1, 100);
  546.     CreateVehicle(522, -387.9488, 2212.1982, 42.0161, -84.0000, -1, -1, 100);
  547.     CreateVehicle(522, -356.3287, 2200.4702, 42.0732, 0.0000, -1, -1, 100);
  548.     CreateVehicle(500, -401.1270, 2224.9727, 42.6239, 178.0000, -1, -1, 100);
  549.     CreateVehicle(447, -431.6691, 2226.2529, 42.6071, 0.0000, -1, -1, 100);
  550.     CreateVehicle(432, -414.3075, 2216.2314, 42.6262, -90.0000, -1, -1, 100);
  551.     CreateVehicle(520, -417.4319, 2200.1738, 43.2283, -180.0000, -1, -1, 100);
  552.     CreateVehicle(425, -435.6116, 2198.7466, 43.2201, 185.0000, -1, -1, 100);
  553.     CreateVehicle(433, -395.0356, 2258.6289, 42.3966, 0.0000, -1, -1, 100);
  554.     CreateVehicle(451, 221.7199, 1863.8215, 12.7346, 0.0000, -1, -1, 100);
  555.     CreateVehicle(541, 206.1917, 1862.7610, 12.7361, 0.0000, -1, -1, 100);
  556.     CreateVehicle(521, 212.9610, 1859.4684, 12.7341, 0.0000, -1, -1, 100);
  557.     CreateVehicle(521, 216.1067, 1919.4802, 17.2262, 178.0000, -1, -1, 100);
  558.     CreateVehicle(521, 208.1374, 1919.6757, 17.2258, 180.0000, -1, -1, 100);
  559.     CreateVehicle(432, 119.3823, 1904.0291, 18.7829, 0.0000, -1, -1, 100);
  560.     CreateVehicle(432, 331.1017, 1923.9956, 17.8223, 84.0000, -1, -1, 100);
  561.     CreateVehicle(432, -86.7391, 1351.6979, 10.5394, 0.0000, -1, -1, 100);
  562.     CreateVehicle(432, -139.5564, 1182.1930, 19.9293, 0.0000, -1, -1, 100);
  563.     CreateVehicle(432, -150.3058, 1182.0281, 19.6261, 0.0000, -1, -1, 100);
  564.     CreateVehicle(447, -164.6117, 1227.7975, 19.9327, 0.0000, -1, -1, 100);
  565.     CreateVehicle(447, -101.6055, 1060.4777, 19.9173, 0.0000, -1, -1, 100);
  566.     CreateVehicle(433, -157.4107, 1130.3845, 20.2373, 0.0000, -1, -1, 100);
  567.     CreateVehicle(451, -110.7150, 1131.7701, 19.3377, 0.0000, -1, -1, 100);
  568.     CreateVehicle(487, -31.4146, 1180.0289, 19.5603, 0.0000, -1, -1, 100);
  569.     CreateVehicle(490, -146.5359, 1125.2842, 19.9334, 0.0000, -1, -1, 100);
  570.     CreateVehicle(490, -92.3016, 1160.1515, 19.9357, -90.0000, -1, -1, 100);
  571.     CreateVehicle(470, -141.0147, 1085.7773, 19.3232, 0.0000, -1, -1, 100);
  572.     CreateVehicle(470, -152.8062, 1086.1261, 19.6248, 0.0000, -1, -1, 100);
  573.     CreateVehicle(425, -82.7839, 1122.1613, 20.5346, 0.0000, -1, -1, 100);
  574.     CreateVehicle(520, -49.4360, 1121.0028, 20.5321, 0.0000, -1, -1, 100);
  575.     CreateVehicle(520, -83.3086, 1075.9781, 20.5282, -90.0000, -1, -1, 100);
  576.     CreateVehicle(470, -142.0169, 1213.3082, 19.6301, 0.0000, -1, -1, 100);
  577.     CreateVehicle(470, -89.6595, 1216.6346, 19.6188, 0.0000, -1, -1, 100);
  578. //=SHOP=========================================================================
  579.     weaponshop1 = CreatePickup(19130,1,211.7107,1809.0106,21.8672,0);
  580.     Create3DTextLabel("{FFFF00}Weapon shop",0xFFFFFFFF,211.7107,1809.0106,21.8672,50.0,0);
  581.     weaponshop2 = CreatePickup(19130,1,-137.4183,1116.5894,20.1966,0);
  582.     Create3DTextLabel("{FFFF00}Weapon shop",0xFFFFFFFF,-137.4183,1116.5894,20.1966,50.0,0);
  583.     weaponshop3 = CreatePickup(19130,1,-379.2944,2241.4058,42.4683,0);
  584.     Create3DTextLabel("{FFFF00}Weapon shop",0xFFFFFFFF,-379.2944,2241.4058,42.4683,50.0,0);
  585.     weaponshop4 = CreatePickup(19130,1,346.9036,2463.4106,16.4766,0);
  586.     Create3DTextLabel("{FFFF00}Weapon shop",0xFFFFFFFF,346.9036,2463.4106,16.4766,50.0,0);
  587.     weaponshop5 = CreatePickup(19130,1,-1951.5200,300.1485,35.4688,0);
  588.     Create3DTextLabel("{FFFF00}Weapon shop",0xFFFFFFFF,-1951.5200,300.1485,35.4688,50.0,0);
  589. //=OCHRANA======================================================================
  590.     SetGameModeText("Call of Duty");
  591.     SendRconCommand("rcon_password mexikoexi123");
  592. //=TEXTDRAW=====================================================================
  593.     Textdraw0 = TextDrawCreate(680.000000, -52.000000, "BOX");
  594.     TextDrawBackgroundColor(Textdraw0, 255);
  595.     TextDrawFont(Textdraw0, 1);
  596.     TextDrawLetterSize(Textdraw0, 2.799999, 21.100000);
  597.     TextDrawColor(Textdraw0, -1);
  598.     TextDrawSetOutline(Textdraw0, 0);
  599.     TextDrawSetProportional(Textdraw0, 1);
  600.     TextDrawSetShadow(Textdraw0, 1);
  601.     TextDrawUseBox(Textdraw0, 1);
  602.     TextDrawBoxColor(Textdraw0, 255);
  603.     TextDrawTextSize(Textdraw0, -320.000000, -300.000000);
  604.  
  605.     Textdraw1 = TextDrawCreate(1493.000000, 366.000000, "BOX");
  606.     TextDrawBackgroundColor(Textdraw1, 255);
  607.     TextDrawFont(Textdraw1, 1);
  608.     TextDrawLetterSize(Textdraw1, 4.209998, 25.100000);
  609.     TextDrawColor(Textdraw1, -1);
  610.     TextDrawSetOutline(Textdraw1, 0);
  611.     TextDrawSetProportional(Textdraw1, 1);
  612.     TextDrawSetShadow(Textdraw1, 1);
  613.     TextDrawUseBox(Textdraw1, 1);
  614.     TextDrawBoxColor(Textdraw1, 255);
  615.     TextDrawTextSize(Textdraw1, -90.000000, 0.000000);
  616.  
  617.     Textdraw2 = TextDrawCreate(430.000000, 369.000000, "C.H.P. Team");
  618.     TextDrawBackgroundColor(Textdraw2, -65281);
  619.     TextDrawFont(Textdraw2, 0);
  620.     TextDrawLetterSize(Textdraw2, 0.750000, 4.000000);
  621.     TextDrawColor(Textdraw2, 255);
  622.     TextDrawSetOutline(Textdraw2, 1);
  623.     TextDrawSetProportional(Textdraw2, 1);
  624.  
  625.     Textdraw3 = TextDrawCreate(510.000000, 150.000000, "Vitej");
  626.     TextDrawBackgroundColor(Textdraw3, -16711681);
  627.     TextDrawFont(Textdraw3, 3);
  628.     TextDrawLetterSize(Textdraw3, 0.790000, 4.000000);
  629.     TextDrawColor(Textdraw3, 16777215);
  630.     TextDrawSetOutline(Textdraw3, 1);
  631.     TextDrawSetProportional(Textdraw3, 1);
  632.  
  633.     Textdraw4 = TextDrawCreate(480.000000, 41.000000, "Call of Duty");
  634.     TextDrawBackgroundColor(Textdraw4, 255);
  635.     TextDrawFont(Textdraw4, 0);
  636.     TextDrawLetterSize(Textdraw4, 0.600000, 4.000000);
  637.     TextDrawColor(Textdraw4, 65535);
  638.     TextDrawSetOutline(Textdraw4, 0);
  639.     TextDrawSetProportional(Textdraw4, 1);
  640.     TextDrawSetShadow(Textdraw4, 1);
  641.  
  642.     Textdraw5 = TextDrawCreate(720.000000, 341.000000, "_");
  643.     TextDrawBackgroundColor(Textdraw5, 255);
  644.     TextDrawFont(Textdraw5, 0);
  645.     TextDrawLetterSize(Textdraw5, 0.500000, 1.000000);
  646.     TextDrawColor(Textdraw5, 16777215);
  647.     TextDrawSetOutline(Textdraw5, 0);
  648.     TextDrawSetProportional(Textdraw5, 1);
  649.     TextDrawSetShadow(Textdraw5, 1);
  650.     TextDrawUseBox(Textdraw5, 1);
  651.     TextDrawBoxColor(Textdraw5, 65535);
  652.     TextDrawTextSize(Textdraw5, -211.000000, 30.000000);
  653.  
  654.     Textdraw6 = TextDrawCreate(9.000000, 128.000000, "www.web.sk");
  655.     TextDrawBackgroundColor(Textdraw6, 16711935);
  656.     TextDrawFont(Textdraw6, 1);
  657.     TextDrawLetterSize(Textdraw6, 0.500000, 1.000000);
  658.     TextDrawColor(Textdraw6, 255);
  659.     TextDrawSetOutline(Textdraw6, 1);
  660.     TextDrawSetProportional(Textdraw6, 1);
  661. //==============================================================================
  662.     SetWorldTime(4);
  663.     UsePlayerPedAnims();
  664.     EnableStuntBonusForAll(0);
  665.     AddPlayerClass(73,212.8427,1867.5533,13.1406,355.6948,0,0,0,0,0,0);
  666.     AddPlayerClass(254,-362.5112,2222.4028,43.0078,87.0584,0,0,0,0,0,0);
  667.     AddPlayerClass(285,-136.9506,1116.8413,20.1966,2.9249,0,0,0,0,0,0);
  668.     AddPlayerClass(287,403.6445,2449.0715,16.5000,357.9827,0,0,0,0,0,0);
  669.     AddPlayerClass(206,-251.1134,2600.3315,62.8582,359.2632,0,0,0,0,0,0);
  670.     SetTimer("hostname", 500, 1);
  671.  
  672.     GZ_ZONE1 = GangZoneCreate(-319.3359375,2654.296875,-128.90625,2815.4296875);
  673.  
  674.     GZ_ZONE2 = GangZoneCreate(-2.9296875,1731.4453125,386.71875,2056.640625);
  675.  
  676.     GZ_ZONE3 = GangZoneCreate(-304.6875,1031.25,14.6484375,1221.6796875);
  677.  
  678.     GZ_ZONE4 = GangZoneCreate(102.5390625,2408.203125,465.8203125,2622.0703125);
  679.  
  680.     GZ_ZONE5 = GangZoneCreate(-468.75,2185.546875,-316.40625,2293.9453125);
  681.     UsePlayerPedAnims();
  682.     DisableInteriorEnterExits();
  683.     return 1;
  684. }
  685.  
  686. public OnPlayerRequestClass(playerid, classid)
  687. {
  688.  
  689.     TextDrawShowForPlayer(playerid, Textdraw0);
  690.     TextDrawShowForPlayer(playerid, Textdraw1);
  691.     TextDrawShowForPlayer(playerid, Textdraw2);
  692.     TextDrawShowForPlayer(playerid, Textdraw3);
  693.     TextDrawShowForPlayer(playerid, Textdraw4);
  694.     TextDrawShowForPlayer(playerid, Textdraw5);
  695.     TextDrawShowForPlayer(playerid, Textdraw6);
  696.     SetPlayerPos(playerid,220.3261,1822.9734,7.5368);
  697.     SetPlayerCameraLookAt(playerid,220.3261,1822.9734,7.5368);
  698.     SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4141);
  699.     SetPlayerFacingAngle(playerid, 270 );
  700.     ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1);
  701.     CreateExplosion(212.9525,1822.9084,6.4141, 11, 10.0);
  702.  
  703.     if(classid == TEAM_GERMANY) {
  704.         SetPlayerSkin(playerid, 179);
  705.         GameTextForPlayer(playerid,"~g~Nemci",1000,4);
  706.         SetPlayerColor(playerid, TEAM_GERMANY_COLOR);
  707.         gTeam[playerid] = TEAM_GERMANY;
  708.     }
  709.     if(classid == TEAM_IRAQ) {
  710.         SetPlayerSkin(playerid, 128);
  711.         GameTextForPlayer(playerid,"~p~Iranci",1000,4);
  712.         SetPlayerColor(playerid, TEAM_IRAQ_COLOR);
  713.         gTeam[playerid] = TEAM_IRAQ;
  714.     }
  715.     if(classid == TEAM_RUSSIA) {
  716.         SetPlayerSkin(playerid, 206);
  717.         GameTextForPlayer(playerid,"~r~Sovieti",1000,4);
  718.         SetPlayerColor(playerid, TEAM_RUSSIA_COLOR);
  719.         gTeam[playerid] = TEAM_RUSSIA;
  720.     }
  721.     if(classid == TEAM_USA) {
  722.         SetPlayerSkin(playerid, 287);
  723.         GameTextForPlayer(playerid,"~b~Americani",1000,4);
  724.         SetPlayerColor(playerid, TEAM_USA_COLOR);
  725.         gTeam[playerid] = TEAM_USA;
  726.     }
  727.     if(classid == TEAM_BANGLADESH) {
  728.         SetPlayerSkin(playerid, 285);
  729.         GameTextForPlayer(playerid,"~p~Evropane",1000,4);
  730.         SetPlayerColor(playerid, TEAM_BANGLADESH_COLOR);
  731.         gTeam[playerid] = TEAM_BANGLADESH;
  732.     }
  733.     return 1;
  734. }
  735.  
  736. public OnPlayerSpawn(playerid)
  737. {
  738.     StopAudioStreamForPlayer(playerid);
  739.     SetPlayerStarRang(playerid);
  740.     TextDrawHideForPlayer(playerid, Textdraw0);
  741.     TextDrawHideForPlayer(playerid, Textdraw1);
  742.     TextDrawHideForPlayer(playerid, Textdraw2);
  743.     TextDrawHideForPlayer(playerid, Textdraw3);
  744.     TextDrawHideForPlayer(playerid, Textdraw4);
  745.     TextDrawHideForPlayer(playerid, Textdraw5);
  746.     TextDrawHideForPlayer(playerid, Textdraw6);
  747.     if(gTeam[playerid] == TEAM_GERMANY) {
  748.             SetPlayerArmour(playerid, 100);
  749.             new Text3D:label7 = Create3DTextLabel("Nemec",TEAM_GERMANY_COLOR, 30.0, 40.0, 50.0, 40.0, 0);
  750.             Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
  751.             SetPlayerTeam(playerid, 0);
  752.     }
  753.     if(gTeam[playerid] == TEAM_IRAQ) {
  754.             SetPlayerArmour(playerid, 100);
  755.             new Text3D:label7 = Create3DTextLabel("Iracan",TEAM_IRAQ_COLOR, 30.0, 40.0, 50.0, 40.0, 0);
  756.             Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
  757.             SetPlayerTeam(playerid, 1);
  758.     }
  759.     if(gTeam[playerid] == TEAM_RUSSIA) {
  760.             SetPlayerArmour(playerid, 100);
  761.             new Text3D:label7 = Create3DTextLabel("Rus",TEAM_RUSSIA_COLOR, 30.0, 40.0, 50.0, 40.0, 0);
  762.             Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
  763.             SetPlayerTeam(playerid, 2);
  764.     }
  765.     if(gTeam[playerid] == TEAM_USA) {
  766.             SetPlayerArmour(playerid, 100);
  767.             new Text3D:label7 = Create3DTextLabel("American",TEAM_USA_COLOR, 30.0, 40.0, 50.0, 40.0, 0);
  768.             Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
  769.             SetPlayerTeam(playerid, 3);
  770.     }
  771.     if(gTeam[playerid] == TEAM_BANGLADESH) {
  772.             SetPlayerArmour(playerid, 100);
  773.             new Text3D:label7 = Create3DTextLabel("Evropan",TEAM_BANGLADESH_COLOR, 30.0, 40.0, 50.0, 40.0, 0);
  774.             Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
  775.             SetPlayerTeam(playerid, 4);
  776.     }
  777.     GangZoneShowForAll(GZ_ZONE1, 0x80FFFF96);
  778.     GangZoneShowForAll(GZ_ZONE2, 0x80FF803E);
  779.     GangZoneShowForAll(GZ_ZONE3, 0xFF00003E);
  780.     GangZoneShowForAll(GZ_ZONE4, 0x0000A03E);
  781.     GangZoneShowForAll(GZ_ZONE5, 0x8000803E);
  782.     return 1;
  783. }
  784.  
  785. public OnPlayerDeath(playerid, killerid, reason)
  786. {
  787.     SendDeathMessage(killerid, playerid, reason);
  788.     SendClientMessage(playerid, RED, " Zemřel jsi! Odečteno 1000$ za smrt ");
  789.     GivePlayerMoney(playerid, -1000);
  790.     GivePlayerMoney(killerid, 5500);
  791.     GameTextForPlayer(playerid, "~r~Zemrel jsi!!",2500,3);
  792.     SendClientMessage(killerid, GREEN, "Dobra prace - Dostaneš 5500$ a +1 bod jako odměnu!");
  793.     SetPlayerWantedLevel(killerid, 6);
  794.     if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
  795.     return 1;
  796. }
  797.  
  798. public OnPlayerText(playerid, text[])
  799. {
  800.     if(GetPVarInt(playerid,"Muted") == 1)
  801.     {
  802.         SCM(playerid,COLOR_BLUE,"Jsi umlčený, nemůžeš psát!");
  803.         new string[128];
  804.         format(string,128, "[ID:%d] %s", playerid,text);
  805.         SendPlayerMessageToAll(playerid, string);
  806.     }
  807.     if(GetPVarInt(playerid,"Muted") == 0)
  808.     {
  809.         new string[128];
  810.         format(string,128, "[ID:%d] %s", playerid,text);
  811.         SendPlayerMessageToAll(playerid, string);
  812.     }
  813.    
  814.     return 0;
  815. }
  816.  
  817. public OnPlayerRequestSpawn(playerid)
  818. {
  819.     ShowPlayerDialog(playerid, RED, DIALOG_STYLE_MSGBOX, "{FFFF00}Úvod","{F0F0F0}Zdravím, Napiš /prikazy kde nalezneš užitečné příkazy","Ok","");
  820.     return 1;
  821. }
  822.  
  823. public OnPlayerPickUpPickup(playerid, pickupid)
  824. {
  825.     if(pickupid == weaponshop1)
  826.     {
  827.         ShowPlayerDialog(playerid,4,DIALOG_STYLE_LIST,"{0548FA}Weapon shop","{FFFFFF}Granát {FFFFFF}$2 000/500 ks" "\n" "{FFFFFF}Desert eagle {FFFFFF}$5 000/1000 nábojů" "\n" "{FFFFFF}Sawn-off shotgun {FFFFFF}$10 000/1000 nábojů" "\n" "{FFFFFF}M4 {FFFFFF}$15 000/1000 nábojů" "\n" "{FFFFFF}Sniper {FFFFFF}$15 000/1000 nábojů" "\n" "{FFFFFF}Raketomet {FFFFFF}$200 000/100 nábojů","Koupit","Konec");
  828.     }
  829.     if(pickupid == weaponshop2)
  830.     {
  831.         ShowPlayerDialog(playerid,4,DIALOG_STYLE_LIST,"{0548FA}Weapon shop","{FFFFFF}Granát {FFFFFF}$2 000/500 ks" "\n" "{FFFFFF}Desert eagle {FFFFFF}$5 000/1000 nábojů" "\n" "{FFFFFF}Sawn-off shotgun {FFFFFF}$10 000/1000 nábojů" "\n" "{FFFFFF}M4 {FFFFFF}$15 000/1000 nábojů" "\n" "{FFFFFF}Sniper {FFFFFF}$15 000/1000 nábojů" "\n" "{FFFFFF}Raketomet {FFFFFF}$200 000/100 nábojů","Koupit","Konec");
  832.     }
  833.     if(pickupid == weaponshop3)
  834.     {
  835.         ShowPlayerDialog(playerid,4,DIALOG_STYLE_LIST,"{0548FA}Weapon shop","{FFFFFF}Granát {FFFFFF}$2 000/500 ks" "\n" "{FFFFFF}Desert eagle {FFFFFF}$5 000/1000 nábojů" "\n" "{FFFFFF}Sawn-off shotgun {FFFFFF}$10 000/1000 nábojů" "\n" "{FFFFFF}M4 {FFFFFF}$15 000/1000 nábojů" "\n" "{FFFFFF}Sniper {FFFFFF}$15 000/1000 nábojů" "\n" "{FFFFFF}Raketomet {FFFFFF}$200 000/100 nábojů","Koupit","Konec");
  836.     }
  837.     if(pickupid == weaponshop4)
  838.     {
  839.         ShowPlayerDialog(playerid,4,DIALOG_STYLE_LIST,"{0548FA}Weapon shop","{FFFFFF}Granát {FFFFFF}$2 000/500 ks" "\n" "{FFFFFF}Desert eagle {FFFFFF}$5 000/1000 nábojů" "\n" "{FFFFFF}Sawn-off shotgun {FFFFFF}$10 000/1000 nábojů" "\n" "{FFFFFF}M4 {FFFFFF}$15 000/1000 nábojů" "\n" "{FFFFFF}Sniper {FFFFFF}$15 000/1000 nábojů" "\n" "{FFFFFF}Raketomet {FFFFFF}$200 000/100 nábojů","Koupit","Konec");
  840.     }
  841.     if(pickupid == weaponshop5)
  842.     {
  843.         ShowPlayerDialog(playerid,4,DIALOG_STYLE_LIST,"{0548FA}Weapon shop","{FFFFFF}Granát {FFFFFF}$2 000/500 ks" "\n" "{FFFFFF}Desert eagle {FFFFFF}$5 000/1000 nábojů" "\n" "{FFFFFF}Sawn-off shotgun {FFFFFF}$10 000/1000 nábojů" "\n" "{FFFFFF}M4 {FFFFFF}$15 000/1000 nábojů" "\n" "{FFFFFF}Sniper {FFFFFF}$15 000/1000 nábojů" "\n" "{FFFFFF}Raketomet {FFFFFF}$200 000/100 nábojů","Koupit","Konec");
  844.     }
  845.     return 1;
  846. }
  847.  
  848. public OnPlayerUpdate(playerid)
  849. {
  850.     if(GetPlayerWeapon(playerid) == 38 || GetPlayerWeapon(playerid) == 36 || GetPlayerWeapon(playerid) == 37 || GetPlayerWeapon(playerid) == 44 || GetPlayerWeapon(playerid) == 45 || GetPlayerWeapon(playerid) == 21)
  851.     {
  852.         SendClientMessage(playerid, RED, "Byl jsi vyhozen za Weapon cheat");
  853.         Kick(playerid);
  854.     }
  855.     return 1;
  856. }
  857.  
  858. //=PRIKAZY======================================================================
  859.  
  860. QCMD:t() {
  861.  
  862. if(isnull()) return SendClientMessage(playerid, ORANGE, "Použití: /t [text] pro psaní do team chatu");
  863. new Name[MAX_PLAYER_NAME]; GetPlayerName(playerid, Name, sizeof(Name));
  864. new string[128];
  865. format(string, sizeof(string), "[t][Team Chat] %s: %s", Name, params[0]);
  866. printf("%s", string);
  867.  
  868. for(new i = 0; i < MAX_PLAYERS; i++)
  869. {
  870. if(IsPlayerConnected(i) && gTeam[i] == gTeam[playerid]) SendClientMessage(i, RED, string);
  871. }
  872. return 1;
  873. }
  874.  
  875. QCMD:mujteam()
  876. {
  877. if(gTeam[playerid] == TEAM_GERMANY)
  878. {
  879. SendClientMessage(playerid, ORANGE, "Váš team: Němci");
  880. }
  881. else if(gTeam[playerid] == TEAM_IRAQ)
  882. {
  883. SendClientMessage(playerid, ORANGE, "Váš team: Iránci");
  884. }
  885. else if(gTeam[playerid] == TEAM_RUSSIA)
  886. {
  887. SendClientMessage(playerid, ORANGE, "Váš team: Sovieti");
  888. }
  889. else if(gTeam[playerid] == TEAM_USA)
  890. {
  891. SendClientMessage(playerid, ORANGE, "Váš team: Američani");
  892. }
  893. else if(gTeam[playerid] == TEAM_BANGLADESH)
  894. {
  895. SendClientMessage(playerid, ORANGE, "Váš team: Evropané");
  896. }
  897. return 1;
  898. }
  899. QCMD:kill()
  900. {
  901. SetPlayerHealth(playerid, 0);
  902. }
  903. QCMD:prikazy()
  904. {
  905. ShowPlayerDialog(playerid, RED, DIALOG_STYLE_MSGBOX, "{FFFF00}Příkazy pro hráče","{FFFF00}/t || /mujteam || /car || /W \n/Help  ||/ehelp || /Kill || /Rules || /team \n/laseron|off || /lasercol","I accept","");
  906. return 1;
  907. }
  908. QCMD:radio()
  909. {
  910. ShowPlayerDialog(playerid,10,DIALOG_STYLE_LIST,"**Radio**","{FF8040}Europa 2 [SK]\n{FF8040}Europa 2 [CZ]\n{FF8040}FunRadio [SK]\n{FF8040}FajnRadio [CZ]\n{FF8040}Kiss [CZ]\n{FF8040}HipHop Storage [CZ]\n{FF8040}RockZone [CZ]\n{FF8040}RadioImpuls [CZ]\n{FF8040}RadioBlanik [CZ]\n{FF8040}DNB [COM]\n\n{FF0000}Vypnuť Radio","Vyber","Koniec");
  911. return 1;
  912. }
  913. QCMD:help()
  914. {
  915. ShowPlayerDialog(playerid, RED, DIALOG_STYLE_MSGBOX, "{FFFF00}Help","{F0F0F0}/prikazy /Rules ","Ok","");
  916. return 1;
  917. }
  918. QCMD:rules()
  919. {
  920. ShowPlayerDialog(playerid, RED, DIALOG_STYLE_MSGBOX, "{FFFF00}Pravidla","Nesmíš používat crasher a nesmrtelnost jinak vše je povoleno.","Ok","");
  921. }
  922. QCMD:team()
  923. {
  924. SetPlayerHealth(playerid, 0.0);
  925. ForceClassSelection(playerid);
  926. SendClientMessage(playerid, ORANGE,"Vyber si nový team!");
  927. return 1;
  928. }
  929. //=Admin Prikazy================================================================
  930. QCMD:cmds()
  931. {
  932.     SCM(playerid,COLOR_RED,"|============={ A D M I N }=============|");
  933.     SCM(playerid,COLOR_YELLOW,"Všichni: /admins ; / report ; /cmds");
  934.     SCM(playerid,COLOR_YELLOW,"Admin lvl 1: /me | /var | /goto | /get ");
  935.     SCM(playerid,COLOR_YELLOW,"Admin lvl 2: /acheat | /health | /nick | /slay | /mute | /unmute");
  936.     SCM(playerid,COLOR_YELLOW,"Admin lvl 3: /kick | /gm | /gw | /freeze | /unfreeze | /clearchat");
  937.     SCM(playerid,COLOR_YELLOW,"Admin lvl 4: /ban | /kickall | /belaone | /beback");
  938.     SCM(playerid,COLOR_RED,"|============={ A D M I N }=============|");
  939.     return true;
  940. }
  941.  
  942. QCMD:setlevel()
  943. {
  944.     if(IsPlayerAdmin(playerid))
  945.     {
  946.         new level,
  947.         id = strlen(params),
  948.         string[128];
  949.         if(sscanf(params,"ui",id,level)) return SCM(playerid,COLOR_RED,"Použití: /setlevel [ID] [LEVEL: 0-4]");
  950.         else if(!IsPlayerConnected(id)) return SCM(playerid,COLOR_RED,"[ ! ] Hráč není na serveru");
  951.         else if(level > 4 || level < 0) return SCM(playerid,COLOR_RED,"Použití: /setlevel [ID] [LEVEL: 0-4]");
  952.         else
  953.         format(string,sizeof(string),"Administrátor %s nastavil hráči %s adminlevel %d",PlayerName(playerid),PlayerName(id),level);
  954.         SCMTA(COLOR_GREEN,string);
  955.         Alvl[id] = level;
  956.     }
  957.     else SCM(playerid,COLOR_RED,"Nemáš dostatečné práva pro tento příkaz");
  958.     return true;
  959. }
  960.  
  961. QCMD:report()
  962. {
  963.     new
  964.     kdo = strval(params)
  965.     ,string[128]
  966.     ,duvod[25];
  967.     if(sscanf(params,"uz",kdo,duvod)) return SCM(playerid,COLOR_RED,"Použití: /report [ID] [DUVOD]");
  968.     else if(!IsPlayerConnected(kdo)) return SCM(playerid,COLOR_RED,"[ ! ] Hráč neni na serveru");
  969.     else
  970.     format(string,sizeof(string),"Hráč %s nahlásil hráče %s (ID: %d) [DUVOD: %s]",PlayerName(playerid),PlayerName(kdo),kdo,duvod);
  971.     for(new i;i<MAX_PLAYERS;i++)
  972.     {
  973.         if(IsPlayerAdmin(playerid) || Alvl[i] >= 1)
  974.         {
  975.             SCMTA(COLOR_YELLOW,string);
  976.         }
  977.         else return 0;
  978.     }
  979.     return true;
  980. }
  981.  
  982. QCMD:kick()
  983. {
  984.     if(Alvl[playerid] >= 3)
  985.     {
  986.         new
  987.         id = strval(params),
  988.         duvod[25],
  989.         string[128];
  990.  
  991.         if(sscanf(params,"uz",id,duvod)) return SCM(playerid,COLOR_RED,"Použizí: /kick [ID] [DUVOD]");
  992.         else if(!IsPlayerConnected(id)) return SCM(playerid,COLOR_RED,"[ ! ] Hráč není na serveru!");
  993.         else if(Alvl[id]>=1) return SCM(playerid,COLOR_RED,"Nemůžeš vykicknout administrátora");
  994.         else
  995.         format(string,sizeof(string),"Administrátor %s vykicknul hráče %s [DUVOD: %s]",PlayerName(playerid),PlayerName(id),duvod);
  996.         SCMTA(COLOR_GREEN,string);
  997.         Kick(id);
  998.     } else SCM(playerid,COLOR_RED,"Nemáš dostatečné práva pro tento příkaz");
  999.     return true;
  1000. }
  1001.  
  1002. QCMD:ban()
  1003. {
  1004.     if(Alvl[playerid] >= 4)
  1005.     {
  1006.         new
  1007.         id = strval(params),
  1008.         duvod[25],
  1009.         string[128];
  1010.  
  1011.         if(sscanf(params,"uz",id,duvod)) return SCM(playerid,COLOR_RED,"Použizí: /ban [ID] [DUVOD]");
  1012.         else if(!IsPlayerConnected(id)) return SCM(playerid,COLOR_RED,"[ ! ] Hráč není na serveru!");
  1013.         else if(Alvl[id]>=1) return SCM(playerid,COLOR_RED,"Nemůžeš zabanovat administrátora");
  1014.         else
  1015.         format(string,sizeof(string),"Administrátor %s zabanoval hráče %s [DUVOD: %s]!",PlayerName(playerid),PlayerName(id),duvod);
  1016.         Ban(id);
  1017.     }else SCM(playerid,COLOR_RED,"Nemáš dostatečné práva pro tento příkaz");
  1018.     return true;
  1019. }
  1020.  
  1021. QCMD:me()
  1022. {
  1023.     if(Alvl[playerid] >= 1)
  1024.     {
  1025.         new text[128],
  1026.         string[128];
  1027.         if(sscanf(params,"z",text)) return SCM(playerid,COLOR_RED,"Použití: /me [TEXT]");
  1028.         else
  1029.         format(string,sizeof(string),"{FFFFFF}[{FF0000}ServerAdmin: {33FF00}%s{FFFFFF} ]:{FF0000} %s",PlayerName(playerid),text);
  1030.         SCMTA(COLOR_RED,string);
  1031.     }else SCM(playerid,COLOR_RED,"Nemáš dostatečné práva pro tento příkaz");
  1032.     return true;
  1033. }
  1034.  
  1035. QCMD:mute()
  1036. {
  1037.     if(Alvl[playerid] >= 2)
  1038.     {
  1039.         new id = strval(params),
  1040.         string[128],
  1041.         minuty,
  1042.         duvod[25];
  1043.         if(sscanf(params,"udz",id,minuty,duvod)) return SCM(playerid,COLOR_RED,"Použití: /mute [ID] [SEKUNDY] [DUVOD]");
  1044.         else if(GetPVarInt(id,"Mute") == 1) return SCM(playerid,COLOR_RED,"Hráč již je umlčený");
  1045.         else if(Alvl[id] >= 1) return SCM(playerid,COLOR_RED,"Nemůžeš umlčet administrátora");
  1046.         else
  1047.         SetPVarInt(id,"Mute",1);
  1048.         SetTimerEx("muted",minuty*1000,0,"i",id);
  1049.         format(string,sizeof(string),"Administrátor %s umlčel hráče %s na %d minut s důvodem %s",PlayerName(playerid),PlayerName(id),minuty,duvod);
  1050.         SCMTA(COLOR_RED,string);
  1051.     }else SCM(playerid,COLOR_RED,"Nemáš dostatečné práva pro tento příkaz");
  1052.     return true;
  1053. }
  1054.  
  1055. QCMD:unmute()
  1056. {
  1057.     if(Alvl[playerid] >= 2)
  1058.     {
  1059.         new id = strval(params),
  1060.         string[128];
  1061.         if(sscanf(params,"u",id)) return SCM(playerid,COLOR_RED,"Použití: /unmute [ID]");
  1062.         else if(GetPVarInt(id,"Mute") == 0) return SCM(playerid,COLOR_RED,"Hráč není umlčený");
  1063.         else
  1064.         format(string,sizeof(string),"Administrátor %s odmlčel hráče %s",PlayerName(playerid),PlayerName(id));
  1065.         SCMTA(COLOR_RED,string);
  1066.         SetPVarInt(id,"Mute",0);
  1067.     }else SCM(playerid,COLOR_RED,"Nemáš dostatečné práva pro tento příkaz");
  1068.     return true;
  1069. }
  1070.  
  1071. QCMD:var()
  1072. {
  1073.     if(Alvl[playerid] >= 1)
  1074.     {
  1075.         new id = strval(params),
  1076.         duvod[25],
  1077.         string[128],
  1078.         string1[128];
  1079.         if(sscanf(params,"uz",id,duvod)) return SCM(playerid,COLOR_RED,"Použití: /var [ID] [DUVOD]");
  1080.         else if(!IsPlayerConnected(id)) return SCM(playerid,COLOR_RED,"Hráč není na serveru");
  1081.         else if(Alvl[id] >= 1) return SCM(playerid,COLOR_RED,"Nemůžeš varovat administrátora!");
  1082.         else
  1083.         varovani[id] ++;
  1084.         format(string,sizeof(string),"[%d/3] Administrátor %s varoval hráče %s [DUVOD: %s]",varovani,PlayerName(playerid),PlayerName(id),duvod);
  1085.         SCMTA(COLOR_RED,string);
  1086.         if(varovani[id] >= 3)
  1087.         {
  1088.             format(string1,sizeof(string1),"[3/3] Administrátor %s vyhodil hráče %s [DUVOD: %s]",PlayerName(playerid),PlayerName(id),duvod);
  1089.             SCMTA(COLOR_RED,string1);
  1090.             Kick(id);
  1091.         }
  1092.     }else SCM(playerid,COLOR_RED,"Nemáš dostatečné práva pro tento příkaz");
  1093.     return true;
  1094. }
  1095.  
  1096. QCMD:goto()
  1097. {
  1098.     if(Alvl[playerid] >= 1)
  1099.     {
  1100.         new id = strval(params),
  1101.         string[128],
  1102.         Float:x,
  1103.         Float:y,
  1104.         Float:z;
  1105.         if(sscanf(params,"u",id)) return SCM(playerid,COLOR_RED,"Použití: /goto [ID]");
  1106.         else if(!IsPlayerConnected(id)) return SCM(playerid,COLOR_RED,"Hráč není na serveru");
  1107.         else
  1108.         GetPlayerPos(id,x,y,z);
  1109.         Warp(playerid,x,y+1,z);
  1110.         format(string,sizeof(string),"Administrátor %s se warpl k hráči %s",PlayerName(playerid),PlayerName(id));
  1111.         SCMTA(COLOR_RED,string);
  1112.  
  1113.  
  1114.     }else SCM(playerid,COLOR_RED,"Nemáš dostatečné práva pro tento příkaz");
  1115.     return true;
  1116. }
  1117.  
  1118. QCMD:get()
  1119. {
  1120.     if(Alvl[playerid] >= 1)
  1121.     {
  1122.         new id = strval(params),
  1123.         string[128],
  1124.         Float:x,
  1125.         Float:y,
  1126.         Float:z;
  1127.         if(sscanf(params,"u",id)) return SCM(playerid,COLOR_RED,"Použití: /get [ID]");
  1128.         else if(!IsPlayerConnected(id)) return SCM(playerid,COLOR_RED,"Hráč není na serveru");
  1129.         else
  1130.         GetPlayerPos(playerid,x,y,z);
  1131.         Warp(id,x,y+1,z);
  1132.         format(string,sizeof(string),"Administrátor %s k sobě warpl %s",PlayerName(playerid),PlayerName(id));
  1133.         SCMTA(COLOR_RED,string);
  1134.     }else SCM(playerid,COLOR_RED,"Nemáš dostatečné práva pro tento příkaz");
  1135.     return true;
  1136. }
  1137.  
  1138.  
  1139.  
  1140. QCMD:freeze()
  1141. {
  1142.     if(Alvl[playerid] >= 3)
  1143.     {
  1144.         new id = strval(params),
  1145.         string[128],
  1146.         duvod[25],
  1147.         minuty;
  1148.         if(sscanf(params,"udz",id,minuty,duvod)) return SCM(playerid,COLOR_RED,"Použití: /freeze [ID] [SEKUNDY] [DUVOD]");
  1149.         else if(!IsPlayerConnected(id)) return SCM(playerid,COLOR_RED,"Hráč není na serveru");
  1150.         else if(GetPVarInt(id,"zrazeny")==1) return SCM(playerid,COLOR_RED,"Hráč již zmražený je");
  1151.         else if(Alvl[id] >= 1) return SCM(playerid,COLOR_RED,"Nemůžeš zmrazit administrátora");
  1152.         else
  1153.         SetPVarInt(id,"zmrazeny",1);
  1154.         TogglePlayerControllable(playerid,0);
  1155.         SetTimerEx("odmrazit",minuty*1000,false,"i",id);
  1156.         format(string,sizeof(string),"Administrátor %s zmrazil hráče %s s důvodem %s na %d sekund",PlayerName(playerid),PlayerName(id),duvod,minuty);
  1157.         SCMTA(COLOR_RED,string);
  1158.     }else SCM(playerid,COLOR_RED,"Nemáš dostatečné práva pro tento příkaz");
  1159.     return true;
  1160. }
  1161.  
  1162. QCMD:unfreeze()
  1163. {
  1164.     if(Alvl[playerid] >= 3)
  1165.     {
  1166.         new id = strval(params),
  1167.         string[128];
  1168.         if(sscanf(params,"u",id)) return SCM(playerid,COLOR_RED,"Použití: /unfreeze [ID]");
  1169.         else if(!IsPlayerConnected(id)) return SCM(playerid,COLOR_RED,"Hráč není na serveru");
  1170.         else if(GetPVarInt(id,"zmrazeny")==0) return SCM(playerid,COLOR_RED,"Hráč není zmražený");
  1171.         else
  1172.         SetPVarInt(id,"zmrazeny",0);
  1173.         TogglePlayerControllable(playerid,1);
  1174.         format(string,sizeof(string),"Administrátor %s odmrazil hráče %s",PlayerName(playerid),PlayerName(id));
  1175.         SCMTA(COLOR_RED,string);
  1176.     }else SCM(playerid,COLOR_RED,"Nemáš dostatečné práva pro tento příkaz");
  1177.     return true;
  1178. }
  1179.  
  1180. QCMD:clearchat()
  1181. {
  1182.     if(Alvl[playerid] >= 3)
  1183.     {
  1184.         for(new i;i<60;i++)
  1185.         {
  1186.             SCMTA(COLOR_RED," ");
  1187.         }
  1188.         new string[128];
  1189.         format(string,sizeof(string),"Administrátor %s promazal chat !",PlayerName(playerid));
  1190.         SCMTA(COLOR_RED,string);
  1191.     }else SCM(playerid,COLOR_RED,"Nemáš dostatečné práva pro tento příkaz");
  1192.     return true;
  1193. }
  1194.  
  1195. QCMD:belaone()
  1196. {
  1197.     if(Alvl[playerid] >= 4)
  1198.     {
  1199.         new id = strval(params),
  1200.         string[128];
  1201.         if(sscanf(params,"u",id)) return SCM(playerid,COLOR_RED,"Použití: /bealone [ID]");
  1202.         else if(!IsPlayerConnected(id)) return SCM(playerid,COLOR_RED,"Hráč není na serveru");
  1203.         else if(GetPVarInt(id,"pryc")==1) return SCM(playerid,COLOR_RED,"Hráč je v jiném světě");
  1204.         else if(Alvl[id] >= 1) return SCM(playerid,COLOR_RED,"Nemůžeš poslat do jiného světa administrátora !");
  1205.         else
  1206.         SetPVarInt(id,"pryc",1);
  1207.         SetPlayerVirtualWorld(playerid,3);
  1208.         format(string,sizeof(string),"Administrátor %s dal hráče %s do jiného světa",PlayerName(playerid),PlayerName(id));
  1209.         SCMTA(COLOR_RED,string);
  1210.     }else SCM(playerid,COLOR_RED,"Nemáš dostatečné práva pro tento příkaz");
  1211.     return true;
  1212. }
  1213.  
  1214. QCMD:slay()
  1215. {
  1216.     if(Alvl[playerid] >= 2)
  1217.     {
  1218.         new id = strval(params),
  1219.         string[128];
  1220.         if(sscanf(params,"u",id)) return SCM(playerid,COLOR_RED,"Použití: /slay [ID]");
  1221.         else if(!IsPlayerConnected(id)) return SCM(playerid,COLOR_RED,"Hráč není na serveru");
  1222.         else if(Alvl[id] >= 1 ) return SCM ( playerid, COLOR_RED, "Nemůžeš usmrtit administrátora");
  1223.         else
  1224.         format(string,sizeof(string),"Administrátor %s tě zabil",PlayerName(playerid),PlayerName(id));
  1225.         SCM(id,COLOR_RED,string);
  1226.         SetPlayerHealth(id,0);
  1227.     }else SCM(playerid,COLOR_RED,"Nemáš dostatečné práva pro tento příkaz");
  1228.     return true;
  1229. }
  1230.  
  1231. QCMD:beback()
  1232. {
  1233.     if(Alvl[playerid] >= 4)
  1234.     {
  1235.         new id = strval(params),
  1236.         string[128];
  1237.         if(sscanf(params,"u",id)) return SCM(playerid,COLOR_RED,"Použití: /beback [ID]");
  1238.         else if(!IsPlayerConnected(id)) return SCM(playerid,COLOR_RED,"Hráč není na serveru");
  1239.         else if(GetPVarInt(id,"pryc")==0) return SCM(playerid,COLOR_RED,"Hráč není v jiném světě");
  1240.         else
  1241.         SetPVarInt(id,"pryc",0);
  1242.         SetPlayerVirtualWorld(playerid,0);
  1243.         format(string,sizeof(string),"Administrátor %s dal hráče %s z jiného světa",PlayerName(playerid),PlayerName(id));
  1244.         SCMTA(COLOR_RED,string);
  1245.     }else SCM(playerid,COLOR_RED,"Nemáš dostatečné práva pro tento příkaz");
  1246.     return true;
  1247. }
  1248.  
  1249. QCMD:nick()
  1250. {
  1251.     if(Alvl[playerid] >= 2)
  1252.     {
  1253.         new id = strval(params),
  1254.         string[128],
  1255.         newname[MAX_PLAYER_NAME];
  1256.         if(sscanf(params,"uz",id,newname)) return SCM(playerid,COLOR_RED,"Použití: /nick [ID] [NEWNAME]");
  1257.         else if(!IsPlayerConnected(id)) return SCM(playerid,COLOR_RED,"Hráč není na serveru");
  1258.         else if(Alvl[id] >= 1) return SCM(playerid,COLOR_RED,"Nemůžeš změnit jméno administrátorovi !");
  1259.         else
  1260.         SetPlayerName(id,newname);
  1261.         format(string,sizeof(string),"Administrátor %s nastavil hráči %s jiné jméno",PlayerName(playerid),PlayerName(id));
  1262.         SCMTA(COLOR_RED,string);
  1263.     }else SCM(playerid,COLOR_RED,"Nemáš dostatečné práva pro tento příkaz");
  1264.     return true;
  1265. }
  1266.  
  1267. QCMD:gw()
  1268. {
  1269.     if(Alvl[playerid] >= 3)
  1270.     {
  1271.         new id = strval(params),
  1272.         zbran,
  1273.         string[128];
  1274.         if(sscanf(params,"ud",id,zbran)) return SCM(playerid,COLOR_RED,"Použití: /gw [ID] [IDZBRANE]");
  1275.         else if(!IsPlayerConnected(id)) return SCM(playerid,COLOR_RED,"Hráč není na serveru");
  1276.         else if(zbran > 46 || zbran < 0 ) return SCM(playerid,COLOR_RED,"ID Zbrane: 0 - 46");
  1277.         else
  1278.         GivePlayerWeapon(id,zbran,9999);
  1279.         format(string,sizeof(string),"Administrátor %s dal hráči %s zbraň ID: %d",PlayerName(playerid),PlayerName(id),zbran);
  1280.         SCMTA(COLOR_RED,string);
  1281.     }else SCM(playerid,COLOR_RED,"Nemáš dostatečné práva pro tento příkaz");
  1282.     return true;
  1283. }
  1284.  
  1285. QCMD:gm()
  1286. {
  1287.     if(Alvl[playerid] >= 3)
  1288.     {
  1289.         new id = strval(params),
  1290.         money,
  1291.         string[128];
  1292.         if(sscanf(params,"ud",id,money)) return SCM(playerid,COLOR_RED,"Použití: /gm [ID] [MONEY]");
  1293.         else if(!IsPlayerConnected(id)) return SCM(playerid,COLOR_RED,"Hráč není na serveru");
  1294.         else
  1295.         GivePlayerMoney(playerid,money);
  1296.         format(string,sizeof(string),"Administrátor %s dal hráči %s %s$",PlayerName(playerid),PlayerName(id),money);
  1297.         SCMTA(COLOR_RED,string);
  1298.     }else SCM(playerid,COLOR_RED,"Nemáš dostatečné práva pro tento příkaz");
  1299.     return true;
  1300. }
  1301.  
  1302. QCMD:server()
  1303. {
  1304.     if(IsPlayerAdmin(playerid))
  1305.     {
  1306.         ShowPlayerDialog(playerid,32225,DIALOG_STYLE_LIST,"Manipulace se serverem","Zamknout\nOdemknout\nRestart\nVymazat bany\nZmenit jmeno\nVypnout server","Vybrat","Nic");
  1307.     }else SCM(playerid,COLOR_RED,"Nemáš dostatečné práva pro tento příkaz");
  1308.     return true;
  1309. }
  1310.  
  1311. QCMD:admins()
  1312. {
  1313.     new string[MAX_PLAYER_NAME*6+120];
  1314.     foreach(new i:Player)
  1315.     {
  1316.         if(Alvl[i] > 0 || IsPlayerAdmin(playerid))
  1317.         {
  1318.             format(string,sizeof(string),"%s%s {0000FF}: {FFFFFF}%s\n",string,PlayerName(i),Admins(i));
  1319.         }
  1320.     }
  1321.     ShowPlayerDialog(playerid,31000,DIALOG_STYLE_MSGBOX,"Online admini:",string,"OK","");
  1322.     return true;
  1323. }
  1324.  
  1325. QCMD:acheat()
  1326. {
  1327.     if(Alvl[playerid] >= 2)
  1328.     {
  1329.         new id = strval(params),
  1330.         Float:x,
  1331.         Float:y,
  1332.         Float:z;
  1333.         if(sscanf(params,"u",id)) return SCM(playerid,COLOR_RED,"Použití: /acheat [ID]");
  1334.         else if(!IsPlayerConnected(id)) return SCM(playerid,COLOR_RED,"Hráč není připojen!!");
  1335.         else
  1336.         GetPlayerPos(id,x,y,z);
  1337.         SetPlayerHealth(id,100.0);
  1338.         SetPlayerArmour(id,0.0);
  1339.         CreateExplosion(x,y,z,6,2.0);
  1340.         SetTimerEx("acheat",1500,false,"i",id);
  1341.     }else SCM(playerid,COLOR_RED,"Nemáš dostatečné práva pro tento příkaz");
  1342.     return true;
  1343. }
  1344.  
  1345. QCMD:health()
  1346. {
  1347.     if(Alvl[playerid] >= 2)
  1348.     {
  1349.         new id = strval(params),
  1350.         Float:health,
  1351.         string[128];
  1352.         if(sscanf(params,"uf",id,health)) return SCM(playerid,COLOR_RED,"Použití: /health [ID] [HEALTH]");
  1353.         else if(!IsPlayerConnected(id)) return SCM(playerid,COLOR_RED,"Hráč není připojen!!");
  1354.         else
  1355.         SetPlayerHealth(id,health);
  1356.         format(string,sizeof(string),"Administrátor %s nastavil hráči %s %s životů",PlayerName(playerid),PlayerName(id),health);
  1357.         SCMTA(COLOR_RED,string);
  1358.     }else SCM(playerid,COLOR_RED,"Nemáš dostatečné práva pro tento příkaz");
  1359.     return true;
  1360. }
  1361.  
  1362. QCMD:kickall()
  1363. {
  1364.     if(Alvl[playerid] >= 4)
  1365.     {
  1366.         new string[128];
  1367.         format(string,sizeof(string),"Všichni jste byli odpojeni administrátorem %s",PlayerName(playerid));
  1368.         SCMTA(COLOR_WHITE,string);
  1369.         for(new i;i<MAX_PLAYERS;i++)
  1370.         {
  1371.             if(IsPlayerConnected(i))
  1372.             {
  1373.                 Kick(i);
  1374.             }
  1375.         }
  1376.     }
  1377.     return true;
  1378. }
  1379. //==============================================================================
  1380. public OnPlayerDisconnect(playerid, reason)
  1381. {
  1382.     if(Alvl[playerid] > 0)
  1383.     {
  1384.     new cesta[100];
  1385.     format(cesta, sizeof(cesta), "/hraci/%s.ini", PlayerName(playerid));
  1386.     new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
  1387.     GetPlayerName(playerid, name, sizeof(name));
  1388.     dini_IntSet(cesta,"peníze",GetPlayerMoney(playerid));
  1389.     dini_IntSet(cesta,"score",GetPlayerScore(playerid));
  1390.     dini_IntSet(cesta,"admin",Alvl[playerid]);
  1391.     format(string, sizeof(string), "** %s odešel ze serveru", name);
  1392.     SendClientMessageToAll(RED, string);
  1393.     }
  1394.     return 1;
  1395. }
  1396. //=REGISTRACIA=============================================================================
  1397. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  1398. {
  1399. if(dialogid == 1){
  1400. if(response==1){
  1401. if(strlen(inputtext)>1)
  1402. {
  1403. new cesta[100];
  1404. format(cesta, sizeof(cesta), "/hraci/%s.ini", PlayerName(playerid));
  1405. ShowPlayerDialog(playerid,99,DIALOG_STYLE_MSGBOX,"Registrace","Úspěšne jsi se zaregistroval!","OK","");
  1406. dini_Set(cesta,"meno",PlayerName(playerid));
  1407. dini_Set(cesta,"heslo",inputtext);
  1408. logged[playerid] = 1;
  1409. }else{
  1410. ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"Registrace","Heslo musíš zadat!","Registrovat","Zrušit");
  1411. }
  1412. if(response==0){
  1413. ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"Registrace","Heslo musíš zadat!","Registrovat","Zrušit");
  1414. }
  1415. }
  1416. if(dialogid == 2){
  1417. if(response==1){
  1418. new cesta[100];
  1419. format(cesta, sizeof(cesta), "/hraci/%s.ini", PlayerName(playerid));
  1420. if(!strcmp(dini_Get(cesta, "heslo"), inputtext)){
  1421. if(strlen(inputtext)>1)
  1422. {
  1423. ShowPlayerDialog(playerid,100,DIALOG_STYLE_MSGBOX,"Přihlášení","Přihlášení proběhlo úspěšně!","OK","");
  1424. logged[playerid] = 1;
  1425. }else{
  1426. ShowPlayerDialog(playerid,2,DIALOG_STYLE_PASSWORD,"Přihlášení","Zadal jsi špatné heslo!","Přihlásit","Zrušit");
  1427. }
  1428. }else{
  1429. ShowPlayerDialog(playerid,2,DIALOG_STYLE_PASSWORD,"Přihlášení","Zadal jsi špatné heslo!","Přihlásit","Zrušit");
  1430. }
  1431. }
  1432. if(response==0){
  1433. ShowPlayerDialog(playerid,2,DIALOG_STYLE_PASSWORD,"Přihlášení","Heslo musíš zadat!","Přihlásit","Zrušit");
  1434. }
  1435. }
  1436. if(dialogid==10)
  1437. if(response)
  1438. if(listitem==0)//Europa 2 [SK]
  1439. {
  1440. StopAudioStreamForPlayer(playerid);
  1441. PlayAudioStreamForPlayer(playerid ,"http://ice2.europa2.sk/fm-europa2sk-128");
  1442. SendClientMessage(playerid,0x00FFFFFF, "[Online-Radio] Spustil si Európu 2 [SK]");
  1443. }
  1444. else if(listitem==1)//Europa 2 [CZ]
  1445. {
  1446. StopAudioStreamForPlayer(playerid);
  1447. PlayAudioStreamForPlayer(playerid ,"http://icecast3.play.cz/evropa2-128.mp3.m3u");
  1448. SendClientMessage(playerid,0x00FFFFFF, "[Online-Radio] Spustil si Európu 2 [CZ]");
  1449. }
  1450. else if(listitem==2)//FunRadio
  1451. {
  1452. StopAudioStreamForPlayer(playerid);
  1453. PlayAudioStreamForPlayer(playerid ,"http://stream.funradio.sk:8000/fun128.mp3");
  1454. SendClientMessage(playerid,0x00FFFFFF, "[Online-Radio] Spustil si FunRadio [SK]");
  1455. }
  1456. else if(listitem==3)//FajnRadio
  1457. {
  1458. StopAudioStreamForPlayer(playerid);
  1459. PlayAudioStreamForPlayer(playerid ,"http://ice.abradio.cz:8000/fajn128.mp3");
  1460. SendClientMessage(playerid,0x00FFFFFF, "[Online-Radio] Spustil si FajnRadio [CZ]");
  1461. }
  1462. else if(listitem==4)//KissRadio
  1463. {
  1464. StopAudioStreamForPlayer(playerid);
  1465. PlayAudioStreamForPlayer(playerid ,"http://85.159.106.242:8000/kissmp3_128.mp3");
  1466. SendClientMessage(playerid,0x00FFFFFF, "[Online-Radio] Spustil si KissRadio [CZ]");
  1467. }
  1468. else if(listitem==5)//HipHop Storage
  1469. {
  1470. StopAudioStreamForPlayer(playerid);
  1471. PlayAudioStreamForPlayer(playerid ,"http://www.hiphopstage.cz/radio.pls");
  1472. SendClientMessage(playerid,0x00FFFFFF, "[Online-Radio] Spustil si HipHop Storage [CZ]");
  1473. }
  1474. else if(listitem==6)//RockZone
  1475. {
  1476. StopAudioStreamForPlayer(playerid);
  1477. PlayAudioStreamForPlayer(playerid ,"http://icecast5.play.cz/rockzone128.mp3");
  1478. SendClientMessage(playerid,0x00FFFFFF, "[Online-Radio] Spustil si RockZone [CZ]");
  1479. }
  1480. else if(listitem==7)//RadioImpuls
  1481. {
  1482. StopAudioStreamForPlayer(playerid);
  1483. PlayAudioStreamForPlayer(playerid ,"http://icecast6.play.cz/fm-impuls-128.mp3");
  1484. SendClientMessage(playerid,0x00FFFFFF, "[Online-Radio] Spustil si RadioImpuls [CZ]");
  1485. }
  1486. else if(listitem==8)//RadioBlanik
  1487. {
  1488. StopAudioStreamForPlayer(playerid);
  1489. PlayAudioStreamForPlayer(playerid ,"http://kocka.limemedia.cz:8000/blanikcz/128.mp3.m3u");
  1490. SendClientMessage(playerid,0x00FFFFFF, "[Online-Radio] Spustil si RadioBlanik [CZ]");
  1491. }
  1492. else if(listitem==9)//DNB
  1493. {
  1494. StopAudioStreamForPlayer(playerid);
  1495. PlayAudioStreamForPlayer(playerid ,"http://www.dnbradio.com/hi.m3u");
  1496. SendClientMessage(playerid,0x00FFFFFF, "[Online-Radio] Spustil si DNB [COM]");
  1497. }
  1498. else if(listitem==10)//Vypnutie Radia
  1499. {
  1500. StopAudioStreamForPlayer(playerid);
  1501. SendClientMessage(playerid,0x00FFFFFF, "[Online-Radio] Vypol si Online Rádio");
  1502. }
  1503. }
  1504. if(dialogid == 4)
  1505. if(response == 1)
  1506. switch(listitem)
  1507. {
  1508. case 0:
  1509. {
  1510. if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid,CERVENA,"Nemaš dostatek peněz!! Vrať se až je budeš mít!");
  1511. GivePlayerWeapon(playerid, 16, 500);
  1512. GivePlayerMoney(playerid,-2000);
  1513. SendClientMessage(playerid, SVETLE1_MODRA,"Zakoupil jsi 500 Granátů.");
  1514. }
  1515. case 1:
  1516. {
  1517. if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid,CERVENA,"Nemaš dostatek peněz!! Vrať se až je budeš mít!");
  1518. GivePlayerWeapon(playerid, 24, 1000);
  1519. GivePlayerMoney(playerid,-5000);
  1520. SendClientMessage(playerid,SVETLE1_MODRA,"Zakoupil jsi Desert Eagl/1000 nábojů.");
  1521. }
  1522. case 2:
  1523. {
  1524. if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid,CERVENA,"Nemaš dostatek peněz!! Vrať se až je budeš mít!");
  1525. GivePlayerMoney(playerid,-10000);
  1526. GivePlayerWeapon(playerid, 26, 1000);
  1527. SendClientMessage(playerid,SVETLE1_MODRA,"Zakoupil jsi Sawn-off shotgun/1000 nábojů.");
  1528. }
  1529. case 3:
  1530. {
  1531. if(GetPlayerMoney(playerid) < 15000) return SendClientMessage(playerid,CERVENA,"Nemaš dostatek peněz!! Vrať se až je budeš mít!");
  1532. GivePlayerWeapon(playerid, 31, 1000);
  1533. GivePlayerMoney(playerid,-15000);
  1534. SendClientMessage(playerid,SVETLE1_MODRA,"Zakoupil jsi M4/1000 nábojů.");
  1535. }
  1536. case 4:
  1537. {
  1538. if(GetPlayerMoney(playerid) < 15000) return SendClientMessage(playerid,CERVENA,"Nemaš dostatek peněz!! Vrať se až je budeš mít!");
  1539. GivePlayerWeapon(playerid, 34, 1000);
  1540. GivePlayerMoney(playerid,-15000);
  1541. SendClientMessage(playerid,SVETLE1_MODRA,"Zakoupil jsi Sniper/1000 nábojů.");
  1542. }
  1543. case 5:
  1544. {
  1545. if(GetPlayerMoney(playerid) < 200000) return SendClientMessage(playerid,CERVENA,"Nemaš dostatek peněz!! Vrať se až je budeš mít!");
  1546. GivePlayerWeapon(playerid, 35, 100);
  1547. GivePlayerMoney(playerid,-200000);
  1548. SendClientMessage(playerid,SVETLE1_MODRA,"Zakoupil jsi Raketomet/100 nábojů.");
  1549. }
  1550. }
  1551. if(dialogid == 32225)
  1552. {
  1553. if(response == 1)
  1554. {
  1555. if(listitem == 0)
  1556. {
  1557. ShowPlayerDialog(playerid,30000,DIALOG_STYLE_INPUT,"Zamknout server","Zde napiš heslo pro server","Odeslat","Nic");
  1558. }
  1559. if(listitem == 1)
  1560. {
  1561. ShowPlayerDialog(playerid,30001,DIALOG_STYLE_MSGBOX,"Opravdu chcete ..","Opravdu chcete odemknout server","ANO","NE");
  1562. }
  1563. if(listitem == 2)
  1564. {
  1565. ShowPlayerDialog(playerid,30002,DIALOG_STYLE_INPUT,"Za kolik minut","Zadej, za kolik minut se Restartuje server (celé čísla)","Odeslat","Nic");
  1566. }
  1567. if(listitem == 3)
  1568. {
  1569. ShowPlayerDialog(playerid,30003,DIALOG_STYLE_MSGBOX,"Opravdu chcete ..","Opravdu chcete vymazat všechny BANy na serveru?","ANO","NE");
  1570. }
  1571. if(listitem == 4)
  1572. {
  1573. ShowPlayerDialog(playerid,30004,DIALOG_STYLE_INPUT,"Jméno serveru","Zadejte nové jméno serveru","Odeslat","Nic");
  1574. }
  1575. if(listitem == 5)
  1576. {
  1577. ShowPlayerDialog(playerid,30005,DIALOG_STYLE_INPUT,"Za kolik minut ..","Zadejte, za kolik minut chcete, aby se vypnul server","Odeslat","Nic");
  1578. }
  1579. }
  1580. if(dialogid == 30000)
  1581. {
  1582. if(response == 1)
  1583. {
  1584. new newpass[128];
  1585. format(newpass,sizeof(newpass),"password %s",inputtext);
  1586. SendRconCommand(newpass);
  1587. }
  1588. }
  1589. if(dialogid == 30001)
  1590. {
  1591. if(response == 1)
  1592. {
  1593. SendRconCommand("password 0");
  1594. }
  1595. }
  1596. if(dialogid == 30002)
  1597. {
  1598. if(response == 1)
  1599. {
  1600. new minuty = strval(inputtext),
  1601. string[128];
  1602. if(!IsNumeric(inputtext)) return SCM(playerid,COLOR_RED,"Pouze celá čísla!");
  1603. else
  1604. SetTimer("Restart",minuty*60000,false);
  1605. format(string,sizeof(string),"Za %d minut se restartuje server",minuty);
  1606. SCMTA(COLOR_RED,string);
  1607. }
  1608. }
  1609. if(dialogid == 30003)
  1610. {
  1611. if(response == 1)
  1612. {
  1613. SendRconCommand("reloadbans");
  1614. }
  1615. }
  1616. if(listitem == 30004)
  1617. {
  1618. if(listitem == 1)
  1619. {
  1620. new newname[128],
  1621. string[128];
  1622. format(newname,sizeof(newname),"hostname %s",newname);
  1623. format(string,sizeof(string),"Hráč %s změnil jméno serveru na %s",PlayerName(playerid),newname);
  1624. SendRconCommand(newname);
  1625. }
  1626. }
  1627. if(listitem == 30005)
  1628. {
  1629. if(response == 1)
  1630. {
  1631. new minuty = strval(inputtext),
  1632. string[128];
  1633. if(!IsNumeric(inputtext)) return SCM(playerid,COLOR_RED,"Pouze celá čísla!");
  1634. else
  1635. SetTimer("Off",minuty*60000,false);
  1636. format(string,sizeof(string),"Za %d minut se restartuje server",minuty);
  1637. SCMTA(COLOR_RED,string);
  1638. }
  1639. }
  1640. }
  1641. return true;
  1642. }
  1643. //==============================================================================
  1644. public OnPlayerConnect(playerid)
  1645. {
  1646. SetPVarInt(playerid,"Mute",0);
  1647. new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
  1648. GetPlayerName(playerid, name, sizeof(name));
  1649. format(string, sizeof(string), "** %s Se připojil na server!", name);
  1650. SendClientMessageToAll(GREEN, string);
  1651. Web = TextDrawCreate(495.000000, 10.000000, "");
  1652. TextDrawBackgroundColor(Web, 255);
  1653. TextDrawFont(Web, 1);
  1654. TextDrawLetterSize(Web, 0.330000, 1.200000);
  1655. TextDrawColor(Web, 10040319);
  1656. TextDrawSetOutline(Web, 0);
  1657. TextDrawSetProportional(Web, 1);
  1658. TextDrawSetShadow(Web, 1);
  1659.  
  1660. SetPlayerMapIcon(playerid,38, -1740.4957,30.1580,3.5547,51,BLUE);
  1661. SetPlayerMapIcon(playerid,38, -1740.4957,30.1580,3.5547,51,BLUE);
  1662. SetPlayerMapIcon(playerid,38, -1740.4957,30.1580,3.5547,51,BLUE);
  1663. SetPlayerMapIcon(playerid,38, -1740.4957,30.1580,3.5547,51,BLUE);
  1664. SetPlayerMapIcon(playerid,38, -1740.4957,30.1580,3.5547,51,BLUE);
  1665. //=SHOP=========================================================================
  1666. SetPlayerMapIcon(playerid,38, 211.7107,1809.0106,21.8672,51,0xFFFFFFFF);
  1667. SetPlayerMapIcon(playerid,38, -137.4183,1116.5894,20.1966,51,0xFFFFFFFF);
  1668. SetPlayerMapIcon(playerid,38, -379.2944,2241.4058,42.4683,51,0xFFFFFFFF);
  1669. SetPlayerMapIcon(playerid,38, 346.9036,2463.4106,16.4766,51,0xFFFFFFFF);
  1670. SetPlayerMapIcon(playerid,38, -227.5284,2708.7883,62.9843,51,0xFFFFFFFF);
  1671. //==============================================================================
  1672. CODTU = TextDrawCreate(2.000000, 437.000000, "chp-team.4fan.cz");
  1673. TextDrawBackgroundColor(CODTU, 255);
  1674. TextDrawFont(CODTU, 2);
  1675. TextDrawLetterSize(CODTU, 0.330000, 1.000000);
  1676. TextDrawColor(CODTU, 10040319);
  1677. TextDrawSetOutline(CODTU, 0);
  1678. TextDrawSetProportional(CODTU, 1);
  1679. TextDrawSetShadow(CODTU, 1);
  1680. TextDrawShowForPlayer(playerid, Web);
  1681. TextDrawShowForPlayer(playerid, CODTU);
  1682.  
  1683. Rang[playerid][0] = CreatePlayerTextDraw(playerid,422.000000, 403.000000, " ");
  1684. PlayerTextDrawBackgroundColor(playerid,Rang[playerid][0], 0x00000033);
  1685. PlayerTextDrawFont(playerid,Rang[playerid][0], 2);
  1686. PlayerTextDrawLetterSize(playerid,Rang[playerid][0], 1.100000, 2.300001);
  1687. PlayerTextDrawColor(playerid,Rang[playerid][0], -1);
  1688. PlayerTextDrawSetOutline(playerid,Rang[playerid][0], 1);
  1689. PlayerTextDrawSetProportional(playerid,Rang[playerid][0], 1);
  1690.  
  1691. Rang[playerid][1] = CreatePlayerTextDraw(playerid,422.000000, 403.000000, "IIIIIIIIIIIIII");
  1692. PlayerTextDrawBackgroundColor(playerid,Rang[playerid][1], 0x00000000);
  1693. PlayerTextDrawFont(playerid,Rang[playerid][1], 2);
  1694. PlayerTextDrawLetterSize(playerid,Rang[playerid][1], 1.100000, 2.300001);
  1695. PlayerTextDrawColor(playerid,Rang[playerid][1], 0xFFFFFF33);
  1696. PlayerTextDrawSetOutline(playerid,Rang[playerid][1], 1);
  1697. PlayerTextDrawSetProportional(playerid,Rang[playerid][1], 1);
  1698.  
  1699. Rang[playerid][2] = CreatePlayerTextDraw(playerid,445.000000, 430.000000, " ");
  1700. PlayerTextDrawBackgroundColor(playerid,Rang[playerid][2], 255);
  1701. PlayerTextDrawFont(playerid,Rang[playerid][2], 3);
  1702. PlayerTextDrawLetterSize(playerid,Rang[playerid][2], 0.519999, 1.600000);
  1703. PlayerTextDrawColor(playerid,Rang[playerid][2], 0xFFFF00AA);
  1704. PlayerTextDrawSetOutline(playerid,Rang[playerid][2], 1);
  1705. PlayerTextDrawSetProportional(playerid,Rang[playerid][2], 1);
  1706. PlayerTextDrawSetSelectable(playerid,Rang[playerid][2], 0);
  1707.  
  1708. PlayerTextDrawShow(playerid, Rang[playerid][0]);
  1709. PlayerTextDrawShow(playerid, Rang[playerid][1]);
  1710. PlayerTextDrawShow(playerid, Rang[playerid][2]);
  1711.  
  1712. logged[playerid] = 0;
  1713. new file[50];
  1714. format(file,sizeof(file),"/hraci/%s.ini",PlayerName(playerid));
  1715. if(!dini_Exists(file)){
  1716. dini_Create(file);
  1717. ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"Registrace","Zadejte svoje heslo:","Registrovat","Zrušit");
  1718. PlayAudioStreamForPlayer(playerid ,"http://gameright.eu/cod.mp3");
  1719.     }else{
  1720.         ShowPlayerDialog(playerid,2,DIALOG_STYLE_PASSWORD,"Přihlášení","Zadejte svoje heslo:","Prihlásit","Zrušit");
  1721.         PlayAudioStreamForPlayer(playerid ,"http://gameright.eu/cod.mp3");
  1722.     }
  1723. new cesta[100];
  1724. format(cesta, sizeof(cesta), "/hraci/%s.ini", PlayerName(playerid));
  1725. SetPlayerMoney(playerid,dini_Int(cesta, "peníze"));
  1726. SetPlayerScore(playerid,dini_Int(cesta, "score"));
  1727. Alvl[playerid] = dini_Int(cesta,"admin");
  1728. return 1;
  1729. }
  1730.  
  1731. stock SetPlayerStarRang(playerid)
  1732. {
  1733.         new string[20];
  1734.         new ran = GetPlayerScore(playerid);
  1735.         format(string, sizeof (string), "%d", ran);
  1736.         if(ran>=0&&ran<=49)
  1737.         {
  1738.         PlayerTextDrawSetString(playerid,Rang[playerid][0], "I");
  1739.         PlayerTextDrawSetString(playerid,Rang[playerid][2], "Zacatecnik");
  1740.         GivePlayerWeapon(playerid, 4,1);
  1741.         GivePlayerWeapon(playerid, 16, 9999);
  1742.         GivePlayerWeapon(playerid, 22, 9999);
  1743.         GivePlayerWeapon(playerid, 25, 9999);
  1744.         }
  1745.         if(ran>=50&&ran<=99)
  1746.         {
  1747.         PlayerTextDrawSetString(playerid,Rang[playerid][0], "II");
  1748.         PlayerTextDrawSetString(playerid,Rang[playerid][2], "Strelec");
  1749.         GivePlayerWeapon(playerid, 4,1);
  1750.         GivePlayerWeapon(playerid, 16, 9999);
  1751.         GivePlayerWeapon(playerid, 23, 9999);
  1752.         GivePlayerWeapon(playerid, 26, 9999);
  1753.         }
  1754.         if(ran>=100&&ran<=449)
  1755.         {
  1756.         PlayerTextDrawSetString(playerid,Rang[playerid][0], "III");
  1757.         PlayerTextDrawSetString(playerid,Rang[playerid][2], "Bandita");
  1758.         GivePlayerWeapon(playerid, 4,1);
  1759.         GivePlayerWeapon(playerid, 16, 9999);
  1760.         GivePlayerWeapon(playerid, 24, 9999);
  1761.         GivePlayerWeapon(playerid, 26, 9999);
  1762.         GivePlayerWeapon(playerid, 29, 9999);
  1763.         }
  1764.         if(ran>=500&&ran<=999)
  1765.         {
  1766.         PlayerTextDrawSetString(playerid,Rang[playerid][0], "IIII");
  1767.         PlayerTextDrawSetString(playerid,Rang[playerid][2], "Zabijak");
  1768.         GivePlayerWeapon(playerid, 4,1);
  1769.         GivePlayerWeapon(playerid, 16, 9999);
  1770.         GivePlayerWeapon(playerid, 24, 9999);
  1771.         GivePlayerWeapon(playerid, 26, 9999);
  1772.         GivePlayerWeapon(playerid, 29, 9999);
  1773.         GivePlayerWeapon(playerid, 30, 9999);
  1774.         }
  1775.         if(ran>=1000&&ran<=1499)
  1776.         {
  1777.         PlayerTextDrawSetString(playerid,Rang[playerid][0], "IIIII");
  1778.         PlayerTextDrawSetString(playerid,Rang[playerid][2], "Gangster");
  1779.         GivePlayerWeapon(playerid, 4,1);
  1780.         GivePlayerWeapon(playerid, 16, 9999);
  1781.         GivePlayerWeapon(playerid, 24, 9999);
  1782.         GivePlayerWeapon(playerid, 26, 9999);
  1783.         GivePlayerWeapon(playerid, 29, 9999);
  1784.         GivePlayerWeapon(playerid, 31, 9999);
  1785.         }
  1786.         if(ran>=1500&&ran<=1999)
  1787.         {
  1788.         PlayerTextDrawSetString(playerid,Rang[playerid][0], "IIIIII");
  1789.         PlayerTextDrawSetString(playerid,Rang[playerid][2], "Hitman");
  1790.         GivePlayerWeapon(playerid, 4,1);
  1791.         GivePlayerWeapon(playerid, 16, 9999);
  1792.         GivePlayerWeapon(playerid, 24, 9999);
  1793.         GivePlayerWeapon(playerid, 26, 9999);
  1794.         GivePlayerWeapon(playerid, 29, 9999);
  1795.         GivePlayerWeapon(playerid, 31, 9999);
  1796.         GivePlayerWeapon(playerid, 34, 9999);
  1797.         }
  1798.         if(ran>=2000&&ran<=2999)
  1799.         {
  1800.         PlayerTextDrawSetString(playerid,Rang[playerid][0], "IIIIIII");
  1801.         PlayerTextDrawSetString(playerid,Rang[playerid][2], "ProHrac");
  1802.         GivePlayerWeapon(playerid, 4,1);
  1803.         GivePlayerWeapon(playerid, 16, 9999);
  1804.         GivePlayerWeapon(playerid, 24, 9999);
  1805.         GivePlayerWeapon(playerid, 26, 9999);
  1806.         GivePlayerWeapon(playerid, 29, 9999);
  1807.         GivePlayerWeapon(playerid, 31, 9999);
  1808.         GivePlayerWeapon(playerid, 34, 9999);
  1809.         GivePlayerMoney(playerid, 5000);
  1810.         }
  1811.         if(ran>=3000&&ran<=3999)
  1812.         {
  1813.         PlayerTextDrawSetString(playerid,Rang[playerid][0], "IIIIIIII");
  1814.         PlayerTextDrawSetString(playerid,Rang[playerid][2], "Kent");
  1815.         GivePlayerWeapon(playerid, 4,1);
  1816.         GivePlayerWeapon(playerid, 16, 9999);
  1817.         GivePlayerWeapon(playerid, 24, 9999);
  1818.         GivePlayerWeapon(playerid, 26, 9999);
  1819.         GivePlayerWeapon(playerid, 29, 9999);
  1820.         GivePlayerWeapon(playerid, 31, 9999);
  1821.         GivePlayerWeapon(playerid, 34, 9999);
  1822.         GivePlayerMoney(playerid, 10000);
  1823.         }
  1824.         if(ran>=4000&&ran<=4999)
  1825.         {
  1826.         PlayerTextDrawSetString(playerid,Rang[playerid][0], "IIIIIIIII");
  1827.         PlayerTextDrawSetString(playerid,Rang[playerid][2], "Silenec");
  1828.         GivePlayerWeapon(playerid, 4,1);
  1829.         GivePlayerWeapon(playerid, 16, 9999);
  1830.         GivePlayerWeapon(playerid, 24, 9999);
  1831.         GivePlayerWeapon(playerid, 26, 9999);
  1832.         GivePlayerWeapon(playerid, 29, 9999);
  1833.         GivePlayerWeapon(playerid, 31, 9999);
  1834.         GivePlayerWeapon(playerid, 34, 9999);
  1835.         GivePlayerMoney(playerid, 15000);
  1836.         }
  1837.         if(ran>=5000&&ran<=5999)
  1838.         {
  1839.         PlayerTextDrawSetString(playerid,Rang[playerid][0], "IIIIIIIIII");
  1840.         PlayerTextDrawSetString(playerid,Rang[playerid][2], "Baron");
  1841.         GivePlayerWeapon(playerid, 4,1);
  1842.         GivePlayerWeapon(playerid, 16, 9999);
  1843.         GivePlayerWeapon(playerid, 24, 9999);
  1844.         GivePlayerWeapon(playerid, 26, 9999);
  1845.         GivePlayerWeapon(playerid, 29, 9999);
  1846.         GivePlayerWeapon(playerid, 31, 9999);
  1847.         GivePlayerWeapon(playerid, 34, 9999);
  1848.         GivePlayerMoney(playerid, 20000);
  1849.         }
  1850.         if(ran>=6000&&ran<=6999)
  1851.         {
  1852.         PlayerTextDrawSetString(playerid,Rang[playerid][0], "IIIIIIIIIII");
  1853.         PlayerTextDrawSetString(playerid,Rang[playerid][2], "Maister");
  1854.         GivePlayerWeapon(playerid, 4,1);
  1855.         GivePlayerWeapon(playerid, 16, 9999);
  1856.         GivePlayerWeapon(playerid, 24, 9999);
  1857.         GivePlayerWeapon(playerid, 26, 9999);
  1858.         GivePlayerWeapon(playerid, 29, 9999);
  1859.         GivePlayerWeapon(playerid, 31, 9999);
  1860.         GivePlayerWeapon(playerid, 34, 9999);
  1861.         GivePlayerMoney(playerid, 25000);
  1862.         }
  1863.         if(ran>=7000&&ran<=7999)
  1864.         {
  1865.         PlayerTextDrawSetString(playerid,Rang[playerid][0], "IIIIIIIIIIII");
  1866.         PlayerTextDrawSetString(playerid,Rang[playerid][2], "Maniak");
  1867.         GivePlayerWeapon(playerid, 4,1);
  1868.         GivePlayerWeapon(playerid, 16, 9999);
  1869.         GivePlayerWeapon(playerid, 24, 9999);
  1870.         GivePlayerWeapon(playerid, 26, 9999);
  1871.         GivePlayerWeapon(playerid, 29, 9999);
  1872.         GivePlayerWeapon(playerid, 31, 9999);
  1873.         GivePlayerWeapon(playerid, 34, 9999);
  1874.         GivePlayerMoney(playerid, 30000);
  1875.         }
  1876.         if(ran>=8000&&ran<=9998)
  1877.         {
  1878.         PlayerTextDrawSetString(playerid,Rang[playerid][0], "IIIIIIIIIIIII");
  1879.         PlayerTextDrawSetString(playerid,Rang[playerid][2], "ProZabijak");
  1880.         GivePlayerWeapon(playerid, 4,1);
  1881.         GivePlayerWeapon(playerid, 16, 9999);
  1882.         GivePlayerWeapon(playerid, 24, 9999);
  1883.         GivePlayerWeapon(playerid, 26, 9999);
  1884.         GivePlayerWeapon(playerid, 29, 9999);
  1885.         GivePlayerWeapon(playerid, 31, 9999);
  1886.         GivePlayerWeapon(playerid, 34, 9999);
  1887.         GivePlayerMoney(playerid, 35000);
  1888.         }
  1889.         if(ran>= 9999)
  1890.         {
  1891.         PlayerTextDrawSetString(playerid,Rang[playerid][0], "IIIIIIIIIIIIII");
  1892.         PlayerTextDrawSetString(playerid,Rang[playerid][2], "Terminator");
  1893.         GivePlayerWeapon(playerid, 4,1);
  1894.         GivePlayerWeapon(playerid, 16, 9999);
  1895.         GivePlayerWeapon(playerid, 24, 9999);
  1896.         GivePlayerWeapon(playerid, 26, 9999);
  1897.         GivePlayerWeapon(playerid, 29, 9999);
  1898.         GivePlayerWeapon(playerid, 31, 9999);
  1899.         GivePlayerWeapon(playerid, 34, 9999);
  1900.         GivePlayerWeapon(playerid, 35, 9999);
  1901.         GivePlayerMoney(playerid, 40000);
  1902.         }
  1903. }
  1904.  
  1905. public muted(playerid)
  1906. {
  1907.     if(GetPVarInt(playerid,"Muted") ==1)
  1908.     {
  1909.         SetPVarInt(playerid,"Muted",0);
  1910.         GameTextForPlayer(playerid,"~>~ Nyni muzes zase psat! ~<~",1000,2);
  1911.     }
  1912.     return true;
  1913. }
  1914. public Restart()
  1915. {
  1916.     SendRconCommand("gmx");
  1917.     return true;
  1918. }
  1919.  
  1920. public Off()
  1921. {
  1922.     SendRconCommand("exit");
  1923.     return true;
  1924. }
  1925.  
  1926. public odmrazit(playerid)
  1927. {
  1928.     if(GetPVarInt(playerid,"zmrazeny")==1)
  1929.     {
  1930.         SetPVarInt(playerid,"zmrazeny",0);
  1931.         TogglePlayerControllable(playerid,1);
  1932.         GameTextForPlayer(playerid,"~>~ Odmrazen! ~<~",1000,2);
  1933.     }
  1934.     else return false;
  1935.  
  1936.     return true;
  1937. }
  1938.  
  1939. public acheat(playerid)
  1940. {
  1941.     new Float:health;
  1942.     GetPlayerHealth(playerid,health);
  1943.  
  1944.     if(ZakazanaZbran(playerid))
  1945.     {
  1946.         new string[128];
  1947.         format(string,sizeof(string),"[{FF0000}ANTICHEAT{FFFFFF}] Hráč %s byl vykopnut za zakázanou zbraň",PlayerName(playerid));
  1948.         SCMTA(COLOR_WHITE,string);
  1949.         Kick(playerid);
  1950.     }
  1951.     else if(!ZakazanaZbran(playerid))
  1952.     {
  1953.         new string1[128];
  1954.         format(string1,sizeof(string1),"[{FF0000}ANTICHEAT{FFFFFF}][%s] Zakázaná Zbraň negativní",PlayerName(playerid));
  1955.         SCMTA(COLOR_WHITE,string1);
  1956.     }
  1957.     else if(health > 50.0)
  1958.     {
  1959.         new string2[128];
  1960.         format(string2,sizeof(string2),"[{FF0000}ANTICHEAT{FFFFFF}] Hráč %s byl vykopnut za GodMode",PlayerName(playerid));
  1961.         SCMTA(COLOR_WHITE,string2);
  1962.         Kick(playerid);
  1963.     }
  1964.     else if(health < 50.0)
  1965.     {
  1966.         new string1[128];
  1967.         format(string1,sizeof(string1),"[{FF0000}ANTICHEAT{FFFFFF}][%s] GodMode negativní",PlayerName(playerid));
  1968.         SCMTA(COLOR_WHITE,string1);
  1969.     }
  1970.     return true;
  1971. }
  1972.  
  1973. public Reklama() {
  1974. switch(random(10)) {
  1975.  
  1976. case 0: {
  1977. SendClientMessageToAll(ORANGE, "TXT 1");
  1978. }
  1979.  
  1980. case 1: {
  1981. SendClientMessageToAll(ORANGE, "TXT 2");
  1982. }
  1983.  
  1984. case 2: {
  1985. SendClientMessageToAll(ORANGE, "TXT 3");
  1986. }
  1987.  
  1988. case 3: {
  1989. SendClientMessageToAll(ORANGE, "TXT 4");
  1990. }
  1991.  
  1992. case 4: {
  1993. SendClientMessageToAll(ORANGE, "TXT 5");
  1994. }
  1995.  
  1996. case 5: {
  1997. SendClientMessageToAll(ORANGE, "TXT 6");
  1998. }
  1999.  
  2000. case 6: {
  2001. SendClientMessageToAll(ORANGE, "TXT 7");
  2002. }
  2003.  
  2004. case 7: {
  2005. SendClientMessageToAll(ORANGE, "TXT 8");
  2006. }
  2007.  
  2008. case 8: {
  2009. SendClientMessageToAll(ORANGE, "TXT 9");
  2010. }
  2011.  
  2012. case 9: {
  2013. SendClientMessageToAll(ORANGE, "TXT 10");
  2014. }
  2015. }
  2016. return 1;
  2017. }
  2018.  
  2019. public OnGameModeExit()
  2020. {
  2021.    TextDrawHideForAll(Textdraw0);
  2022.    TextDrawDestroy(Textdraw0);
  2023.    TextDrawHideForAll(Textdraw1);
  2024.    TextDrawDestroy(Textdraw1);
  2025.    TextDrawHideForAll(Textdraw2);
  2026.    TextDrawDestroy(Textdraw2);
  2027.    TextDrawHideForAll(Textdraw3);
  2028.    TextDrawDestroy(Textdraw3);
  2029.    TextDrawHideForAll(Textdraw4);
  2030.    TextDrawDestroy(Textdraw4);
  2031.    TextDrawHideForAll(Textdraw5);
  2032.    TextDrawDestroy(Textdraw5);
  2033.    TextDrawHideForAll(Textdraw6);
  2034.    TextDrawDestroy(Textdraw6);
  2035.    return 1;
  2036. }
  2037.  
  2038. public hostname(playerid)
  2039. {
  2040.     #if Style == 1
  2041.  
  2042.         new Msg[128], var = random(4);
  2043.         switch (var)
  2044.         {
  2045.           case 0:
  2046.           {
  2047.             format(Msg, 200, "hostname www.web.sk");
  2048.             SendRconCommand(Msg);
  2049.           }
  2050.           case 1:
  2051.           {
  2052.             format(Msg, 200, "hostname Call of Duty");
  2053.             SendRconCommand(Msg);
  2054.           }
  2055.           case 2:
  2056.           {
  2057.             format(Msg, 200, "hostname www.web.sk");
  2058.             SendRconCommand(Msg);
  2059.           }
  2060.           case 3:
  2061.           {
  2062.             format(Msg, 200, "hostname Call of Duty");
  2063.             SendRconCommand(Msg);
  2064.           }
  2065.         }
  2066.     #endif
  2067.     #if Style == 2
  2068.  
  2069.         new Msg[128], var = random(4);
  2070.         switch (var)
  2071.         {
  2072.           case 0:
  2073.           {
  2074.             format(Msg, 200, "hostname www.web.sk");
  2075.             SendRconCommand(Msg);
  2076.           }
  2077.           case 1:
  2078.           {
  2079.             format(Msg, 200, "hostname Call of Duty");
  2080.             SendRconCommand(Msg);
  2081.           }
  2082.           case 2:
  2083.           {
  2084.             format(Msg, 200, "hostname www.web.sk");
  2085.             SendRconCommand(Msg);
  2086.           }
  2087.           case 3:
  2088.           {
  2089.             format(Msg, 200, "hostname Call of Duty");
  2090.             SendRconCommand(Msg);
  2091.           }
  2092.         }
  2093.     #endif
  2094.     #if Style == 3
  2095.         new Msg[128], var = random(4);
  2096.         switch (var)
  2097.         {
  2098.           case 0:
  2099.           {
  2100.             format(Msg, 200, "hostname www.web.sk");
  2101.             SendRconCommand(Msg);
  2102.           }
  2103.           case 1:
  2104.           {
  2105.             format(Msg, 200, "hostname Call of Duty");
  2106.             SendRconCommand(Msg);
  2107.           }
  2108.           case 2:
  2109.           {
  2110.             format(Msg, 200, "hostname www.web.sk");
  2111.             SendRconCommand(Msg);
  2112.           }
  2113.           case 3:
  2114.           {
  2115.             format(Msg, 200, "hostname Call of Duty");
  2116.             SendRconCommand(Msg);
  2117.           }
  2118.         }
  2119.     #endif
  2120. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement