Advertisement
DominikMarvLisy

Call of Duty 1.0

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