Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <izcmd>
- #include <sscanf>
- #include <dof2>
- #include <streamer>
- //--------------------------------------------------------------------------------a
- //----------------------------------------------------
- #define pc "{FF0000}"
- #define sc "{FFFFFF}"
- #define white "{FFFFFF}"
- #define b "{00FFFF}"
- //----------------------------------
- #define SERVER ""sc"Fanda{00FFFF}Gaming"
- //---------------------------
- new HRACIEVENT[MAX_PLAYERS];
- new NOVYHRAC[MAX_PLAYERS];
- //-----------------------------
- new VyhraEventu[MAX_PLAYERS];
- //--------------------------
- new MinTimer;
- new Vyhra;
- //--------------------------
- //--------------------------
- new Ukazka1;
- new BlockEPrikazy;
- //----------------
- //------------------------------------------------------------------------------
- //----------------------------------------------------------------------------------
- new Text:HRACINAEVENTU;
- //------------------------------------------------------------------------------
- //-------------------------------------------------------------------------------------
- new Text:PANEL;
- new Text:ponline;
- new Text:phonline;
- new Text:aonline;
- new Text:TDDGEU;
- new Text:TDDG;
- //----------------------( /sumo )---------------------------------------------------
- //-------------------------------------------------------------------------------------
- new TextCas;
- #pragma tabsize 0
- #define PRESSED(%0) \
- (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
- #define WHITE "{FFFFFF}"
- #define RED "{F81414}"
- #define BLUE "{0066ff}"
- #define GREEN "{00FF22}"
- #define ORANGE "{FFA100}"
- #define YELLOW "{FFFF00}"
- #define VehicleHealthYellow 700
- #define VehicleHealthRed 400
- #define SpeedCheck(%0,%1,%2,%3,%4) floatround(floatsqroot(%4?(%0*%0+%1*%1+%2*%2):(%0*%0+%1*%1)) *%3*1.6)
- #define MAX_SPEED_VEHICLE 380.0
- //
- #define PreloadAnimLib(%1,%2) ApplyAnimation(%1,%2,"null",0.0,0,0,0,0,0)
- //---------------------------------------
- #define DIALOG_EVENTSYSTEM 10010
- #define DIALOG_ES_Tuning 10011
- #define DIALOG_TuningSraz 10012
- #define DIALOG_ES_Kopec 10013
- #define DIALOG_KopecSmrti 10014
- #define DIALOG_ES_Fallout 10015
- #define DIALOG_Fallout 10016
- //---------------------------------
- #define DIALOG_ES_Derby 10017
- #define DIALOG_Derby 10018
- //----------------------------------------------
- #define DIALOG_DOMY 10019
- #define DIALOG_ES_DM 10020
- #define DIALOG_DM 10021
- //---------------------------------------------
- #define sb "{0055FF}"
- #define r "{FF0000}"
- #define g "{00FF00}"
- #define w "{FFFFFF}"
- #define dc "{a9c4e4}"
- #define sblue 0x0055FFFF
- #define red 0xFF0000FF
- #define orange 0xFF9200FF
- #define blue 0x0000FFFF
- #define yellow 0xFFFF00FF
- #define grey 0xAFAFAFAA
- #define cyan 0x00FFFFFF
- #define green 0x00FF00FF
- #define primary 0x0055FFFF
- #define secondary 0x0055FFFF
- #define HOLDING(%0) \
- ((newkeys & (%0)) == (%0))
- #define RELEASED(%0) \
- (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
- #define OFF 0
- #define ON 1
- #define VEHICLE_CONTROL_DIALOG 5050
- //--------------------------
- //----------------------------------------------
- //---------------------------------------------
- //-----------------------(Forwardy)---------------------------------------------
- forward count3();
- forward count2();
- forward count1();
- forward go();
- forward stop();
- //---------------------------------------------
- //--------------------------------------------
- //--------------------------------------------
- new PlayerText:Textdraw1;
- new PlayerText:Textdraw0;
- //
- new NapadCas[MAX_PLAYERS];
- //---------------------(Pozice)-------------------------------------------------
- new Float:EventX, Float:EventY, Float:EventZ;
- new Float:EventhX, Float:EventhY, Float:EventhZ;
- //--------------------(Newky)---------------------------------------------------
- new Event[MAX_PLAYERS];
- new InEvent[MAX_PLAYERS];
- new InFallout[MAX_PLAYERS];
- new InMise[MAX_PLAYERS];
- new Fallout;
- new FallOutObject[189];
- new Blub;
- new TuningSraz;
- new KopecSmrti;
- new FalloutTimer;
- new FalloutDestroyTimer;
- new FalloutTimeZ;
- new NextFalloutObject;
- new DMevent;
- //-------------------------
- new EventCar[4];
- ///---------------------------
- new DerbyCar;
- new PositionsDerby;
- //-----------------------------
- //-------------------------------
- new DerbyEvent;
- //------------------------------------------------------------------------------
- new Float:DerbyPos[21][4] = {
- {2409.2739,1090.6841,34.6094,45.1404}, // Derby 1
- {2407.8152,1113.0713,34.6124,88.7710}, // Derby 2
- {2408.5308,1127.5262,34.6091,86.4089}, // Derby 3
- {2408.3518,1144.3724,34.6094,87.5843}, // Derby 4
- {2407.8071,1157.8787,34.6036,89.5382}, // Derby 5
- {2409.1240,1175.6919,34.6065,130.5996}, // Derby 6
- {2395.3538,1175.1157,34.6026,179.1571}, // Derby 7
- {2384.4180,1174.5085,34.6058,179.3808}, // Derby 8
- {2374.7007,1175.3818,34.6103,180.8196}, // Derby 9
- {2364.8960,1174.9968,34.6023,219.5097}, // Derby 10
- {2366.9495,1162.9010,34.6069,266.6921}, // Derby 11
- {2365.7070,1152.1332,34.6027,262.7064}, // Derby 12
- {2365.0332,1143.2092,34.5990,268.8438}, // Derby 13
- {2366.0876,1131.5221,34.6087,269.6816}, // Derby 14
- {2364.9912,1115.3711,34.6040,272.6109}, // Derby 15
- {2365.7810,1102.7360,34.6087,269.9267}, // Derby 16
- {2366.8320,1090.0773,34.5995,311.4571}, // Derby 17
- {2377.9004,1091.2300,34.6076,356.2735}, // Derby 18
- {2385.5288,1092.7231,34.6068,359.6015}, // Derby 19
- {2393.0039,1091.1843,34.6054,358.3766}, // Derby 20
- {2399.5591,1090.7394,34.6037,3.7744} // Derby 21
- };
- //------------------------------------------------------------------------------
- new bool:EventPort_Tuning[MAX_PLAYERS];
- new bool:EventTuningPripojen[MAX_PLAYERS];
- //
- new bool:EventPort_Kopec[MAX_PLAYERS];
- new bool:EventKopecPripojen[MAX_PLAYERS];
- //
- new bool:EventPort_Fallout[MAX_PLAYERS];
- new bool:EventFalloutPripojen[MAX_PLAYERS];
- //----------
- new bool:EventPort_Derby[MAX_PLAYERS];
- new bool:EventDerbyPripojen[MAX_PLAYERS];
- //
- new bool:EventPort_DM[MAX_PLAYERS];
- new bool:EventDMPripojen[MAX_PLAYERS];
- //------------------------------------------------------------------------------
- stock Events(playerid)
- {
- if(TuningSraz == 0 && KopecSmrti == 0 && Fallout == 1) return SendClientMessage(playerid,0xFF0000FF,"[ ! ] {FFFFFF}Žádný Event nebyl spustěn!");
- return 1;
- }
- //-------------------------------------------------------------------------------
- //============================================================================//
- //============================================================================//
- //============================================================================//
- new dfile[50];
- WasteDeAMXersTime()
- {
- new bb;
- #emit load.pri bb
- #emit stor.pri bb
- }
- //============================================================================//
- ///////////////////////////
- new Text:Textdraw7,Text:Textdraw8,Text:Textdraw9,Text:Textdraw10,Text:Textdraw11,Text:Textdraw12,Text:Textdraw13;
- new glob10598[10];
- new glob105C0[15];
- new glob10624[6];
- new glob10C70[MAX_PLAYERS];
- new Float:tX;
- new Float:tY;
- new Float:tZ;
- // info
- new Float:glob508[10];
- new Float:glob530[10];
- new Float:glob558[10];
- new nastaveno[MAX_PLAYERS];
- new Dni[MAX_PLAYERS];
- new Hodin[MAX_PLAYERS];
- new Minut[MAX_PLAYERS];
- new glob12218[MAX_PLAYERS];
- new Banka[MAX_PLAYERS];
- new glob13F7C[MAX_PLAYERS];
- new glob11F00[MAX_PLAYERS];
- new glob12B60[MAX_PLAYERS];
- new Penize[MAX_PLAYERS];
- new glob1520C[MAX_PLAYERS];
- new glob13190[MAX_PLAYERS];
- new glob14108[MAX_PLAYERS];
- new glob129D4[MAX_PLAYERS];
- new glob15FF8[MAX_PLAYERS];
- new glob11BE8[MAX_PLAYERS];
- new glob11D74[MAX_PLAYERS];
- new glob123A4[MAX_PLAYERS];
- new glob12CEC[MAX_PLAYERS];
- new glob12E78[MAX_PLAYERS];
- new glob15398[MAX_PLAYERS];
- new glob15524[MAX_PLAYERS];
- new Firma[MAX_PLAYERS];
- new glob16310[MAX_PLAYERS];
- new glob13004[MAX_PLAYERS];
- new glob137C0[MAX_PLAYERS];
- new glob15080[MAX_PLAYERS];
- new glob15CE0[MAX_PLAYERS];
- new glob12530[MAX_PLAYERS];
- new glob126BC[MAX_PLAYERS];
- new glob1208C[MAX_PLAYERS];
- new glob12848[MAX_PLAYERS];
- new Float:glob11744[MAX_PLAYERS];
- new Float:glob115B8[MAX_PLAYERS];
- new Float:glob107CC[MAX_PLAYERS];
- new Float:glob10958[MAX_PLAYERS];
- new Float:glob10AE4[MAX_PLAYERS];
- new glob11114[MAX_PLAYERS];
- new glob13634[MAX_PLAYERS];
- new glob14294[MAX_PLAYERS];
- new Float:Zdravi;
- new LoterieCislo[MAX_PLAYERS];
- new TimeInfoBox[MAX_PLAYERS];
- new Text:InfoBox[MAX_PLAYERS];
- new Timrik[20];
- new glob10DFC[MAX_PLAYERS];
- new Menu:globFF7C[50];
- new glob145AC[MAX_PLAYERS];
- new glob55BC[MAX_VEHICLES];//
- new Float:TPos[MAX_PLAYERS][3];
- new RampCount = -1;
- new Nabumbany[MAX_PLAYERS];
- new glob14A50[MAX_PLAYERS];
- new glob60DC[19];
- new glob16628[MAX_PLAYERS];
- new glob1331C[MAX_PLAYERS];//mise
- new SetDrag[7];
- new HracDrag[25];
- new TestDrag[25];
- new Float:BombPos[3];
- new glob10F88[MAX_PLAYERS];
- new glob134A8[MAX_PLAYERS];
- new glob6144;
- new glob1142C[MAX_PLAYERS];
- new Unesen[MAX_PLAYERS];
- new glob10074[150];
- new glob1004C[10];
- new glob102CC[150];
- new atentatik = 0;
- new Float:Spe_X[MAX_PLAYERS], Float:Spe_Y[MAX_PLAYERS], Float:Spe_Z[MAX_PLAYERS], Float:Spe_A[MAX_PLAYERS],SpeInt[MAX_PLAYERS];
- new glob1394C[MAX_PLAYERS];
- new glob159C8[MAX_PLAYERS];
- new glob112A0[MAX_PLAYERS];
- new Taxa[MAX_PLAYERS];
- //Dům
- new glob10034 ;
- new glob148C4[MAX_PLAYERS];
- new WarpLimit[MAX_PLAYERS];
- new Text:TextDrawChat[6];
- new text_chat6[150];
- new text_chat5[150];
- new text_chat4[150];
- new text_chat3[150];
- new text_chat2[150];
- new text_chat1[150];
- main ( ) { }
- public OnGameModeInit()
- {
- //---------------------------
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- Event[i] = 0;
- InEvent[i] = 0;
- EventFalloutPripojen[i] = false;
- EventTuningPripojen[i] = false;
- EventKopecPripojen[i] = false;
- EventPort_Tuning[i] = false;
- EventPort_Kopec[i] = false;
- EventPort_Fallout[i] = false;
- EventPort_Derby[i] = false;
- EventDerbyPripojen[i] = false;
- EventDMPripojen[i] = false;
- EventPort_DM[i] = false;
- }
- //-------------------------
- //-----------------------
- PANEL = TextDrawCreate(-2.000000, 437.000000, ".");
- TextDrawBackgroundColor(PANEL, 255);
- TextDrawFont(PANEL, 1);
- TextDrawLetterSize(PANEL, 0.500000, 0.900000);
- TextDrawColor(PANEL, -1);
- TextDrawSetOutline(PANEL, 0);
- TextDrawSetProportional(PANEL, 1);
- TextDrawSetShadow(PANEL, 1);
- TextDrawUseBox(PANEL, 1);
- TextDrawBoxColor(PANEL, 255);
- TextDrawTextSize(PANEL, 640.000000, 123.000000);
- TextDrawSetSelectable(PANEL, 0);
- //----------------------------------------
- //----------------------------------
- ponline = TextDrawCreate(120.000000, 438.000000, "ON-LINE ~w~HRACI: 0");
- TextDrawBackgroundColor(ponline, 0);
- TextDrawFont(ponline, 2);
- TextDrawLetterSize(ponline, 0.220000, 0.899999);
- TextDrawColor(ponline, 16711935);
- TextDrawSetOutline(ponline, 0);
- TextDrawSetProportional(ponline, 1);
- TextDrawSetShadow(ponline, 1);
- phonline = TextDrawCreate(251.000000, 438.000000, "ON-LINE ~y~PREMIUM HRACI: ~w~0");
- TextDrawBackgroundColor(phonline, 0);
- TextDrawFont(phonline, 2);
- TextDrawLetterSize(phonline, 0.190000, 0.899999);
- TextDrawColor(phonline, 16711935);
- TextDrawSetOutline(phonline, 0);
- TextDrawSetProportional(phonline, 1);
- TextDrawSetShadow(phonline, 1);
- aonline = TextDrawCreate(411.000000, 438.000000, "ON-LINE ~r~ADMINISTRATORI: ~w~0");
- TextDrawBackgroundColor(aonline, 0);
- TextDrawFont(aonline, 2);
- TextDrawLetterSize(aonline, 0.190000, 0.899999);
- TextDrawColor(aonline, 16711935);
- TextDrawSetOutline(aonline, 0);
- TextDrawSetProportional(aonline, 1);
- TextDrawSetShadow(aonline, 1);
- TDDG = TextDrawCreate(0.000000, 439.000000, "~w~Fanda~b~Gaming");
- TextDrawBackgroundColor(TDDG, 255);
- TextDrawFont(TDDG, 0);
- TextDrawLetterSize(TDDG, 0.490000, 0.899999);
- TextDrawColor(TDDG, -1);
- TextDrawSetOutline(TDDG, 1);
- TextDrawSetProportional(TDDG, 1);
- TextDrawSetShadow(TDDG, 1);
- TDDGEU = TextDrawCreate(530.000000, 439.000000, "~w~Fanda~b~Gaming");
- TextDrawBackgroundColor(TDDGEU, 255);
- TextDrawFont(TDDGEU, 0);
- TextDrawLetterSize(TDDGEU, 0.490000, 0.899999);
- TextDrawColor(TDDGEU, -1);
- TextDrawSetOutline(TDDGEU, 1);
- TextDrawSetProportional(TDDGEU, 1);
- TextDrawSetShadow(TDDGEU, 1);
- //-----------------------------------------
- //-------------------------------------------
- //----------------------------------
- HRACINAEVENTU = TextDrawCreate(550, 240, "~g~Hraci Event: ~y~0");
- TextDrawBackgroundColor(HRACINAEVENTU, 255);
- TextDrawFont(HRACINAEVENTU, 1);
- TextDrawLetterSize(HRACINAEVENTU, 0.299999,1.190100);
- TextDrawColor(HRACINAEVENTU, -1);
- TextDrawSetOutline(HRACINAEVENTU, 0);
- TextDrawSetProportional(HRACINAEVENTU, 1);
- TextDrawSetShadow(HRACINAEVENTU, 1);
- TextDrawSetSelectable(HRACINAEVENTU, 0);
- //----------------------------------
- Textdraw7 = TextDrawCreate(34.000000, 210.000000, "~g~NOVY EVENT");
- TextDrawBackgroundColor(Textdraw7, 255);
- TextDrawFont(Textdraw7, 2);
- TextDrawLetterSize(Textdraw7, 0.460000, 2.899999);
- TextDrawColor(Textdraw7, -16776961);
- TextDrawSetOutline(Textdraw7, 0);
- TextDrawSetProportional(Textdraw7, 1);
- TextDrawSetShadow(Textdraw7, 1);
- TextDrawSetSelectable(Textdraw7, 0);
- Textdraw8 = TextDrawCreate(178.000000, 253.000000, "");
- TextDrawBackgroundColor(Textdraw8, 255);
- TextDrawFont(Textdraw8, 1);
- TextDrawLetterSize(Textdraw8, 0.420000, 1.799999);
- TextDrawColor(Textdraw8, -1);
- TextDrawSetOutline(Textdraw8, 0);
- TextDrawSetProportional(Textdraw8, 1);
- TextDrawSetShadow(Textdraw8, 1);
- TextDrawUseBox(Textdraw8, 1);
- TextDrawBoxColor(Textdraw8, 80);
- TextDrawTextSize(Textdraw8, 0.000000, 0.000000);
- TextDrawSetSelectable(Textdraw8, 0);
- Textdraw9 = TextDrawCreate(34.000000, 248.000000, "- ~g~Misto: ~h~~y~/port");
- TextDrawBackgroundColor(Textdraw9, 255);
- TextDrawFont(Textdraw9, 1);
- TextDrawLetterSize(Textdraw9, 0.360000, 1.200000);
- TextDrawColor(Textdraw9, 65535);
- TextDrawSetOutline(Textdraw9, 0);
- TextDrawSetProportional(Textdraw9, 1);
- TextDrawSetShadow(Textdraw9, 1);
- TextDrawSetSelectable(Textdraw9, 0);
- Textdraw10 = TextDrawCreate(34.000000, 236.000000, "");
- TextDrawBackgroundColor(Textdraw10, 255);
- TextDrawFont(Textdraw10, 1);
- TextDrawLetterSize(Textdraw10, 0.360000, 1.200000);
- TextDrawColor(Textdraw10, -1);
- TextDrawSetOutline(Textdraw10, 0);
- TextDrawSetProportional(Textdraw10, 1);
- TextDrawSetShadow(Textdraw10, 1);
- TextDrawUseBox(Textdraw10, 1);
- TextDrawBoxColor(Textdraw10, 80);
- TextDrawTextSize(Textdraw10, 0.000000, 0.000000);
- TextDrawSetSelectable(Textdraw10, 0);
- Textdraw11 = TextDrawCreate(34.000000, 236.000000, "- ~g~Nazev: ~h~~y~Uno Evento");
- TextDrawBackgroundColor(Textdraw11, 255);
- TextDrawFont(Textdraw11, 1);
- TextDrawLetterSize(Textdraw11, 0.360000, 1.200000);
- TextDrawColor(Textdraw11, 65535);
- TextDrawSetOutline(Textdraw11, 0);
- TextDrawSetProportional(Textdraw11, 1);
- TextDrawSetShadow(Textdraw11, 1);
- TextDrawSetSelectable(Textdraw11, 0);
- Textdraw12 = TextDrawCreate(34.000000, 260.000000, "- ~g~Vyhra: ~h~~y~1.000.000 ~g~$");
- TextDrawBackgroundColor(Textdraw12, 255);
- TextDrawFont(Textdraw12, 1);
- TextDrawLetterSize(Textdraw12, 0.360000, 1.200000);
- TextDrawColor(Textdraw12, 65535);
- TextDrawSetOutline(Textdraw12, 0);
- TextDrawSetProportional(Textdraw12, 1);
- TextDrawSetShadow(Textdraw12, 1);
- TextDrawSetSelectable(Textdraw12, 0);
- Textdraw13 = TextDrawCreate(34.000000, 272.000000, "- ~g~Vytvoril: ~h~~y~SERVER");
- TextDrawBackgroundColor(Textdraw13, 255);
- TextDrawFont(Textdraw13, 1);
- TextDrawLetterSize(Textdraw13, 0.360000, 1.200000);
- TextDrawColor(Textdraw13, 65535);
- TextDrawSetOutline(Textdraw13, 0);
- TextDrawSetProportional(Textdraw13, 1);
- TextDrawSetShadow(Textdraw13, 1);
- TextDrawSetSelectable(Textdraw13, 0);
- //Cenzura....
- //------------------------------------------------------------------------------------
- CreateDynamicObject(1771, 243.6529, 1798.177, 7.0229, 0.0, 0.0, -180.0, 0);
- CreateDynamicObject(1771, 253.593, 1798.1719, 7.0479, 0.0, 0.0, -180.0, 0);
- CreateDynamicObject(1771, 249.9239, 1798.1719, 7.0479, 0.0, 0.0, -180.0, 0);
- CreateDynamicObject(971, 242.8009, 1798.1989, 9.909, 0.0, 0.0, -270.0, 0);
- CreateDynamicObject(971, 246.9839, 1798.2209, 9.8339, 0.0, 0.0, -270.0, 0);
- CreateDynamicObject(971, 250.643, 1798.165, 9.909, 0.0, 0.0, -270.0, 0);
- CreateDynamicObject(971, 254.292, 1801.6469, 9.866, 0.0, 0.0, -270.0, 0);
- CreateDynamicObject(9241, 337.3179, 1976.828, 18.3999, 0.0, 0.0, 0.0, 0);
- CreateDynamicObject(9241, 337.26, 1944.743, 18.3999, 0.0, 0.0, 0.0, 0);
- CreateDynamicObject(5822, 2270.6589, 2400.696, 13.345, 0.0, 0.0, -83.047, 0);
- //===============================[DUEL]====================================================//
- CreateObject(8674,2491.683349,2351.941406,71.271911,0.000000,0.000000,0.000000,500.0); //Plot
- CreateObject(8674,2496.763671,2357.155761,71.288635,0.000000,0.000000,-90.299980,500.0);//Plot
- CreateObject(8674,2496.893310,2396.847412,71.279418,0.000000,0.000000,89.099967,500.0);//Plot
- CreateObject(8674,2491.766845,2401.936767,71.215904,0.000000,0.000000,0.000000,500.0);//Plot
- CreateObject(8674,2450.553222,2402.003662,71.284500,0.000000,0.000000,0.000000,500.0);//Plot
- CreateObject(8674,2445.359130,2396.900146,71.257560,0.000000,0.000000,89.899986,500.0);//Plot
- CreateObject(8674,2445.574462,2356.705322,71.366485,0.000000,0.000000,-90.799972,500.0);//Plot
- CreateObject(8674,2450.771484,2351.544189,71.319984,0.000000,0.000000,0.000000,500.0);//Plot
- CreateObject(8674,2481.362304,2351.959716,71.228462,0.000000,0.000000,0.000000,500.0);//Plot
- CreateObject(8674,2471.045898,2351.943359,71.177024,0.000000,0.000000,0.000000,500.0);//Plot
- CreateObject(8674,2460.942626,2351.723388,71.170806,1.099997,0.499998,1.399999,500.0);//Plot
- CreateObject(8674,2460.910156,2402.043212,71.265846,0.000000,0.000000,0.000000,500.0);//Plot
- CreateObject(8674,2471.230712,2402.072021,71.203666,0.000000,0.000000,0.000000,500.0);//Plot
- CreateObject(8674,2481.627441,2402.001708,71.167694,-0.100000,-0.500001,-0.699997,500.0);//Plot
- CreateObject(8674,2445.382812,2386.655273,71.234947,0.000000,0.000000,90.799987,500.0);//Plot
- CreateObject(8674,2445.676757,2367.079589,71.342918,0.000000,0.000000,89.699989,500.0);//Plot
- CreateObject(8674,2496.892089,2386.549804,71.280570,0.000000,0.000000,-89.200004,500.0);//Plot
- CreateObject(8674,2496.823486,2367.445800,71.288543,0.000000,0.000000,89.699928,500.0);//Plot
- CreateObject(2600,2462.760253,2340.957275,82.498680,0.000000,0.000000,156.199981,500.0);//Divák Kukátko:D
- CreateObject(1369,2464.230957,2340.093750,82.386367,0.000000,0.000000,-135.099990,500.0);//Vozík
- CreateObject(8644,2462.893066,2331.967285,85.750946,0.000000,0.000000,117.000007,500.0);//Šavle
- //CreateObject(1662, -1029.9891, 464.1679, 15.8079, 0.0, 0.0, -121.0941, 0);
- // CreateObject(16362, -1660.6441, -167.9901, 16.2689, 0.0, 0.0, 45.0, 0);
- // CreateObject(11391, -1679.0051, -196.368, 14.4379, 0.0, 0.0, 45.0, 0);
- // CreateObject(16362, 1477.4699, 1766.302, 12.9329, 0.0, 0.0, -90.0, 0);
- // CreateObject(11391, 1469.613, 1799.2419, 11.102, 0.0, 0.0, -90.0, 0);
- // CreateObject(16362, 1434.6629, -2493.9122, 15.675, 0.0, 0.0, 0.0, 0);
- // CreateObject(11391, 1401.112, -2500.962, 13.8439, 0.0, 0.0, 0.0, 0);
- CreateDynamicObject(17300, 1849.01, 1907.4069, 154.798, -4.297, 0.0, -90.0, 0);
- CreateDynamicObject(17300, 1608.8199, 1889.0989, 207.8699, -10.313, 0.0, -90.0, 0);
- CreateDynamicObject(17300, 1376.0279, 1870.765, 289.571, -18.0481, 0.0, -90.0, 0);
- CreateDynamicObject(17300, 1155.613, 1852.29, 402.2409, -25.7831, 0.0, -90.0, 0);
- CreateDynamicObject(17300, 952.051, 1833.9279, 541.5629, -32.6591, 0.0, -90.0, 0);
- CreateDynamicObject(17300, 765.963, 1815.4439, 704.739, -39.5341, 0.0, -90.0, 0);
- CreateDynamicObject(17300, 608.572, 1797.1529, 894.049, -50.7071, 0.0, -90.0, 0);
- CreateDynamicObject(17300, 479.307, 1778.613, 1104.4229, -55.863, 0.0, -90.0, 0);
- CreateDynamicObject(17300, 372.2399, 1760.333, 1324.5729, -61.8791, 0.0, -90.0, 0);
- CreateDynamicObject(17300, 290.785, 1742.1779, 1554.0129, -68.755, 0.0, -90.0, 0);
- CreateDynamicObject(17300, 239.0449, 1723.9549, 1792.5429, -76.49, 0.0, -90.0, 0);
- CreateDynamicObject(17300, 215.908, 1705.3819, 2039.9289, -82.506, 0.0, -90.0, 0);
- CreateDynamicObject(17300, 222.468, 1686.9759, 2285.7709, -90.241, 0.0, -90.0, 0);
- CreateDynamicObject(17300, 263.656, 1668.681, 2527.3569, -98.835, 0.0, -90.0, 0);
- CreateDynamicObject(17300, 335.803, 1650.509, 2763.5319, -104.851, 0.0, -90.0, 0);
- CreateDynamicObject(17300, 440.746, 1631.9139, 2987.112, -115.1641, 0.0, -90.0, 0);
- CreateDynamicObject(17300, 582.947, 1613.5889, 3186.8989, -125.478, 0.0, -90.0, 0);
- CreateDynamicObject(17300, 747.9439, 1595.915, 3357.3229, -132.353, 0.0, -90.0, 0);
- CreateDynamicObject(17300, 928.726, 1578.6009, 3504.091, -139.2291, 0.0, -90.0, 0);
- CreateDynamicObject(17300, 1133.9899, 1560.4909, 3633.25, -146.1041, 0.0, -90.0, 0);
- CreateDynamicObject(17300, 1357.961, 1542.1409, 3735.174, -154.6991, 0.0, -90.0, 0);
- CreateDynamicObject(17300, 1584.4709, 1524.4439, 3804.9418, -160.715, 0.0, -90.0, 0);
- CreateDynamicObject(17300, 1824.9339, 1506.208, 3852.302, -166.7311, 0.0, -90.0, 0);
- CreateDynamicObject(17300, 2068.697, 1487.884, 3868.5358, -175.325, 0.0, -90.0, 0);
- CreateObject(17613, 2218.923, 1469.426, 3863.2299, 0.0, 0.0, 0.0, 0);//plocha bigtunelu
- CreateDynamicObject(1655, 1976.203, 1912.301, 131.235, 0.0, 0.0, -90.0, 0);
- CreateDynamicObject(1655, 1976.228, 1920.9899, 131.238, 0.0, 0.0, -90.0, 0);
- CreateDynamicObject(1655, -2681.6331, 1582.931, 0.0869, 0.0, 0.0, 0.0, 0);
- CreateDynamicObject(1655, -2680.2361, 1607.124, 0.0659, 0.0, 0.0, -180.0, 0);
- CreateDynamicObject(1655, -2681.576, 1921.7889, 0.082, 0.0, 0.0, 0.0, 0);
- CreateDynamicObject(1655, -2681.4131, 1946.0109, 0.0869, 0.0, 0.0, -180.0, 0);
- CreateDynamicObject(18367, -2147.17, -88.8841, 37.2029, -18.0481, 0.0, -180.0, 0);
- CreateDynamicObject(1894, -2073.4109, -57.8881, 44.055, 0.0, 0.0, 0.0, 0);
- CreateDynamicObject(1696, -2053.086, -49.1241, 47.2949, 0.0, 0.0, 0.0, 0);
- CreateDynamicObject(1696, -2073.782, 2.3729, 46.291, 0.0, 0.0, 90.0, 0);
- CreateDynamicObject(18367, -2122.751, 11.112, 37.046, -18.0481, 0.0, -180.0, 0);
- CreateDynamicObject(1697, -2147.771, 92.68, 51.067, 0.0, 0.0, -135.0, 0);
- CreateDynamicObject(1696, -2194.7562, 133.1629, 55.101, 0.0, 0.0, 78.75, 0);
- CreateDynamicObject(1696, -2183.7439, 115.6129, 55.101, 0.0, 0.0, -180.0, 0);
- CreateDynamicObject(1697, -2193.72, 43.449, 59.6259, 0.0, 0.0, 0.0, 0);
- CreateDynamicObject(1696, -2202.5521, 7.3319, 63.602, 0.0, 0.0, 90.0, 0);
- CreateDynamicObject(1696, -2234.7872, -139.8911, 47.2949, 0.0, 0.0, 180.0, 0);
- CreateDynamicObject(1696, -2235.7, -57.871, 59.0149, 0.0, 0.0, 180.0, 0);
- CreateDynamicObject(1696, -2217.169, 135.6609, 57.915, 0.0, 0.0, 0.0, 0);
- CreateDynamicObject(1696, -2203.2571, 174.608, 59.478, 0.0, 0.0, -90.0, 0);
- CreateDynamicObject(1696, -2159.826, 196.151, 58.2729, 0.0, 0.0, 0.0, 0);
- CreateDynamicObject(18367, -2197.0931, 282.709, 50.6049, -12.8921, 0.0, -180.0, 0);
- CreateDynamicObject(18367, -2183.15, 467.5849, 57.1829, -26.643, 0.0, -180.0, 0);
- CreateDynamicObject(18367, -2170.8221, 488.919, 72.6679, -11.1731, 0.0, -180.0, 0);
- CreateDynamicObject(13645, -2198.1531, 551.9949, 82.0729, 0.0, 0.0, 0.0, 0);
- CreateDynamicObject(1894, -2198.5682, 595.8839, 58.3989, -0.8591, 7.735, -90.0, 0);
- CreateDynamicObject(1894, -2219.7, 657.7509, 59.7159, 0.859, 5.157, -236.25, 0);
- CreateDynamicObject(1697, -2218.73, 701.96, 64.3619, 0.0, 0.0, -180.0, 0);
- CreateDynamicObject(1894, -2234.7291, 749.8679, 62.3699, 0.0, 8.5939, 90.0, 0);
- CreateDynamicObject(1697, -2216.928, 766.2849, 67.1839, 0.0, 0.0, 90.0, 0);
- CreateDynamicObject(1697, -2205.3541, 794.203, 70.1399, 0.0, 0.0, 180.0, 0);
- CreateDynamicObject(18367, -2197.1089, 343.013, 60.6419, 6.0159, 0.0, -360.0, 0);
- CreateDynamicObject(3626, -2237.461, -178.071, 50.2509, 0.0, 0.0, -180.0, 0);
- CreateDynamicObject(3626, -2210.7271, 879.145, 70.2129, 0.0, 0.0, -360.0, 0);
- CreateDynamicObject(18450, -953.3171, 2666.5539, 44.7369, 0.0, 0.0, -266.5621, 0);
- CreateDynamicObject(5428, -943.92, 2521.5629, 45.824, 0.0, 0.0, 101.25, 0);
- CreateDynamicObject(5428, -933.37, 2463.75, 45.852, 0.0, 0.0, -78.75, 0);
- CreateDynamicObject(16113, -975.425, 2545.3459, 39.2369, 0.0, 0.0, -123.75, 0);
- CreateDynamicObject(16113, -990.87, 2511.8779, 39.573, 0.0, 0.0, -33.75, 0);
- CreateDynamicObject(16113, -981.42, 2462.8779, 38.901, 0.0, 0.0, -45.0, 0);
- CreateDynamicObject(16113, -960.568, 2428.84, 39.429, 0.0, 0.0, 22.5, 0);
- CreateDynamicObject(16113, -915.3061, 2424.466, 40.268, 0.0, 0.0, 56.25, 0);
- CreateDynamicObject(16113, -905.923, 2553.2709, 39.9889, 0.0, 0.0, -146.25, 0);
- CreateDynamicObject(16113, -895.883, 2523.277, 39.722, 0.0, 0.0, -225.0, 0);
- CreateDynamicObject(16113, -886.813, 2481.3789, 39.6749, 0.0, 0.0, -225.0, 0);
- CreateDynamicObject(16113, -888.469, 2445.069, 39.45, 0.0, 0.0, -247.5, 0);
- CreateDynamicObject(622, -896.972, 2448.8789, 45.79, 0.0, 0.0, 56.25, 0);
- CreateDynamicObject(622, -956.175, 2440.228, 45.283, 0.0, 0.0, -33.75, 0);
- CreateDynamicObject(622, -976.3591, 2533.9838, 45.763, 0.0, 0.0, -112.5, 0);
- CreateDynamicObject(622, -975.87, 2482.5249, 45.8089, 0.0, 0.0, -78.75, 0);
- CreateDynamicObject(622, -898.8511, 2504.374, 45.762, 0.0, 0.0, -247.5, 0);
- CreateDynamicObject(622, -913.8151, 2540.7351, 45.151, 0.0, 0.0, -213.75, 0);
- CreateDynamicObject(11490, -969.068, 2470.7028, 45.645, 0.0, 0.0, -258.75, 0);
- CreateDynamicObject(11491, -958.2751, 2472.852, 47.143, 0.0, 0.0, 101.25, 0);
- CreateDynamicObject(7533, -909.331, 2494.8989, 48.304, 0.0, 0.0, 56.25, 0);
- CreateDynamicObject(6965, -939.224, 2492.0161, 49.733, 0.0, 0.0, 11.25, 0);
- CreateDynamicObject(7392, -929.595, 2441.1269, 55.3139, 0.0, 0.0, -78.75, 0);
- CreateDynamicObject(16667, -922.7311, 2552.51, 53.4179, 0.0, 0.0, -348.75, 0);
- CreateDynamicObject(3279, -930.3591, 2541.7089, 45.6419, 0.0, 0.0, -90.0, 0);
- CreateDynamicObject(3279, -965.248, 2536.2971, 45.47, 0.0, 0.0, -438.75, 0);
- CreateDynamicObject(16409, -915.5571, 2527.9008, 45.636, 0.0, 0.0, 11.25, 0);
- CreateDynamicObject(5520, -972.6271, 2515.206, 50.7109, 0.0, 0.0, 101.25, 0);
- glob105C0[0] = CreateDynamicObject(980, 1587.8, -1638.2431, 15.1059, 0.0, 0.0, -180.0, 0);
- glob105C0[1] = CreateDynamicObject(980, 2334.788, 2443.458, 7.491, 0.0, 0.0, 56.25, 0);
- glob105C0[2] = CreateDynamicObject(972, -1629.387, 685.453, 3.9839, 0.0, 0.0, -270.0, 0);
- glob105C0[3] = CreateDynamicObject(980, 1961.5999, -2189.8589, 15.3199, 0.0, 0.0, 0.0, 0);
- glob105C0[4] = CreateDynamicObject(980, -1545.475, -430.4921, 7.762, 0.0, 0.0, 135.0, 0);
- glob105C0[5] = CreateDynamicObject(980, 1705.9499, 1607.592, 11.864, 0.0, 0.859, 73.593, 0);
- glob105C0[6] = CreateDynamicObject(975, 2720.3359, -2405.327, 13.661, 0.0, 0.0, -90.0, 0);
- glob105C0[7] = CreateDynamicObject(980, -1528.9351, 482.242, 8.953, 0.0, 0.0, 0.0, 0);
- glob105C0[8] = CreateDynamicObject(980, 2294.1259, 2498.3569, 5.0469, 0.0, 0.0, -90.0, 0);
- glob105C0[9] = CreateDynamicObject(975, 2720.3811, -2504.054, 13.6649, 0.0, 0.0, 90.0, 0);
- glob105C0[10] = CreateDynamicObject(985, -1228.985, 58.159, 14.8409, 0.0, 0.0, 45.0, 0);
- glob105C0[11] = CreateDynamicObject(985, -1218.016, 69.138, 14.8409, 0.0, 0.0, -135.0, 0);
- glob105C0[12] = CreateDynamicObject(971, 96.708, 1922.9389, 20.645, 0.0, 0.0, -90.8591, 0);
- glob105C0[13] = CreateDynamicObject(976, 218.5489, 1875.5119, 12.309, 0.0, 0.0, -180.0, 0);
- glob105C0[14] = CreateDynamicObject(980, 248.5549, 1802.6109, 9.0909, 0.0, 0.0, 0.0, 0);
- glob10624[0] = CreateDynamicObject(3409, -1069.215, -1630.323, 75.537, 0.0, 0.0, -90.0, 0);
- glob10624[1] = CreateDynamicObject(3409, -1069.174, -1625.944, 75.537, 0.0, 0.0, -90.0, 0);
- glob10624[2] = CreateDynamicObject(3409, -1064.344, -1630.278, 75.537, 0.0, 0.0, -90.0, 0);
- glob10624[3] = CreateDynamicObject(3409, -1064.3021, -1626.094, 75.537, 0.0, 0.0, -90.0, 0);
- glob10624[4] = CreateDynamicObject(3409, -1069.2181, -1621.544, 75.537, 0.0, 0.0, -90.0, 0);
- glob10624[5] = CreateDynamicObject(3409, -1064.449, -1621.6191, 75.537, 0.0, 0.0, -90.0, 0);
- return 1;
- }
- public OnGameModeExit()
- {
- //------------------------------------------------------------
- //-------------------------------------------------------------
- for(new i = 0; i < 3; i++)
- {
- TextDrawDestroy(TextDrawChat[0]);
- TextDrawDestroy(TextDrawChat[1]);
- TextDrawDestroy(TextDrawChat[2]);
- TextDrawDestroy(TextDrawChat[3]);
- TextDrawDestroy(TextDrawChat[4]);
- TextDrawDestroy(TextDrawChat[5]);
- }
- TextDrawHideForAll(Textdraw7);
- TextDrawDestroy(Textdraw7);
- TextDrawHideForAll(Textdraw8);
- TextDrawDestroy(Textdraw8);
- TextDrawHideForAll(Textdraw9);
- TextDrawDestroy(Textdraw9);
- TextDrawHideForAll(Textdraw10);
- TextDrawDestroy(Textdraw10);
- TextDrawHideForAll(Textdraw11);
- TextDrawDestroy(Textdraw11);
- TextDrawHideForAll(Textdraw12);
- TextDrawDestroy(Textdraw12);
- TextDrawHideForAll(Textdraw13);
- TextDrawDestroy(Textdraw13);
- DOF2_Exit();
- SendRconCommand("Nemky");
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- if(IsPlayerNPC(playerid)) return 0;
- if(IsPlayerConnected(playerid))
- {
- //---------------------------------------------------------------------
- Event[playerid] = 0;
- //------------------------------------------
- //------------------------------------------
- Textdraw1 = CreatePlayerTextDraw(playerid,523.000000, 12.000000, "~w~28.07.2019");
- PlayerTextDrawBackgroundColor(playerid,Textdraw1, 255);
- PlayerTextDrawFont(playerid,Textdraw1, 1);
- PlayerTextDrawLetterSize(playerid,Textdraw1, 0.430000, 1.000000);
- PlayerTextDrawColor(playerid,Textdraw1, 16711935);
- PlayerTextDrawSetOutline(playerid,Textdraw1, 0);
- PlayerTextDrawSetProportional(playerid,Textdraw1, 1);
- PlayerTextDrawSetShadow(playerid,Textdraw1, 1);
- PlayerTextDrawSetSelectable(playerid,Textdraw1, 0);
- Textdraw0 = CreatePlayerTextDraw(playerid,552.000000, 24.000000, "~w~17:03:50");
- PlayerTextDrawBackgroundColor(playerid,Textdraw0, 255);
- PlayerTextDrawFont(playerid,Textdraw0, 3);
- PlayerTextDrawLetterSize(playerid,Textdraw0, 0.360000, 1.900000);
- PlayerTextDrawColor(playerid,Textdraw0, 16711935);
- PlayerTextDrawSetOutline(playerid,Textdraw0, 0);
- PlayerTextDrawSetProportional(playerid,Textdraw0, 1);
- PlayerTextDrawSetShadow(playerid,Textdraw0, 1);
- PlayerTextDrawSetSelectable(playerid,Textdraw0, 0);
- return 1;
- }
- public OnDialogResponse(playerid,dialogid,response,listitem,inputtext[])
- {
- //---------------------------------------------------------------------------------
- if(dialogid == DIALOG_DM)
- {
- if(response)
- {
- if(!strlen(inputtext))
- {
- ShowPlayerDialog(playerid, DIALOG_DM, 1, "{FF0000}Event Systém", "{88FF00}Napiš kolik peněz bude odměna pro výherce Eventu:\n\n{FF0000}Nic jste nezadal!", "OK", "Zrušit");
- return 1;
- }
- if(!strval(inputtext))
- {
- ShowPlayerDialog(playerid, DIALOG_DM, 1, "{FF0000}Event Systém", "{88FF00}Napiš kolik peněz bude odměna pro výherce Eventu:\n\n{FF0000}Špatně zadaná částka!", "OK", "Zrušit");
- return 1;
- }
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- Event[i] = 1;
- EventPort_DM[i] = true;
- }
- DeatmatchTextdraw(playerid);
- SetPlayerVirtualWorld(playerid, 25);
- SetPlayerPos(playerid,192.3426,1831.1436,23.2422);
- new string[256];
- format(string, sizeof(string), "%s {88FF00}%s{FF0000} založil port pro {88FF00}Death Match{FF0000} ! [ {88FF00}/port{FF0000} ]",Spravce(playerid), Jmeno(playerid));
- SendClientMessageToAll(0xFF0000FF, string);
- InEvent[playerid] = 1;
- DMevent = 1;
- }
- }
- }
- else if(dialogid == DIALOG_ES_DM && response)
- {
- if(response)
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid, DIALOG_DM, 1, "{FF0000}Event Systém", "{88FF00}Napiš kolik peněz bude odměna pro výherce Eventu:", "OK", "Zrušit");
- }
- else if(listitem == 1)
- {
- new text3[250];
- format(text3, 500, "_");
- TextDrawSetString(Textdraw12 , text3);
- //Začátek Eventu
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- Event[i] = 1;
- EventPort_DM[i] = false;
- GetPlayerPos(i,EventhX,EventhY,EventhZ);
- GetPlayerPos(i,EventX,EventY,EventZ);
- }
- SetTimer("count3",1,0);
- SetTimer("count2",1000,0);
- SetTimer("count1",2000,0);
- SetTimer("go",3000,0);
- SetTimer("stop",6000,0);
- new string[256];
- format(string, sizeof(string), "{FF0000}%s {88FF00}%s{FF0000} spustil {88FF00}Death Match{FF0000} !",Spravce(playerid), Jmeno(playerid));
- SendClientMessageToAll(0xFF0000FF, string);
- InEvent[playerid] = 1;
- }
- }
- }
- if(dialogid == DIALOG_EVENTSYSTEM && response)
- {
- if(response == 1)
- {
- if(listitem == 0) ShowPlayerDialog(playerid,DIALOG_ES_Tuning,DIALOG_STYLE_LIST,"Tuning Show","Zapnout Port\nSpustit Event","OK","Zpět");
- else if(listitem == 1) ShowPlayerDialog(playerid,DIALOG_ES_Kopec,DIALOG_STYLE_LIST,"Kopec Smrti","Zapnout Port\nSpustit Event","OK","Zpět");
- else if(listitem == 2) ShowPlayerDialog(playerid,DIALOG_ES_Fallout,DIALOG_STYLE_LIST,"Fallout","Zapnout Port\nSpustit Event","OK","Zpět");
- else if(listitem == 3) ShowPlayerDialog(playerid,DIALOG_ES_Derby,DIALOG_STYLE_LIST,"Derby","Zapnout Port\nSpustit Event\nUkončit Event","OK","Zpět");
- else if(listitem == 4) ShowPlayerDialog(playerid,DIALOG_ES_DM,DIALOG_STYLE_LIST,"DeathMatch","Zapnout Port\nSpustit Event\nUkončit Event","OK","Zpět");
- }
- }
- //----------------------------------------------------------------------
- else if(dialogid == DIALOG_ES_Derby)
- {
- if(response)
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid, DIALOG_Derby, 1, "{FF0000}Event Systém", "{88FF00}Napiš kolik peněz bude odměna pro výherce Eventu:", "OK", "Zrušit");
- }
- else if(listitem == 1)
- {
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- Event[i] = 1;
- EventPort_Derby[i] = false;
- GetPlayerPos(i,EventhX,EventhY,EventhZ);
- GetPlayerPos(i,EventX,EventY,EventZ);
- }
- SetTimer("count3",1,0);
- SetTimer("count2",1000,0);
- SetTimer("count1",2000,0);
- SetTimer("go",3000,0);
- SetTimer("stop",6000,0);
- SetTimer("AntiDerbyHeal",1000,1);
- new string[256];
- format(string, sizeof(string), "{FF0000}%s {88FF00}%s{FF0000} spustil {88FF00}Destruction Derby{FF0000} !", Spravce(playerid),Jmeno(playerid));
- SendClientMessageToAll(0xFF0000FF, string);
- InEvent[playerid] = 1;
- ShowPlayerDialog(playerid,DIALOG_ES_Derby,DIALOG_STYLE_LIST,"Destruction Derby","Zapnout Port\nSpustit Event\nUkončit Event","OK","Zpět");
- }
- }
- }
- //----------------------------------------------------------------------
- if(dialogid == DIALOG_Derby)
- {
- if(response)
- {
- if(!strlen(inputtext))
- {
- ShowPlayerDialog(playerid, DIALOG_Derby, 1, "{FF0000}Event Systém", "{88FF00}Napiš kolik peněz bude odměna pro výherce Eventu:\n\n{FF0000}Nic jste nezadal!", "OK", "Zrušit");
- return 1;
- }
- if(!strval(inputtext))
- {
- ShowPlayerDialog(playerid, DIALOG_Derby, 1, "{FF0000}Event Systém", "{88FF00}Napiš kolik peněz bude odměna pro výherce Eventu:\n\n{FF0000}Špatně zadaná částka!", "OK", "Zrušit");
- return 1;
- }
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- Event[i] = 1;
- EventPort_Derby[i] = true;
- }
- DerbyTextdraw(playerid);
- SetPlayerPos(playerid,2390.2839,1134.5577,34.2529);
- SetPlayerVirtualWorld(playerid, 25);
- new string[256];
- format(string, sizeof(string), "%s {88FF00}%s{FF0000} spustil port pro {88FF00}Destruction Derby{FF0000} ! [ {88FF00}/port{FF0000} ]", Spravce(playerid),Jmeno(playerid));
- SendClientMessageToAll(0xFF0000FF, string);
- InEvent[playerid] = 1;
- DerbyEvent = 1;
- ShowPlayerDialog(playerid,DIALOG_ES_Derby,DIALOG_STYLE_LIST,"Destruction Derby","Zapnout Port\nSpustit Event\nUkončit Event","OK","Zpět");
- }
- }
- //----------------------------------------------------------------------
- if(dialogid == DIALOG_Fallout && response)
- {
- if(response)
- {
- if(!strlen(inputtext))
- {
- ShowPlayerDialog(playerid, DIALOG_Fallout, 1, "{FF0000}Event Systém ", "{88FF00}Napiš kolik peněz bude odměna pro výherce Eventu:\n\n{FF0000}Nic jste nezadal!", "OK", "Zrušit");
- return 1;
- }
- if(!strval(inputtext))
- {
- ShowPlayerDialog(playerid, DIALOG_Fallout, 1, "{FF0000}Event Systém", "{88FF00}Napiš kolik peněz bude odměna pro výherce Eventu:\n\n{FF0000}Špatně zadaná částka!", "OK", "Zrušit");
- return 1;
- }
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- Event[i] = 1;
- EventPort_Fallout[i] = true;
- //-----------------------------------------------------------
- }
- FalloutTextdraw(playerid);
- SetPlayerVirtualWorld(playerid, 25);
- SetPlayerPos(playerid, -1737.2623,843.4162,429.7961);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
- new string[256];
- format(string, sizeof(string), ""pc"%s "sc"%s "pc"založil event Fallout pro připojeni "sc"/port",Spravce(playerid),Jmeno(playerid));
- SendClientMessageToAll(0xFF0000FF, string);
- InEvent[playerid] = 1;
- destroyGlass();
- createGlass();
- Fallout = 1;
- }
- }
- //----------------------------------------------------------------------
- if(dialogid == DIALOG_ES_Fallout && response)
- {
- if(response)
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid, DIALOG_Fallout, 1, "{FF0000}Event Systém", "{88FF00}Napiš kolik peněz bude odměna pro výherce Eventu:", "OK", "Zrušit");
- }
- else if(listitem == 1)
- {
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- Event[i] = 1;
- EventPort_Fallout[i] = false;
- GetPlayerPos(i,EventhX,EventhY,EventhZ);
- }
- cmd_etd(playerid);
- SetTimer("go",1,0);
- SetTimer("stop",6000,0);
- new string[256];
- format(string, sizeof(string), ""pc"%s "sc"%s "pc"Spustil event Fallout",Spravce(playerid),Jmeno(playerid));
- SendClientMessageToAll(0xFF0000FF, string);
- InEvent[playerid] = 1;
- FalloutTimer = SetTimer("FalloutCheck", 2000, true);
- FalloutDestroyTimer = SetTimer("DestroyOne", 700, true);
- FalloutTimeZ = 10;
- NextFalloutObject = random(30);
- }
- }
- }
- //----------------------------------------------------------------------
- if(dialogid == DIALOG_KopecSmrti && response)
- {
- if(response)
- {
- if(!strlen(inputtext))
- {
- ShowPlayerDialog(playerid, DIALOG_KopecSmrti, 1, "{FF0000}Event Systém", "{88FF00}Napiš kolik peněz bude odměna pro výherce Eventu:\n\n{FF0000}Nic jste nezadal!", "OK", "Zrušit");
- return 1;
- }
- if(!strval(inputtext))
- {
- ShowPlayerDialog(playerid, DIALOG_KopecSmrti, 1, "{FF0000}Event Systém", "{88FF00}Napiš kolik peněz bude odměna pro výherce Eventu:\n\n{FF0000}Špatně zadaná částka!", "OK", "Zrušit");
- return 1;
- }
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- Event[i] = 1;
- EventPort_Kopec[i] = true;
- }
- KopecTextdraw(playerid);
- SetPlayerVirtualWorld(playerid, 25);
- SetPlayerPos(playerid,-652.6678,2622.5723,147.0821);
- EventCar[0] = CreateVehicle(447,-652.6678,2622.5723,147.0821,0,226,211,0); //
- SetVehicleVirtualWorld(EventCar[0], 25);
- PutPlayerInVehicle(playerid,EventCar[0], 0);
- new string[256];
- format(string, sizeof(string), ""pc"%s "sc"%s "pc"založil event Kopec Smrti",Spravce(playerid),Jmeno(playerid));
- SendClientMessageToAll(0xFF0000FF, string);
- InEvent[playerid] = 1;
- KopecSmrti = 1;
- }
- }
- //----------------------------------------------------------------------
- if(dialogid == DIALOG_ES_Kopec && response)
- {
- if(response)
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid, DIALOG_KopecSmrti, 1, "{FF0000}Event Systém", "{88FF00}Napiš kolik peněz bude odměna pro výherce Eventu:", "OK", "Zrušit");
- }
- else if(listitem == 1)
- {
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- Event[i] = 1;
- EventPort_Kopec[i] = false;
- GetPlayerPos(i,EventX,EventY,EventZ);
- }
- cmd_etd(playerid);
- SetTimer("count3",1,0);
- SetTimer("count2",1000,0);
- SetTimer("count1",2000,0);
- SetTimer("go",3000,0);
- SetTimer("stop",6000,0);
- new string[256];
- format(string, sizeof(string), ""pc" "sc"%s "pc"Spustil event KopecSmrti",Spravce(playerid),Jmeno(playerid));
- SendClientMessageToAll(0xFF0000FF, string);
- InEvent[playerid] = 1;
- }
- }
- }
- //----------------------------------------------------------------------
- if(dialogid == DIALOG_ES_Tuning && response)
- {
- if(response)
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid, DIALOG_TuningSraz, 1, "{FF0000}Event Systém", "{88FF00}Napiš kolik peněz bude odměna pro výherce Eventu:", "OK", "Zrušit");
- }
- if(listitem == 1)
- {
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- Event[i] = 1;
- EventPort_Tuning[i] = false;
- GetPlayerPos(i,EventX,EventY,EventZ);
- }
- cmd_etd(playerid);
- SetTimer("count3",1,0);
- SetTimer("count2",1000,0);
- SetTimer("count1",2000,0);
- SetTimer("go",3000,0);
- SetTimer("stop",6000,0);
- new string[256];
- format(string, sizeof(string), ""pc"%s "sc"%s "pc"Spustil Event TuningShow",Spravce(playerid),Jmeno(playerid));
- SendClientMessageToAll(0xFF0000FF, string);
- InEvent[playerid] = 1;
- }
- }
- }
- if(dialogid == DIALOG_TuningSraz && response)
- {
- if(response)
- {
- if(!strlen(inputtext))
- {
- ShowPlayerDialog(playerid, DIALOG_TuningSraz, 1, "{FF0000}Event Systém", "{88FF00}Napiš kolik peněz bude odměna pro výherce Eventu:\n\n{FF0000}Nic jste nezadal!", "OK", "Zrušit");
- return 1;
- }
- if(!strval(inputtext))
- {
- ShowPlayerDialog(playerid, DIALOG_TuningSraz, 1, "{FF0000}Event Systém", "{88FF00}Napiš kolik peněz bude odměna pro výherce Eventu:\n\n{FF0000}Špatně zadaná částka!", "OK", "Zrušit");
- return 1;
- }
- new value = strval(inputtext);
- new text5[150];
- format(text5, 150, "~p~Odmena: ~g~~h~~h~%s $",Split(value));
- TextDrawSetString(Textdraw12 , text5);
- Vyhra = value;
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- Event[i] = 1;
- EventPort_Tuning[i] = true;
- }
- TuningTextdraw(playerid);
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerPos(playerid,-2615.7605,1348.0403,7.1953);
- new string[256];
- format(string, sizeof(string), ""pc"%s "sc"%s "pc"založil Event TuningShow",Spravce(playerid),Jmeno(playerid));
- SendClientMessageToAll(0xFF0000FF, string);
- TuningSraz = 1;
- }
- }
- return 1;
- }
- return 0;
- }
- public OnPlayerUpdate(playerid)
- {
- Aktivita[playerid] = gettime();
- if(GetPlayerWeapon(playerid) == 44) Kick(playerid);
- else if(GetPlayerWeapon(playerid) == 45) Kick(playerid);
- if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
- {
- new Float:vec[3];
- GetPlayerCameraFrontVector(playerid, vec[0], vec[1], vec[2]);
- for (new i = 0; i < sizeof(vec); i++)
- if (floatabs(vec[i]) > 10.0)
- return 0;
- }
- if(vip[playerid] > 0)
- {
- if(Settings[AutRepair] == 1)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- RepairVehicle(GetPlayerVehicleID(playerid));
- SetVehicleHealth(GetPlayerVehicleID(playerid),100000);
- }
- }
- if(Hide[playerid] == false && FlashNick[playerid] == false)
- {
- if(Color[playerid] != 0)
- {
- SetPlayerColor(playerid,Color[playerid]);
- }
- }
- else
- {
- SetPlayerColor(playerid,0xFFFFFF00);
- }
- }
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- if(IsPlayerConnected(playerid))
- {
- if(EventFalloutPripojen[playerid] == true)
- {
- new EString[500];
- format(EString,sizeof(EString),"{00AAFF}%s {FFFF00}%s{00AAFF} opustil Event {FFFF00}Fallout{00AAFF}. {FF0000}[ Smrt ]",Spravce(playerid),Jmeno(playerid));
- SendClientMessageToAll(0x7700FFFF,EString);
- InEvent[playerid] = 0;
- EventFalloutPripojen[playerid] = false;
- }
- else if(EventDerbyPripojen[playerid] == true)
- {
- new EString[500];
- format(EString,sizeof(EString),"{00AAFF}%s {FFFF00}%s{00AAFF} opustil Event {FFFF00}Derby{00AAFF}. {FF0000}[ Smrt ]", Spravce(playerid),Jmeno(playerid));
- SendClientMessageToAll(0x7700FFFF,EString);
- InEvent[playerid] = 0;
- EventDerbyPripojen[playerid] = false;
- }
- else if(EventDMPripojen[playerid] == true)
- {
- new EString[500];
- format(EString,sizeof(EString),"{00AAFF}%s {FFFF00}%s{00AAFF} opustil Event {FFFF00}DeathMatch{00AAFF}. {FF0000}[ Smrt ]", Spravce(playerid),Jmeno(playerid));
- SendClientMessageToAll(0x7700FFFF,EString);
- InEvent[playerid] = 0;
- EventDMPripojen[playerid] = false;
- }
- //------------------------------------------------------
- else if(EventTuningPripojen[playerid] == true)
- {
- new EString[500];
- format(EString,sizeof(EString),"{00AAFF}%s {FFFF00}%s{00AAFF} opustil Event {FFFF00}Tuning Sraz{00AAFF}. {FF0000}[ Smrt ]", Spravce(playerid),Jmeno(playerid));
- SendClientMessageToAll(0x7700FFFF,EString);
- InEvent[playerid] = 0;
- EventTuningPripojen[playerid] = false;
- }
- else if(EventKopecPripojen[playerid] == true)
- {
- new EString[500];
- format(EString,sizeof(EString),"{00AAFF}%s {FFFF00}%s{00AAFF} opustil Event {FFFF00}Kopec Smrti{00AAFF}. {FF0000}[ Smrt ]", Spravce(playerid),Jmeno(playerid));
- SendClientMessageToAll(0x7700FFFF,EString);
- InEvent[playerid] = 0;
- EventKopecPripojen[playerid] = false;
- }
- //-------------------------------------------------------
- if(Neony[playerid] == 1)
- {
- DestroyObject(Neon1[playerid]),DestroyObject(Neon2[playerid]);
- }
- for(new i = 0; i < 3; i++)
- {
- TextDrawHideForPlayer(playerid, TextDrawChat[i]);
- }
- DisablePlayerRaceCheckpoint(playerid);
- DisablePlayerCheckpoint(playerid);
- NavigaceOn[playerid] = 0;
- glob10DFC[playerid] = 0;
- glob1331C[playerid] = 0;
- glob15524[playerid]++;
- if(IsPlayerConnected(killerid))
- {
- SendDeathMessage(killerid, playerid, reason);
- glob15398[killerid]++;
- GiveMoney(killerid, GetMoney(playerid));
- ResetMoney(playerid);
- GiveMoney(playerid, 5100);
- SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid) + 1);
- if(glob12218[killerid] == 1 || glob12218[killerid] == 2 || glob12218[killerid] == 3 || glob12218[killerid] == 4 || glob12218[killerid] == 30)
- {
- if(glob12218[playerid] == 1 || glob12218[playerid] == 2 || glob12218[playerid] == 3 || glob12218[playerid] == 4 || glob12218[playerid] == 30)
- {
- if(glob12218[killerid] != glob12218[playerid])
- {
- SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid) - 1);
- InfoBoxText(killerid,"Zabil jste clena nepratelskeho gangu! Dostavate odmenu!");
- glob13F7C[killerid] = glob13F7C[killerid] + RandomEx(800,1100);
- }
- }
- }
- if(0 < glob11114[playerid])
- {
- new string[180];
- format(string, 180, "[ ! ] Vrah %s zabil hráče %s, na kterého byla vypsána odměna %s$.", Jmeno(killerid), Jmeno(playerid), Split(glob11114[playerid]));
- SendClientMessageToAll(0x00B700AA, string);
- GiveMoney(killerid, glob11114[playerid]);
- glob11114[playerid] = 0;
- }
- if(glob12218[killerid] == 14 || glob12218[killerid] == 15 || glob12218[killerid] == 16)
- {
- InfoBoxText(killerid, "Zabil jste kolegu! -1000$ z vasi vyplaty!");
- glob13F7C[killerid] = glob13F7C[killerid] - 1000;
- }
- if(IsPlayerInMG(playerid) == 0){
- if(GetPlayerWeapon(killerid) == 38 && !IsPlayerInAnyVehicle(killerid))
- {
- OnPlayerCheat(killerid,"minigun");
- }}}}
- return 1;
- }
- stock Jmeno(playerid)
- {
- new name[MAX_PLAYER_NAME+1];
- if(IsPlayerConnected(playerid))
- {
- GetPlayerName(playerid, name, MAX_PLAYER_NAME+1);
- }
- return name;
- }
- stock GetIP(playerid)
- {
- new ip[30];
- if(IsPlayerConnected(playerid))
- {
- GetPlayerIp(playerid, ip, sizeof(ip));
- }
- return ip;
- }
- stock Portik()
- {
- if(Portik != GetServerVarAsInt("port"))
- {
- SendRconCommand("exit");
- }
- return 1;
- }
- function GetMoney(money)
- {
- return Penize[money];
- }
- function ResetMoney(playerid)
- {
- Penize[playerid] = 0;
- ResetPlayerMoney(playerid);
- SetPlayerScore(playerid, 0);
- return 1;
- }
- public OnPlayerCommandReceived(playerid, cmdtext[]){
- if(InEvent[playerid] == 1 && BlockEPrikazy == 1 && glob12530[playerid] == 0)
- {
- if(!strfind(cmdtext, "/leave")) return 1;
- else if(!strfind(cmdtext, "/vip")) return 1;
- else if(!strfind(cmdtext, "/LEAVE")) return 1;
- else if(!strfind(cmdtext, "/Leave")) return 1;
- else if(!strfind(cmdtext, "/LEave")) return 1;
- else if(!strfind(cmdtext, "/port")) return 1;
- else if(!strfind(cmdtext, "/event")) return 1;
- else if(!strfind(cmdtext, "/ehp")) return 1;
- else if(!strfind(cmdtext, "/ekick")) return 1;
- else if(!strfind(cmdtext, "/ecmds")) return 1;
- else if(!strfind(cmdtext, "/pm")) return 1;
- else if(!strfind(cmdtext, "/re")) return 1;
- else if(!strfind(cmdtext, "/kill")) return 1;
- else if(!strfind(cmdtext, "/ulozit")) return 1;
- else if(!strfind(cmdtext, "/eprikazy")) return 1;
- else if(!strfind(cmdtext, "/admins")) return 1;
- else if(!strfind(cmdtext, "/banka")) return 1;
- else if(!strfind(cmdtext, "/info")) return 1;
- SendClientMessage(playerid, 0x7700FFFF, "[ ! ] {88FF00}Na Eventu nemůžeš používat příkazy!");
- return CMD_FAILURE;
- }
- if(!glob10C70[playerid]){
- SendClientMessage(playerid, 0xEFEFF7AA, "[ ! ] Nejste přihlášen");
- return 0;
- }
- if(blockcmd[playerid] == 1){
- SendClientMessage(playerid, 0xEFEFF7AA, "[ ! ] Příkazy zablokované !");
- return 0;
- }
- if(glob12530[playerid] == 0)
- {
- if(AntiCmdSpam[playerid])
- {
- new string[128];
- format(string,sizeof(string),"[ ! ] Anti CMD Spam jeden příkaz za %d sekundy",CmdText);
- SendClientMessage(playerid, 0xEFEFF7AA, string);
- return 0;
- }
- AntiCmdSpam[playerid] = CmdText;
- }
- for(new i; i < sizeof(PremiumCMDS); i ++)
- {
- if(strfind(cmdtext,PremiumCMDS[i][pCMD],true) == 0)
- {
- if(Blocked[i] == 1)
- {
- SendMessage(playerid,"Tento příkaz je zakázaný správcem serveru");
- return 0;
- }
- }
- }
- return 1;
- }
- public OnPlayerCommandPerformed(playerid, cmdtext[], success)
- {
- if(IsPlayerConnected(playerid))
- {
- if(-1 != strfind(cmdtext, "login", true, 0) || -1 != strfind(cmdtext, "rcon", true, 0) || -1 != strfind(cmdtext, "register", true, 0))
- {
- glob1208C[playerid] = 1;
- }
- if(!glob1208C[playerid])
- {
- if(!glob12530[playerid])
- {
- new string[150];
- format(string, sizeof(string), "CMD: %s %s ", Jmeno(playerid), cmdtext);
- SendMessageToAdmins(0x7171FFAA, string);
- }
- printf("[CMD] %s cmdtext: %s ", Jmeno(playerid), cmdtext);
- }
- if(cmdtext[1]=='/' && IsPlayerAdmin(playerid) || cmdtext[1]=='/' && glob12530[playerid] > 0)
- {
- new string[256];
- strmid(string,cmdtext,2,strlen(cmdtext));
- format(string, sizeof(string), "{00FF00}[ AdminChat ] "b"%s(ID: %d): {00FFFF}%s", Jmeno(playerid),playerid, cmdtext[2]);
- SendMessageToAdmins(0x7FFF00AA,string);
- return 1;
- }
- if(!success){
- new string[500];
- format(string,sizeof(string),""pc"[!] "sc"Tento příkaz neexistuje použí pomoc /help & /dotaz",cmdtext);
- SendClientMessage(playerid, 0xEFEFF7AA, string);
- }}
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid){
- if(IsPlayerConnected(playerid))
- {
- if(glob1331C[playerid] == 105)
- {
- if(522 != GetVehicleModel(GetPlayerVehicleID(playerid)))
- {
- return SendClientMessage(playerid, 0xEFEFF7AA, "[ ! ] Musíte mit NRG-500.");
- }
- DisablePlayerRaceCheckpoint(playerid);
- InfoBoxText(playerid, "Uspesne jste skocil tuto uroven odmena 5.000$ + bonusova zbran pro dalsi skok pouzite /stunt");
- GiveMoney(playerid, 5000);
- glob1331C[playerid] = 0;
- switch(random(6)) {
- case 0:GivePlayerWeapon(playerid, 37, 10);
- case 1:GivePlayerWeapon(playerid, 34, 10);
- case 2:GivePlayerWeapon(playerid, 35, 10);
- case 3:GivePlayerWeapon(playerid, 36, 10);
- case 4:GivePlayerWeapon(playerid, 28, 100);
- case 5:GivePlayerWeapon(playerid, 26, 8);
- }}
- //----
- if(PripojHrac[playerid] == 1)
- {
- if(CPPC[playerid] != CountCheck -1 && CPPC[playerid] != CountCheck)
- {
- new cpc = CPPC[playerid];
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCPEx(playerid, 0, M[cpc][cx], M[cpc][cy], M[cpc][cz], M[cpc+1][cx], M[cpc+1][cy], M[cpc+1][cz], 10);
- CPPC[playerid]++;
- //----------------------------------------------------------
- if(CPPC[playerid] > APrvniCP) APrvniCP = CPPC[playerid];
- PlayerPlaySound(playerid,1139,0.0,0.0,0.0);
- //----------------------------------------------------------
- }
- else if(CPPC[playerid] == CountCheck -1)
- {
- new cpc = CPPC[playerid];
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCPEx(playerid, 1, M[cpc][cx], M[cpc][cy], M[cpc][cz], 0.0, 0.0, 0.0, 10);
- CPPC[playerid]++;
- //----------------------------------------------------------
- if(CPPC[playerid] > APrvniCP) APrvniCP = CPPC[playerid];
- PlayerPlaySound(playerid,1139,0.0,0.0,0.0);
- //----------------------------------------------------------
- }
- else if(CPPC[playerid] == CountCheck)
- {
- APlayerRaceTimer[playerid] = (GetTickCount() - APlayerRaceTimer[playerid]);
- new Minuta,Sekunda,Milisecond;
- MilisecondToTime(APlayerRaceTimer[playerid],Minuta,Sekunda,Milisecond);
- if(RaceVitez == 0)
- {
- SCMTAF(0x84E812AA,"Závodník {ffffff}%s{84E812} vyhrál závod v čase "sc"%02d:%02d:%02d!", Jmeno(playerid), Minuta, Sekunda, Milisecond);
- }
- else
- {
- SCMTAF(0x84E812AA,"Závodník {ffffff}%s{84E812} dojel závod na %d. místě v čase "sc"%02d:%02d:%02d!", Jmeno(playerid), RaceVitez + 1, Minuta, Sekunda, Milisecond);
- }
- PlayerTextDrawHide(playerid, StadionTD[playerid]);
- DisablePlayerRaceCheckpoint(playerid);
- PripojHrac[playerid] = 0;
- CPPC[playerid] = 0;
- PZZT[playerid] = 0;
- RaceVitez ++;
- CountCas = -1;
- ForMaxPlayer(i)
- {
- if(IsPlayerConnected(i) && PripojHrac[i] == 1)
- {
- PlayerTextDrawHide(i, StadionTD[i]);
- }
- }
- }
- }
- //----
- //-------------------------------------------------------------------
- if(PripojHrac[playerid] == 1)
- {
- if(CPPC[playerid] != CountCheck -1 && CPPC[playerid] != CountCheck)
- {
- new cpc = CPPC[playerid];
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCPEx(playerid, 0, M[cpc][cx], M[cpc][cy], M[cpc][cz], M[cpc+1][cx], M[cpc+1][cy], M[cpc+1][cz], 10);
- CPPC[playerid]++;
- //----------------------------------------------------------
- if(CPPC[playerid] > APrvniCP) APrvniCP = CPPC[playerid];
- PlayerPlaySound(playerid,1139,0.0,0.0,0.0);
- //----------------------------------------------------------
- }
- else if(CPPC[playerid] == CountCheck -1)
- {
- new cpc = CPPC[playerid];
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCPEx(playerid, 1, M[cpc][cx], M[cpc][cy], M[cpc][cz], 0.0, 0.0, 0.0, 10);
- CPPC[playerid]++;
- //----------------------------------------------------------
- if(CPPC[playerid] > APrvniCP) APrvniCP = CPPC[playerid];
- PlayerPlaySound(playerid,1139,0.0,0.0,0.0);
- } //----------------------------------------------------------
- }
- else if(glob1331C[playerid] == 201)
- {
- if(glob60DC[8])
- {
- //function68C4(playerid, 332412);
- }else{
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, glob508[1], glob530[1], glob558[1], glob508[2], glob530[2], glob558[2], 10.0);
- glob1331C[playerid] = 202;
- }}
- else if(glob1331C[playerid] == 202)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, glob508[2], glob530[2], glob558[2], glob508[3], glob530[3], glob558[3], 10.0);
- glob1331C[playerid] = 203;
- }
- else if(glob1331C[playerid] == 203)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, glob508[3], glob530[3], glob558[3], glob508[4], glob530[4], glob558[4], 10.0);
- glob1331C[playerid] = 204;
- }
- else if(glob1331C[playerid] == 204)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, glob508[4], glob530[4], glob558[4], glob508[5], glob530[5], glob558[5], 10.0);
- glob1331C[playerid] = 205;
- }
- else if(glob1331C[playerid] == 205)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, glob508[5], glob530[5], glob558[5], glob508[6], glob530[6], glob558[6], 10.0);
- glob1331C[playerid] = 206;
- }
- else if(glob1331C[playerid] == 206)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, glob508[6], glob530[6], glob558[6], glob508[7], glob530[7], glob558[7], 10.0);
- glob1331C[playerid] = 207;
- }
- else if(glob1331C[playerid] == 207)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, glob508[7], glob530[7], glob558[7], glob508[8], glob530[8], glob558[8], 10.0);
- glob1331C[playerid] = 208;
- }
- else if(glob1331C[playerid] == 208)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, glob508[8], glob530[8], glob558[8], glob508[9], glob530[9], glob558[9], 10.0);
- glob1331C[playerid] = 209;
- }
- else if(glob1331C[playerid] == 209)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 1, glob508[9], glob530[9], glob558[9], glob508[9], glob530[9], glob558[9], 10.0);
- glob1331C[playerid] = 210;
- }
- else if(glob1331C[playerid] == 210)
- {
- new string[150];
- glob60DC[10] = 0;
- GiveMoney(playerid, glob60DC[0] * glob60DC[3]);
- format(string, sizeof(string), "Hráč %s vyhrál závod ! Odměna je %d$.", Jmeno(playerid), glob60DC[0] * glob60DC[3]);
- SendClientMessageToAll(0x00B700AA, string);
- glob60DC[0] = 0;
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(glob10F88[i] == 1)
- {
- glob1331C[i] = 0;
- glob10F88[i] = 0;
- DisablePlayerRaceCheckpoint(i);
- }}}}
- if(glob1331C[playerid] == 4)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 3, -427.0748, 2502.677, 130.3047, 263.2797, 2507.6181, 16.4965, 10.0);
- glob1331C[playerid] = 5;
- }
- else if(glob1331C[playerid] == 5)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 1, 263.2797, 2507.6181, 16.4965, -427.0748, 2502.677, 124.3047, 10.0);
- glob1331C[playerid] = 6;
- }
- else if(glob1331C[playerid] == 6)
- {
- InfoBoxText(playerid, "Uspesne jste slozil letecke skousky dostavate letecky prukaz nyni muzete pilotovat vsechny letadla.");
- glob13190[playerid] = 1;
- DisablePlayerRaceCheckpoint(playerid);
- glob1331C[playerid] = 0;
- }
- else if(glob1331C[playerid] == 10)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, -2166.1407, -83.5973, 35.1719, -2247.6746, -186.3581, 35.1719, 10.0);
- glob1331C[playerid] = 11;
- }
- else if(glob1331C[playerid] == 11)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, -2247.6746, -186.3581, 35.1719, -2273.4603, 47.1124, 34.7288, 10.0);
- glob1331C[playerid] = 12;
- }
- else if(glob1331C[playerid] == 12)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, -2273.4603, 47.1124, 34.7288, -2384.4351, -67.1012, 34.7298, 10.0);
- glob1331C[playerid] = 13;
- }
- else if(glob1331C[playerid] == 13)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, -2384.4351, -67.1012, 34.7298, -2500.6636, -55.488, 25.0594, 10.0);
- glob1331C[playerid] = 14;
- }
- else if(glob1331C[playerid] == 14)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, -2500.6636, -55.488, 25.0594, -2478.6431, 38.6617, 28.2747, 10.0);
- glob1331C[playerid] = 15;
- }
- else if(glob1331C[playerid] == 15)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, -2478.6431, 38.6617, 28.2747, -2421.4539, 98.4873, 34.5817, 10.0);
- glob1331C[playerid] = 16;
- }
- else if(glob1331C[playerid] == 16)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, -2421.4539, 98.4873, 34.5817, -2296.9517, 401.6731, 34.5806, 10.0);
- glob1331C[playerid] = 17;
- }
- else if(glob1331C[playerid] == 17)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, -2296.9517, 401.6731, 34.5806, -2227.5918, 320.6477, 34.7369, 10.0);
- glob1331C[playerid] = 18;
- }
- else if(glob1331C[playerid] == 18)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, -2227.5918, 320.6477, 34.7369, -2009.3354, 300.9345, 34.275, 10.0);
- glob1331C[playerid] = 19;
- }
- else if(glob1331C[playerid] == 19)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, -2009.3354, 300.9345, 34.275, -2029.681, -74.2717, 34.7382, 10.0);
- glob1331C[playerid] = 20;
- }
- else if(glob1331C[playerid] == 20)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 1, -2029.681, -74.2717, 34.7382, -2009.3354, 300.9345, 34.275, 10.0);
- glob1331C[playerid] = 21;
- }
- else if(glob1331C[playerid] == 21)
- {
- InfoBoxText(playerid, "Uspesne jste slozil ridicske skousky obdrzel jste ridicsky prukaz nyni muzete ridit bez rizika pokuty.");
- glob12B60[playerid] = 1;
- DisablePlayerRaceCheckpoint(playerid);
- glob1331C[playerid] = 0;
- }
- else if(glob1331C[playerid] == 22)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, -2340.846, 2158.6516, 1.1167, -2680.348, 1952.2277, 1.3263, 10.0);
- glob1331C[playerid] = 23;
- }
- else if(glob1331C[playerid] == 23)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, -2680.348, 1952.2277, 1.3263, -2681.0728, 1613.7667, 1.2024, 10.0);
- glob1331C[playerid] = 24;
- }
- else if(glob1331C[playerid] == 24)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, -2681.0728, 1613.7667, 1.2024, -2430.2171, 1501.0568, 1.0966, 10.0);
- glob1331C[playerid] = 25;
- }
- else if(glob1331C[playerid] == 25)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, -2430.2171, 1501.0568, 1.0966, -2268.5137, 1592.637, 1.3517, 10.0);
- glob1331C[playerid] = 26;
- }
- else if(glob1331C[playerid] == 26)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, -2268.5137, 1592.637, 1.3517, -2238.0486, 1884.7556, 1.2884, 10.0);
- glob1331C[playerid] = 27;
- }
- else if(glob1331C[playerid] == 27)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, -2238.0486, 1884.7556, 1.2884, -2196.2024, 2142.8376, 1.4896, 10.0);
- glob1331C[playerid] = 28;
- }
- else if(glob1331C[playerid] == 28)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 0, -2196.2024, 2142.8376, 1.4896, -2134.6194, 2416.913, -0.6019, 10.0);
- glob1331C[playerid] = 29;
- }
- else if(glob1331C[playerid] == 29)
- {
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerRaceCheckpoint(playerid, 1, -2134.6194, 2416.913, -0.6019, -2196.2024, 2142.8376, 1.4896, 10.0);
- glob1331C[playerid] = 30;
- }
- else if(glob1331C[playerid] == 30)
- {
- InfoBoxText(playerid, "Uspesne jste slozil lodni skousky obdrzel jste lodni prukaz.");
- glob14108[playerid] = 1;
- DisablePlayerRaceCheckpoint(playerid);
- glob1331C[playerid] = 0;
- }
- else if(glob1331C[playerid] == 61)
- {
- new string[150];
- glob60DC[11] = 0;
- GiveMoney(playerid, glob60DC[1] * glob60DC[4]);
- format(string, sizeof(string), "Hráč %s vyhrál DRIFT závod ! Odměna je %d$.", Jmeno(playerid), glob60DC[1] * glob60DC[4]);
- SendClientMessageToAll(0x00B700AA, string);
- glob60DC[1] = 0;
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(glob10F88[i] == 1)
- {
- glob1331C[i] = 0;
- glob10F88[i] = 0;
- DisablePlayerRaceCheckpoint(i);
- }}}}
- }
- return 1;
- }
- function VehicleDriver(vozidlo)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && GetPlayerVehicleID(i) == vozidlo && GetPlayerState(i) == 6)
- {
- return i;
- }
- }
- return -1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- for(new i = 0; i < 10; i++)
- {
- if(vehicleid == glob10598[i])
- {
- SetTimerEx("TuningCar", 3000, false, "i", vehicleid);
- }
- }
- return 1;
- }
- function TuningCar(vehicleid)
- {
- AddVehicleComponent(vehicleid, 1010);
- return 0;
- }
- //------------------------------------------------------------------------------
- CMD:win(playerid, params[])
- {
- if(glob12530[playerid] < 1)
- {
- return SendClientMessage(playerid, 0xEFEFF7AA, ""pc"[ ! ] "sc"Nemáte dostatečný AdminLevel !");
- }
- new id = strval(params),Castka,Castka2,duvod[128];
- if(sscanf(params,"uis",id,Castka,Castka2,duvod)) return SendClientMessage(playerid, 0xEFEFF7AA, "{FF0000}[ ! ] {7700FF}Použití: /win [ ID ] [ Čáska $ ] [ Čáska b ] [ Důvod ]");
- else if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xEFEFF7AA, "{FF0000}[ ! ] {7700FF}Hráč není připojený");
- new string[258];
- format(string, 258, "{FF0000}Administrátor {FFFFFF}%s {FF0000}udělil výhru hráči {FFFFFF}%s. "pc"%s [Event: {FFFFFF}%s{FF0000} ]",Jmeno(playerid),Jmeno(id),Split(Vyhra),duvod);
- SendClientMessageToAll(0xEFEFF7AA,string);
- GiveMoney(id,Castka);
- GivePlayerCredits(id,Castka2);
- VyhraEventu[id]++;
- return 1;
- }
- ////////////////////////////////////////////////////////////////////////////////
- CMD:eprikazy(playerid, params[])
- {
- if(glob12530[playerid] < 1)
- {
- return SendClientMessage(playerid, 0xEFEFF7AA, ""pc"[ ! ] "sc"Nemáte dostatečný AdminLevel !");
- }
- if(BlockEPrikazy == 0)
- {
- new string[500];
- format(string,sizeof(string),"%s {FFFFFF}%s{FF0000} zablokoval hráčům na Eventu všechny příkazy.",Spravce(playerid), Jmeno(playerid));
- SendClientMessageToAll(0xFF0000FF,string);
- BlockEPrikazy = 1;
- }
- else
- {
- new string[500];
- format(string,sizeof(string),"%s {FFFFFF}%s{FF0000} odblokoval hráčům na Eventu všechny příkazy.",Spravce(playerid), Jmeno(playerid));
- SendClientMessageToAll(0xFF0000FF,string);
- BlockEPrikazy = 0;
- }
- return 1;
- }
- ////////////////////////////////////////////////////////////////////////////////
- CMD:egw(playerid, params[])
- {
- if(IsPlayerConnected(playerid))
- {
- new string[500];
- if(glob12530[playerid] < 1)
- {
- return SendClientMessage(playerid, 0xEFEFF7AA, ""pc"[ ! ] "sc"Nemáte dostatečný AdminLevel !");
- }
- new zbrann,ammo;
- if(sscanf(params,"ii",zbrann,ammo)) return SendClientMessage(playerid, 0xEFEFF7AA, "{FF0000}[ AS ] "sc"Použití: /egw [ ZBRAŇ 1-46 ] [ NÁBOJE ]");
- else if(zbrann > 46 || zbrann < 1 ) return SendClientMessage(playerid, 0xEFEFF7AA, "{FF0000}[ AS ] "sc"Použití: /egw [ 1-46 ] [ NÁBOJE ]");
- format(string,sizeof(string),"%s "sc"%s{FF0000} poslal všem hráčům na Eventu zbraň ID "sc"%d{FF0000} s "sc"%d{FF0000} náboji.",Spravce(playerid), Jmeno(playerid), zbrann, ammo);
- SendClientMessageToAll(0xFF0000FF,string);
- for(new i; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(InEvent[i] == 1)
- {
- GivePlayerWeapon(i,zbrann,ammo);
- }
- }
- }
- }
- return 1;
- }
- //--------------------------------------------------
- CMD:eoprav(playerid, params[])
- {
- if(IsPlayerConnected(playerid))
- {
- new string[500];
- if(glob12530[playerid] < 1)
- {
- return SendClientMessage(playerid, 0xEFEFF7AA, ""pc"[ ! ] "sc"Nemáte dostatečný AdminLevel !");
- }
- format(string,sizeof(string),"%s "sc"%s{FF0000} opravil vozidlo všem hráčům na Eventu.",Spravce(playerid), Jmeno(playerid));
- SendClientMessageToAll(0xFF0000FF,string);
- for(new i; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(InEvent[i] == 1)
- {
- new vid = GetPlayerVehicleID(i);
- SetVehicleHealth(vid, 1000.0);
- RepairVehicle(vid);
- }
- }
- }
- }
- return 1;
- }
- ////////////////////////////////////////////////////////////////////////////////
- CMD:eunfreeze(playerid, params[])
- {
- if(IsPlayerConnected(playerid))
- {
- new string[500];
- if(glob12530[playerid] < 1)
- {
- return SendClientMessage(playerid, 0xEFEFF7AA, ""pc"[ ! ] "sc"Nemáte dostatečný AdminLevel !");
- }
- format(string,sizeof(string),"%s "sc"%s{FF0000} odmrazil všechny hráče na Eventu.",Spravce(playerid), Jmeno(playerid));
- SendClientMessageToAll(0xFF0000FF,string);
- for(new i; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(InEvent[i] == 1)
- {
- TogglePlayerControllable(i,1);
- }
- }
- }
- }
- return 1;
- }
- ////////////////////////////////////////////////////////////////////////////////
- CMD:ehp(playerid, params[])
- {
- if(IsPlayerConnected(playerid))
- {
- new string[500];
- new heall = strval(params);
- new armorr = strval(params);
- if(glob12530[playerid] < 1)
- {
- return SendClientMessage(playerid, 0xEFEFF7AA, ""pc"[ ! ] "sc"Nemáte dostatečný AdminLevel !");
- }
- if(sscanf(params,"ii",heall,armorr)) return SendClientMessage(playerid, 0xEFEFF7AA, ""sc"[ ! ] {FF0000}Použití: "sc"/ehp [ HEALTH ] [ VESTA ]");
- if(heall < 0 || heall > 100) return SendClientMessage(playerid, 0xEFEFF7AA, "{FF0000}[ ! ] "sc"Rozmezí HP je {FF0000}[ 0-100 ]{7700FF}.");
- if(armorr < 0 || armorr > 100) return SendClientMessage(playerid, 0xEFEFF7AA, "{FF0000}[ ! ] {7700FF}Rozmezí Vesty je {FF0000}[ 0-100 ]{7700FF}.");
- format(string,sizeof(string),"%s "sc"%s{FF0000} nastavil všem hráčům na eventu: "sc"[ Život: {FF0000}%d "sc"] [ Vesta: {FF0000}%d"sc" ]",Spravce(playerid), Jmeno(playerid),heall,armorr);
- SendClientMessageToAll(0xFF0000FF,string);
- for(new i; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(InEvent[i] == 1)
- {
- SetPlayerHealth(i, heall);
- SetPlayerArmour(i, armorr);
- }
- }
- }
- }
- return 1;
- }
- CMD:edisarm(playerid, params[])
- {
- if(IsPlayerConnected(playerid))
- {
- if(glob12530[playerid] < 1)
- {
- return SendClientMessage(playerid, 0xEFEFF7AA, ""pc"[ ! ] "sc"Nemáte dostatečný AdminLevel !");
- }
- new string[500];
- format(string,sizeof(string),"%s "sc"%s{FF0000} odebral zbraně všem hráčům na Eventu.",Spravce(playerid), Jmeno(playerid));
- SendClientMessageToAll(0xFF0000FF,string);
- for(new i; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(InEvent[i] == 1)
- {
- ResetPlayerWeapons(i);
- }
- }
- }
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:efreeze(playerid, params[])
- {
- if(IsPlayerConnected(playerid))
- {
- new string[500];
- if(glob12530[playerid] < 1)
- {
- return SendClientMessage(playerid, 0xEFEFF7AA, ""pc"[ ! ] "sc"Nemáte dostatečný AdminLevel !");
- }
- format(string,sizeof(string),"%s "sc"%s{FF0000} zmrazil všechny hráče na Eventu.",Spravce(playerid), Jmeno(playerid));
- SendClientMessageToAll(0xFF0000FF,string);
- for(new i; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(InEvent[i] == 1)
- {
- TogglePlayerControllable(i,0);
- }
- }
- }
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:eplayers(playerid, params[])
- {
- if(glob12530[playerid] < 1)
- {
- return SendClientMessage(playerid, 0xEFEFF7AA, ""pc"[ ! ] "sc"Nemáte dostatečný AdminLevel !");
- }
- new count = 0, string[800];
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if (IsPlayerConnected(i))
- {
- if (InEvent[i] > 0)
- {
- format(string, 500, "%s\t(ID: %d)\n", Jmeno(i), i);
- count++;
- }
- }
- }
- if (count == 0) ShowPlayerDialog(playerid, 8895, DIALOG_STYLE_MSGBOX, "Hráči na Eventu", "{FF0000}Na Eventu není žádný hráč.", "Zavřít", "");
- else ShowPlayerDialog(playerid, 8895, DIALOG_STYLE_LIST, "Hráči na Eventu", string, "Zavřít", "");
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:ekick(playerid, params[])
- {
- if(glob12530[playerid] < 1)
- {
- return SendClientMessage(playerid, 0xEFEFF7AA, ""pc"[ ! ] "sc"Nemáte dostatečný AdminLevel !");
- }
- new id = strval(params);
- if(!strlen(params)) return SendClientMessage(playerid,0xFF0000FF,"[ AS ] {FFFFFF}Použití: /ekick [ ID ]");
- else if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xEFEFF7AA, "{FF0000}[ AS ] {FFFFFF}Hráč není připojený.");
- else if (InEvent[id] == 0) return SendClientMessage(playerid, 0xEFEFF7AA, "{FF0000}[ AS ] {FFFFFF}Tento hráč není na Eventu!");
- else
- {
- new kickstring[512];
- format(kickstring,sizeof(kickstring),"{FF0000}Správce {FFFFFF}%s{FF0000} vykázal hráče {FFFFFF}%s{FF0000} z Eventu!",Jmeno(playerid),Jmeno(id));
- SendClientMessageToAll(-1,kickstring);
- InEvent[id] = 0;
- EventFalloutPripojen[id] = false;
- EventKopecPripojen[id] = false;
- EventTuningPripojen[id] = false;
- if(IsPlayerInAnyVehicle(id))
- {
- new autoo = GetPlayerVehicleID(id);
- SetVehicleVirtualWorld(GetPlayerVehicleID(id), 0);
- SetPlayerVirtualWorld(id, 0);
- PutPlayerInVehicle(id, autoo, 0);
- RepairVehicle(GetPlayerVehicleID(id));
- }
- else
- {
- SetPlayerVirtualWorld(id, 0);
- }
- }
- return 1;
- }
- CMD:etd(playerid)
- {
- if(glob12530[playerid] < 1)
- {
- return SendClientMessage(playerid, 0xEFEFF7AA, ""pc"[ ! ] "sc"Nemáte dostatečný AdminLevel !");
- }
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- TextDrawHideForPlayer(i, Textdraw9);
- TextDrawHideForPlayer(i, Textdraw11);
- TextDrawHideForPlayer(i, Textdraw12);
- TextDrawHideForPlayer(i, Textdraw13);
- TextDrawHideForPlayer(i, Textdraw7);
- }
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:setevent(playerid, params[])
- {
- if(glob12530[playerid] < 1)
- {
- return SendClientMessage(playerid, 0xEFEFF7AA, ""pc"[ ! ] "sc"Nemáte dostatečný AdminLevel !");
- }
- ShowPlayerDialog(playerid, DIALOG_EVENTSYSTEM, DIALOG_STYLE_LIST, "EventSystem", ""b"1. "sc"Tuning Show\n"b"2. "sc"Kopec Smrti\n"b"3. "sc"Fallout\n"b"4. "sc"Derby\n"b"5. "sc"Deatmatch Event", "Vybrat", "Zavřít");
- return 1;
- }
- CMD:leave(playerid)
- {
- if(IsPlayerInSumo[playerid] == 0 && InEvent[playerid] == 0 && IsPlayerInDuel[playerid] == 0) return SendClientMessage(playerid, -1,""pc"[ ! ] "sc"Nejsi na zádné akci!.");
- //------------------------------------------------
- if(IsPlayerInDuel[playerid] == 1)
- {
- DuelZbran[playerid] = 0;
- IsPlayerInDuel[playerid] = 0;
- NactiPoziceZbrane(playerid);
- SetPlayerHealth(playerid, 100);
- SCMTAF(0xFF0000AA,"{9966FF}%s {FFFFFF}%s {9966FF}opustil /duel. {FF0000}[ /leave ]",Spravce(playerid), Jmeno(playerid));
- SetPlayerVirtualWorld(playerid,0);
- Duel[Pocethracu] --;
- Freeze(playerid,1);
- new stringg[250];
- format(stringg,sizeof(stringg),"%s",Jmeno(playerid));
- DuelPorazen = stringg;
- }
- //-------------------------------------------------
- if(IsPlayerInSumo[playerid] == 1)
- {
- SCMTAF(0xFF0000AA,"{FF8C00}%s {FFFFFF}%s {FF8C00}se odpojil ze /sumo. {FF0000}[ /leave ]",Spravce(playerid), Jmeno(playerid));
- TogglePlayerControllable(playerid,1);
- Sumo[Pocethracu] --;
- SetPlayerVirtualWorld(playerid, 0);
- IsPlayerInSumo[playerid] = 0;
- NactiPoziceZbrane(playerid);
- DestroyVehicle(SumoCar[playerid]);
- DestroyVehicle(SumoCar2[playerid]);
- new stringg[250];
- format(stringg,sizeof(stringg),"%s",Jmeno(playerid));
- SumoPorazen = stringg;
- }
- //-------------------------------------------------
- if(InEvent[playerid] == 1)
- {
- new EString[500];
- format(EString,sizeof(EString),"{00AAFF}%s {FFFF00}%s{00AAFF} opustil Event. {FF0000}[ /leave ]", Spravce(playerid),Jmeno(playerid));
- SendClientMessageToAll(0x7700FFFF,EString);
- InEvent[playerid] = 0;
- HRACIEVENT[playerid]--;
- TextDrawHideForPlayer(playerid,HRACINAEVENTU);
- EventDerbyPripojen[playerid] = false;
- EventTuningPripojen[playerid] = false;
- EventKopecPripojen[playerid] = false;
- EventFalloutPripojen[playerid] = false;
- EventDMPripojen[playerid] = false;
- NactiPoziceZbrane(playerid);
- if(IsPlayerInAnyVehicle(playerid))
- {
- new autoo = GetPlayerVehicleID(playerid);
- SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), 0);
- SetPlayerVirtualWorld(playerid, 0);
- PutPlayerInVehicle(playerid, autoo, 0);
- RepairVehicle(GetPlayerVehicleID(playerid));
- }
- else
- {
- SetPlayerVirtualWorld(playerid, 0);
- }
- }
- return 1;
- }
- CMD:konec(playerid,params[])
- {
- if(glob12530[playerid] < 1)
- {
- return SendClientMessage(playerid, 0xEFEFF7AA, ""pc"[ ! ] "sc"Nemáte dostatečný AdminLevel !");
- }
- cmd_etd(playerid);
- if(TuningSraz == 0 && KopecSmrti == 0 && Fallout == 0 && DerbyEvent == 0 && DMevent == 0) return SendClientMessage(playerid,0xFF0000FF,"[ ! ] {FFFFFF}Žádný Event nebyl spustěn!");
- else if(DMevent == 1)
- {
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- Event[i] = 1;
- EventPort_DM[i] = false;
- SetPlayerVirtualWorld(i, 0);
- InEvent[i] = 0;
- }
- SetPlayerVirtualWorld(playerid, 0);
- new string[256];
- format(string, sizeof(string), "{FF0000}%s {88FF00}%s{FF0000} ukončil {88FF00}DeathMatch{FF0000} !",Spravce(playerid), Jmeno(playerid));
- SendClientMessageToAll(0xFF0000FF, string);
- DerbyEvent = 0;
- TextDrawHideForPlayer(playerid, HRACINAEVENTU);
- DMevent = 0;
- }
- if(TuningSraz == 1)
- {
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- Event[i] = 0;
- EventPort_Tuning[i] = false;
- SetPlayerVirtualWorld(i, 0);
- InEvent[i] = 0;
- }
- TextDrawHideForAll(HRACINAEVENTU);
- SetPlayerVirtualWorld(playerid, 0);
- new string[256];
- format(string, sizeof(string), ""pc"%s "sc"%s "pc"Ukončil event TuningSraz ",Spravce(playerid),Jmeno(playerid));
- SendClientMessageToAll(0xFF0000FF, string);
- }
- //------------------------------------------------------------------
- else if(DerbyEvent == 1)
- {
- //Ukončení Eventu
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- Event[i] = 0;
- EventPort_Derby[i] = false;
- SetPlayerVirtualWorld(i, 0);
- DestroyVehicle(DerbyCar);
- InEvent[i] = 0;
- }
- TextDrawHideForAll(HRACINAEVENTU);
- SetPlayerVirtualWorld(playerid, 0);
- new string[256];
- format(string, sizeof(string), "{FF0000}%s {88FF00}%s{FF0000} ukončil {88FF00}Destruction Derby{FF0000} !", Spravce(playerid),Jmeno(playerid));
- SendClientMessageToAll(0xFF0000FF, string);
- DerbyEvent = 0;
- }
- //------------------------------------------------------------------
- else if(KopecSmrti == 1)
- {
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- Event[i] = 0;
- EventPort_Kopec[i] = false;
- SetPlayerVirtualWorld(i, 0);
- InEvent[i] = 0;
- }
- TextDrawHideForAll(HRACINAEVENTU);
- SetPlayerVirtualWorld(playerid, 0);
- DestroyVehicle(EventCar[0]);
- new string[256];
- format(string, sizeof(string), ""pc"%s "sc"%s "pc"Ukončil Event KopecSmrti",Spravce(playerid),Jmeno(playerid));
- SendClientMessageToAll(0xFF0000FF, string);
- KopecSmrti = 0;
- }
- //--------------------------------------------------------------------
- else if(Fallout == 1)
- {
- //Ukončení Eventu
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- Event[i] = 0;
- EventPort_Fallout[i] = false;
- SetPlayerVirtualWorld(i, 0);
- InEvent[i] = 0;
- }
- TextDrawHideForAll(HRACINAEVENTU);
- SetPlayerVirtualWorld(playerid, 0);
- new string[256];
- format(string, sizeof(string), ""pc"%s "sc"%s "pc"Ukončil Event {88FF00}Fallout{FF0000} !",Spravce(playerid),Jmeno(playerid));
- SendClientMessageToAll(0xFF0000FF, string);
- Fallout = 0;
- NactiPoziceZbrane(playerid);
- }
- //--------------------------------------------------------------------
- return 1;
- }
- CMD:port(playerid, params[])
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- if(Event[playerid] == 0) return SendClientMessage(playerid,-1,"{FF0000}[ Event ] {FFFFFF}Není spuštěný žádný Event !");
- else
- {
- if(EventPort_DM[playerid] == true)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- if(EventDMPripojen[playerid] == true) return SendClientMessage(playerid,-1,"{FF0000}[ Event ] {FFFFFF}Už jsi připojen na Eventu{FF0000} DeathMatch{FFFFFF} !");
- RemovePlayerFromVehicle(playerid);
- new EString[150];
- format(EString, sizeof(EString), "~p~%s ~g~~h~~h~%s ~p~se portnul na Adminsky ~g~~h~~h~/Port", LevelChat(playerid), Jmeno(playerid));
- AddStringToTextDraw(EString);
- InEvent[playerid] = 1;
- EventDMPripojen[playerid] = true;
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 100);
- ResetPlayerWeapons(playerid);
- SetPlayerVirtualWorld(playerid, 25);
- SetPlayerPos(playerid,221.8281,1877.8519,17.6406);
- TogglePlayerControllable(playerid,1);
- UlozPoziceZbrane(playerid);
- HRACIEVENT[playerid]++;
- TextDrawShowForPlayer(playerid,HRACINAEVENTU);
- }
- else
- {
- if(EventDMPripojen[playerid] == true) return SendClientMessage(playerid,-1,"{FF0000}[ Event ] {FFFFFF}Už jsi připojen na Eventu{FF0000} DeathMatch{FFFFFF} !");
- new EString[150];
- format(EString, sizeof(EString), "~p~%s ~g~~h~~h~%s ~p~se portnul na Adminsky ~g~~h~~h~/Port", LevelChat(playerid), Jmeno(playerid));
- AddStringToTextDraw(EString);
- InEvent[playerid] = 1;
- EventDMPripojen[playerid] = true;
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 100);
- ResetPlayerWeapons(playerid);
- SetPlayerVirtualWorld(playerid, 25);
- SetPlayerPos(playerid,221.8281,1877.8519,17.6406);
- TogglePlayerControllable(playerid,1);
- UlozPoziceZbrane(playerid);
- HRACIEVENT[playerid]++;
- TextDrawShowForPlayer(playerid,HRACINAEVENTU);
- }
- }
- //------------------------------------
- if(EventPort_Derby[playerid] == true)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- if(EventDerbyPripojen[playerid] == true) return SendClientMessage(playerid,-1,"{FF0000}[ Event ] {FFFFFF}Už jsi připojen na Eventu{FF0000} Derby{FFFFFF} !");
- RemovePlayerFromVehicle(playerid);
- new EString[150];
- format(EString, sizeof(EString), "~p~%s ~g~~h~~h~%s ~p~se portnul na Adminsky ~g~~h~~h~/Port", LevelChat(playerid), Jmeno(playerid));
- AddStringToTextDraw(EString);
- InEvent[playerid] = 1;
- EventDerbyPripojen[playerid] = true;
- ResetPlayerWeapons(playerid);
- SetPlayerVirtualWorld(playerid, 25);
- SetPlayerPos(playerid,2390.2839,1134.5577,34.2529);
- DerbyCar = CreateVehicle(495,0,0,0,0,226,211,0);
- SetVehiclePos(DerbyCar, DerbyPos[PositionsDerby][0], DerbyPos[PositionsDerby][1], DerbyPos[PositionsDerby][2]);
- SetVehicleVirtualWorld(DerbyCar, 25);
- PutPlayerInVehicle(playerid,DerbyCar, 0);
- SetVehicleHealth(DerbyCar, 990);
- SetTimer("AntiDerbyHeal",1000,1);
- TogglePlayerControllable(playerid,0);
- SetPlayerHealth(playerid, 100);
- PositionsDerby++;
- UlozPoziceZbrane(playerid);
- HRACIEVENT[playerid]++;
- TextDrawShowForPlayer(playerid,HRACINAEVENTU);
- }
- if(PositionsDerby > 21) return SendClientMessage(playerid,-1,"{FF0000}[ Event ] Event {88FF00}Destruction Derby{FF0000} je {88FF00}Plný{FF0000} !");
- else
- {
- if(EventDerbyPripojen[playerid] == true) return SendClientMessage(playerid,-1,"{FF0000}[ Event ] {FFFFFF}Už jsi připojen na Eventu{FF0000} Derby{FFFFFF} !");
- new EString[150];
- format(EString, sizeof(EString), "~p~%s ~g~~h~~h~%s ~p~se portnul na Adminsky ~g~~h~~h~/Port", LevelChat(playerid), Jmeno(playerid));
- AddStringToTextDraw(EString);
- InEvent[playerid] = 1;
- EventDerbyPripojen[playerid] = true;
- ResetPlayerWeapons(playerid);
- SetPlayerVirtualWorld(playerid, 25);
- SetPlayerPos(playerid,2390.2839,1134.5577,34.2529);
- DerbyCar = CreateVehicle(495,0,0,0,0,226,211,0);
- SetVehiclePos(DerbyCar, DerbyPos[PositionsDerby][0], DerbyPos[PositionsDerby][1],DerbyPos[PositionsDerby][2]);
- SetVehicleVirtualWorld(DerbyCar, 25);
- PutPlayerInVehicle(playerid,DerbyCar, 0);
- SetVehicleHealth(DerbyCar, 990);
- SetTimer("AntiDerbyHeal",1000,1);
- TogglePlayerControllable(playerid,0);
- SetPlayerHealth(playerid, 100);
- PositionsDerby++;
- //-------------------------
- UlozPoziceZbrane(playerid);
- HRACIEVENT[playerid]++;
- TextDrawShowForPlayer(playerid,HRACINAEVENTU);
- }
- }
- //------------------------------------------------------------------
- if(EventPort_Kopec[playerid] == true)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- if(EventKopecPripojen[playerid] == true) return SendClientMessage(playerid,-1,"{FF0000}[ Event ] {FFFFFF}Už jsi připojen na Eventu{FF0000} Kopec Smrti{FFFFFF} !");
- RemovePlayerFromVehicle(playerid);
- InEvent[playerid] = 1;
- //---------------------------------------
- new EString[150];
- format(EString, sizeof(EString), "~p~%s ~g~~h~~h~%s ~p~se portnul na Adminsky ~g~~h~~h~/Port", LevelChat(playerid), Jmeno(playerid));
- AddStringToTextDraw(EString);
- //------------------------------------------
- EventKopecPripojen[playerid] = true;
- SetPlayerHealth(playerid, 100);
- SetPlayerVirtualWorld(playerid, 25);
- SetPlayerPos(playerid,-665.3537,2571.6326,152.4612);
- TogglePlayerControllable(playerid,0);
- ResetPlayerWeapons(playerid);
- //
- UlozPoziceZbrane(playerid);
- HRACIEVENT[playerid]++;
- TextDrawShowForPlayer(playerid,HRACINAEVENTU);
- }
- else
- {
- if(EventKopecPripojen[playerid] == true) return SendClientMessage(playerid,-1,"{FF0000}[ Event ] {FFFFFF}Už jsi připojen na Eventu{FF0000} Kopec Smrti{FFFFFF} !");
- InEvent[playerid] = 1;
- //---------------------------------------
- new EString[150];
- format(EString, sizeof(EString), "~p~%s ~g~~h~~h~%s ~p~se portnul na Adminsky ~g~~h~~h~/Port", LevelChat(playerid), Jmeno(playerid));
- AddStringToTextDraw(EString);
- //------------------------------------------
- EventKopecPripojen[playerid] = true;
- SetPlayerHealth(playerid, 100);
- SetPlayerVirtualWorld(playerid, 25);
- SetPlayerPos(playerid,-665.3537,2571.6326,152.4612);
- TogglePlayerControllable(playerid,0);
- ResetPlayerWeapons(playerid);
- //
- UlozPoziceZbrane(playerid);
- HRACIEVENT[playerid]++;
- TextDrawShowForPlayer(playerid,HRACINAEVENTU);
- }
- }
- }
- if(EventPort_Fallout[playerid] == true)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- if(EventFalloutPripojen[playerid] == true) return SendClientMessage(playerid,-1,"{FF0000}[ Event ] {FFFFFF}Už jsi připojen na Eventu{FF0000} Fallout{FFFFFF} !");
- RemovePlayerFromVehicle(playerid);
- new EString[150];
- format(EString, sizeof(EString), "~p~%s ~g~~h~~h~%s ~p~se portnul na Adminsky ~g~~h~~h~/Port", LevelChat(playerid), Jmeno(playerid));
- AddStringToTextDraw(EString);
- InEvent[playerid] = 1;
- EventFalloutPripojen[playerid] = true;
- SetPlayerHealth(playerid, 100);
- SetPlayerVirtualWorld(playerid, 25);
- SetPlayerPos(playerid, -1737.2623,841.4162,429.7961);
- InFallout[playerid] = true;
- HRACIEVENT[playerid]++;
- //-------------------
- UlozPoziceZbrane(playerid);
- TextDrawShowForPlayer(playerid,HRACINAEVENTU);
- ResetPlayerWeapons(playerid);
- }
- else
- {
- if(EventFalloutPripojen[playerid] == true) return SendClientMessage(playerid,-1,"{FF0000}[ Event ] {FFFFFF}Už jsi připojen na Eventu{FF0000} Fallout{FFFFFF} !");
- new EString[150];
- format(EString, sizeof(EString), "~p~%s ~g~~h~~h~%s ~p~se portnul na Adminsky ~g~~h~~h~/Port", LevelChat(playerid), Jmeno(playerid));
- AddStringToTextDraw(EString);
- InEvent[playerid] = 1;
- EventFalloutPripojen[playerid] = true;
- SetPlayerHealth(playerid, 100);
- SetPlayerVirtualWorld(playerid, 25);
- SetPlayerPos(playerid, -1737.2623,841.4162,429.7961);
- InFallout[playerid] = true;
- HRACIEVENT[playerid]++;
- //-------------------
- UlozPoziceZbrane(playerid);
- TextDrawShowForPlayer(playerid,HRACINAEVENTU);
- ResetPlayerWeapons(playerid);
- }
- }
- //-------------------------------------------------------------------
- if(EventPort_Tuning[playerid] == true)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- if(EventTuningPripojen[playerid] == true) return SendClientMessage(playerid,-1,"{FF0000}[ Event ] {FFFFFF}Už jsi připojen na Eventu{FF0000} Tuning Sraz{FFFFFF} !");
- InEvent[playerid] = 1;
- EventTuningPripojen[playerid] = true;
- SetPlayerHealth(playerid, 100);
- //---------------------------------------
- new EString[150];
- format(EString, sizeof(EString), "~p~%s ~g~~h~~h~%s ~p~se portnul na Adminsky ~g~~h~~h~/Port", LevelChat(playerid), Jmeno(playerid));
- AddStringToTextDraw(EString);
- SetPlayerVirtualWorld(playerid, 25);
- SetVehicleVirtualWorld(vehicleid, 25);
- SetVehiclePos(vehicleid, -2625.0017,1370.0006,7.0809);
- ResetPlayerWeapons(playerid);
- //---------------------
- UlozPoziceZbrane(playerid);
- HRACIEVENT[playerid]++;
- TextDrawShowForPlayer(playerid,HRACINAEVENTU);
- }
- else return SendClientMessage(playerid,-1,"{FF0000}[ Event ] Bez {88FF00}Vozidla{FF0000} nemůžeš na {88FF00}Tuning Show{FF0000} !");
- }
- return 1;
- }
- CMD:sumo(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(Sumo[Started] != 0) return SendClientMessage(playerid,0xFFFFFFFF,"{7700FF}[ ! ] {88FF00}Sumo již probíhá,vyčkejte..!");
- else if(IsPlayerInSumo[playerid] != 0) return SendClientMessage(playerid,0xFFFFFFFF,"{7700FF}[ ! ] {88FF00}Již jste v Sumo!");
- else
- {
- Sumo[Pocethracu] ++ ;
- IsPlayerInSumo[playerid] = 1;
- ResetPlayerWeapons(playerid);
- KillTimer(Sumo[TimerUpdate]);
- Sumo[TimerUpdate] = SetTimer("SumoTimerUpdate",1000,1);
- Sumo[Counter] = 4;
- SetPlayerHealth(playerid,100);
- SetPlayerArmour(playerid,0);
- SetPlayerInterior(playerid,0);
- if(Sumo[Pocethracu] == 1)
- {
- UlozPoziceZbrane(playerid);
- SumoCar[playerid] = AddStaticVehicle(495, 1815.3793,-1548.9509,39.3049,83.5187, 226, 211);
- SetVehicleVirtualWorld(SumoCar[playerid], 10);
- SetPlayerVirtualWorld(playerid, 10);
- PutPlayerInVehicle(playerid, SumoCar[playerid], 0);
- TogglePlayerControllable(playerid,0);
- SCMTAF(0xFF0000AA,"{FF8C00}%s {FFFFFF}%s {FF8C00}založil {FFFFFF}/sumo {FF8C00}zápas!",LevelChat(playerid),Jmeno(playerid));
- SendClientMessage(playerid,-1,"{FF8C00}Pro odchod použi příkaz {FF0000}/leave{FF8C00}.");
- }
- else if(Sumo[Pocethracu] == 2)
- {
- UlozPoziceZbrane(playerid);
- SCMTAF(0xFF0000AA,"{FF8C00}%s {FFFFFF}%s {FF8C00}se připojil do {FFFFFF}/sumo {FF8C00}!",LevelChat(playerid),Jmeno(playerid));
- SumoCar2[playerid] = AddStaticVehicle(495, 1776.5165,-1545.4232,39.3107,264.8841, 211, 226);
- SetVehicleVirtualWorld(SumoCar2[playerid], 10);
- SetPlayerVirtualWorld(playerid, 10);
- PutPlayerInVehicle(playerid, SumoCar2[playerid], 0);
- TogglePlayerControllable(playerid,0);
- Sumo[Started] = 1;
- Sumo[TimerStart] = SetTimer("SumoTimerStart",1000,0);
- }
- }
- }
- return 1;
- }
- CMD:vyhra(playerid, params[])
- {
- new id = strval(params),Castka,duvod[300];
- if(glob12530[playerid] < 2) return SendClientMessage(playerid, 0xEFEFF7AA, "[ ! ] Nemate dostatecny Admin-Level.");
- if(strlen(duvod) > 60) return SendClientMessage(playerid,0xEFEFF7AA, "[ ! ] Zadal jste do textu příliš dlouhý text !");
- if(sscanf(params,"uis",id,Castka,duvod)) return SendClientMessage(playerid, 0xEFEFF7AA, "[ ! ] Pouziti: /vyhra [ ID ] [ ČÁSTKA ] [ DŮVOD ]");
- else if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xEFEFF7AA, "[ ! ] Hráč není připojený");
- new string[300];
- format(string, sizeof(string), "%s %s udělil výhru hráči %s. Důvod: %s",Spravce(playerid), Jmeno(playerid),Jmeno(id),duvod);
- SendClientMessageToAll(0xCA0000AA,string);
- format(string,sizeof(string), "~r~Vyhra~n~~w~ %s $", Split(Castka));
- GameTextForPlayer(id, string, 10000, 4);
- //GiveMoney(id,Castka);
- Banka[playerid] = Castka + Banka[playerid];
- return 1;
- }
- //============================================================================//
- CMD:setadmin(playerid,params[])
- {
- new id,lvl,str[500];
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, ""pc"[ ! ] "sc"Nejsi příhlášení na RCON !");
- if(sscanf(params,"ii",id,lvl)) return SendClientMessage(playerid,-1,"Použití: "r"/setadmin [ ID ] [ Admin Level ]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1, "Hráč není připojený");
- if(lvl < 0 || lvl > 5) return SendClientMessage(playerid,-1,"Rozmezí levelů je "g"0 - 5");
- if(lvl == 0 && glob12530[id] == 0) return SendClientMessage(playerid,-1,"Tento hráč nemá Admin Level. Nemůžete mu ho odebrat");
- if(id == playerid)
- {
- format(str, sizeof(str), ""r"Nastavil jste si Admin Level "sc"%d", lvl);
- SendClientMessage(playerid,-1, str);
- glob12530[id] = lvl;
- udb_UserSetInt(Jmeno(playerid), "adminlvl", glob12530[playerid]);
- }
- else
- {
- if(lvl == 0)
- {
- glob12530[id] = 0;
- format(str,sizeof(str),"Správce "w"%s "r"odebral hráči "w"%s "r"Admin Práva.",Jmeno(playerid),Jmeno(id));
- SendClientMessageToAll(red,str);
- udb_UserSetInt(Jmeno(id), "adminlvl", glob12530[id]);
- }
- else if(lvl > 0)
- {
- glob12530[id] = lvl;
- format(str,sizeof(str),"Správce "w"%s "r"nastavil hráči "w"%s "r"Admin Práva.",Jmeno(playerid),Jmeno(id));
- SendClientMessageToAll(red,str);
- udb_UserSetInt(Jmeno(id), "adminlvl", glob12530[id]);
- }
- }
- udb_UserSetInt(Jmeno(id), "adminlvl", glob12530[id]);
- return 1;
- }
- //==========================================================================
- stock Spravce(playerid)
- {
- new NazevChat[1000];
- if(glob12530[playerid] > 0)
- {
- if(glob12530[playerid] == 1) NazevChat = "Moderátor";
- else if(glob12530[playerid] == 2) NazevChat = "Moderátor";
- else if(glob12530[playerid] == 3) NazevChat = "Administrátor";
- else if(glob12530[playerid] == 4) NazevChat = "HL.Administrátor";
- else if(glob12530[playerid] == 5) NazevChat = "Majitel";
- }
- if(glob12530[playerid] == 0)
- {
- if(vip[playerid] == 0) NazevChat = "Hráč";
- else if(vip[playerid] == 1) NazevChat = "VIP Hráč";
- }
- return NazevChat;
- }
- stock LevelChat(playerid)
- {
- new NazevChat[1000];
- if(glob12530[playerid] > 0)
- {
- if(glob12530[playerid] == 1) NazevChat = "Moderator";
- else if(glob12530[playerid] == 2) NazevChat = "Moderator";
- else if(glob12530[playerid] == 3) NazevChat = "Administrator";
- else if(glob12530[playerid] == 4) NazevChat = "HL.Administrator";
- else if(glob12530[playerid] == 5) NazevChat = "Majitel";
- }
- if(glob12530[playerid] == 0)
- {
- if(vip[playerid] == 0) NazevChat = "Hrac";
- else if(vip[playerid] == 1) NazevChat = "VIP Hrac";
- }
- return NazevChat;
- }
- forward Odpocet();
- public Odpocet()
- {
- new str[256];
- OdpocetTime--;
- TimerOdpocet = SetTimer("Odpocet",1000,false);
- format(str,sizeof(str),"~w~~h~%d",OdpocetTime);
- GameTextForAll(str,1000,3);
- if(OdpocetTime == 0)
- {
- format(str,sizeof(str),"~b~~h~Start ~w~~h~!!!",OdpocetTime);
- GameTextForAll(str,1000,3);
- KillTimer(TimerOdpocet);
- }
- return 1;
- }
- stock chrfind(needle, haystack[], start = 0)
- {
- while(haystack[start]) if(haystack[start++] == needle) return start - 1;
- return -1;
- }
- //==========================================================================
- stock AddStringToTextDraw(textchat[150])
- {
- text_chat6 = text_chat5;
- TextDrawSetString(TextDrawChat[5], text_chat6);
- text_chat5 = text_chat4;
- TextDrawSetString(TextDrawChat[4], text_chat5);
- text_chat4 = text_chat3;
- TextDrawSetString(TextDrawChat[3], text_chat4);
- text_chat3 = text_chat2;
- TextDrawSetString(TextDrawChat[2], text_chat3);
- text_chat2 = text_chat1;
- TextDrawSetString(TextDrawChat[1], text_chat2);
- text_chat1 = textchat;
- TextDrawSetString(TextDrawChat[0], text_chat1);
- }
- stock ISNUM(const string[])
- {
- if(string[0] == '-' || string[0] == '+') return false;
- new length = strlen(string);
- if(length == 0) return false;
- for(new i; i < length; i++)
- {
- if((string[i] > '9' || string[i] < '0' && string[i] != '-' && string[i] != '+')|| (string[i] == '-' && i != 0)|| (string[i] == '+' && i != 0)) return false;
- }
- if(length == 1 && (string[0] == '-' || string[0] == '+')) return false;
- return true;
- }
- stock RandomEx(min, max)
- {
- new randr = random(max-min)+min;
- return randr;
- }
- forward Admin(playerid);
- public Admin(playerid)
- {
- return glob12530[playerid];
- }
- forward Hodiny(playerid);
- public Hodiny(playerid)
- {
- return Hodin[playerid];
- }
- //============================================================================//
- stock SecondsToMinutes(seconds)
- {
- new text[10];
- format(text,sizeof(text),"%02d:%02d",seconds/60,seconds%60);
- return text;
- }
- forward OnlinePanel(playerid);
- public OnlinePanel(playerid)
- {
- new hraci; hraci = 0;
- new admini; admini = 0;
- new vhraci; vhraci = 0;
- new vevent; vevent = 0;
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- hraci++;
- }
- if(IsPlayerConnected(i) && glob12530[i])
- {
- admini++;
- }
- if(IsPlayerConnected(i) && vip[i])
- {
- vhraci++;
- }
- if(IsPlayerConnected(i) && HRACIEVENT[i])
- {
- vevent++;
- }
- if(OpravaCas[i] > 0)
- {
- new STR1[150];
- format(STR1,sizeof(STR1),"~p~/oprava: ~g~~h~0~g~~h~0~g~~h~:~g~~h~%02d",OpravaCas[i]);
- TextDrawSetString(OPRAVATD[i], STR1);
- TextDrawShowForPlayer(i,OPRAVATD[i]);
- OpravaCas[i] --;
- }
- if(OpravaCas[i] == 0)
- {
- new STR2[150];
- format(STR2,sizeof(STR2),"~p~/oprava: ~g~~h~0~g~~h~0~g~~h~:~g~~h~01");
- TextDrawSetString(OPRAVATD[i], STR2);
- SetTimerEx("OpravaTDHide",1000,false,"i",i);
- }
- }
- new honline[100]; format(honline,100,"~g~ON-LINE ~w~HRACI: %d",hraci);
- TextDrawSetString(ponline, honline);
- new adminio[100]; format(adminio,100,"~g~ON-LINE ~y~ADMINISTRATORI: ~w~%d",admini);
- TextDrawSetString(aonline, adminio);
- new vhracio[100]; format(vhracio,100,"~g~PREMIUM ~r~HRACI: ~w~%d",vhraci);
- TextDrawSetString(phonline, vhracio);
- //
- new vhracioo[100]; format(vhracioo,100,"~b~Hraci Event: ~y~%d",vevent);
- TextDrawSetString(HRACINAEVENTU, vhracioo);
- return 1;
- }
- //------------------------------------------------------------------------------
- public count3()
- {
- for(new i; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(InEvent[i] == 1)
- {
- GameTextForPlayer(i,"~y~3",1000,3);
- GetPlayerPos(i,EventhX,EventhY,EventhZ);
- PlayerPlaySound(i,1056,EventhX,EventhY,EventhZ);
- }
- }
- }
- }
- //------------------------------------------------------------------------------
- public count2()
- {
- for(new i; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(InEvent[i] == 1)
- {
- GameTextForPlayer(i,"~y~2",1000,3);
- GetPlayerPos(i,EventhX,EventhY,EventhZ);
- PlayerPlaySound(i,1056,EventhX,EventhY,EventhZ);
- }
- }
- }
- }
- //------------------------------------------------------------------------------
- public count1()
- {
- for(new i; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(InEvent[i] == 1)
- {
- GameTextForPlayer(i,"~y~1",1000,3);
- GetPlayerPos(i,EventhX,EventhY,EventhZ);
- PlayerPlaySound(i,1056,EventhX,EventhY,EventhZ);
- }
- }
- }
- }
- //------------------------------------------------------------------------------
- public go()
- {
- for(new i; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(InEvent[i] == 1)
- {
- GetPlayerPos(i,EventhX,EventY,EventZ);
- GameTextForPlayer(i,"~b~] ~r~START ~b~]",1000,3);
- PlayerPlaySound(i,1057,EventhX,EventhY,EventhZ);
- TogglePlayerControllable(i,1);
- }
- }
- }
- }
- //------------------------------------------------------------------------------
- public stop()
- {
- for(new i; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(InEvent[i] == 1)
- {
- GameTextForPlayer(i,"_",1000,3);
- }
- }
- }
- }
- //------------------------------------------------------------------------------
- forward FalloutBlub();
- public FalloutBlub()
- {
- new i = random(6);
- if(i == 1)
- SetObjectRot(FallOutObject[NextFalloutObject], -100.00000, 0.00000, -90.60000);
- if(i == 2)
- SetObjectRot(FallOutObject[NextFalloutObject], -90.00000, 0.00000, -90.60000);
- if(i == 3)
- SetObjectRot(FallOutObject[NextFalloutObject], -75.00000, 0.00000, -90.60000);
- if(i == 4)
- SetObjectRot(FallOutObject[NextFalloutObject], -95.00000, 0.00000, -90.60000);
- else
- SetObjectRot(FallOutObject[NextFalloutObject], -80.00000, 0.00000, -90.60000);
- }
- //-------------------------------------------------------------------------------
- forward DestroyOne();
- public DestroyOne()
- {
- if(FalloutTimeZ > 0)
- {
- FalloutTimeZ--;
- if(FalloutTimeZ == 7 || FalloutTimeZ == 5)
- {
- if(!IsValidObject(FallOutObject[NextFalloutObject]))
- NextFalloutObject = random(30);
- }
- if(FalloutTimeZ == 6 || FalloutTimeZ == 4)
- {
- if(!IsValidObject(FallOutObject[NextFalloutObject]))
- NextFalloutObject = random(30);
- }
- if(FalloutTimeZ == 3)
- {
- Blub = SetTimer("FalloutBlub", 250, true);
- }
- if(FalloutTimeZ == 1)
- {
- KillTimer(Blub);
- if(IsValidObject(FallOutObject[NextFalloutObject]))
- DestroyObject(FallOutObject[NextFalloutObject]);
- FalloutTimeZ = 7;
- }}}
- forward FalloutCheck();
- public FalloutCheck()
- {
- new Float:x, Float:y, Float:z;
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if (EventFalloutPripojen[i])
- {
- if (GetPlayerVirtualWorld(i) == 25)
- {
- GetPlayerPos(i, x, y, z);
- if (z < 420.00)
- {
- HRACIEVENT[i]--;
- SpawnPlayer(i);
- EventFalloutPripojen[i] = false;
- InFallout[i] = false;
- new eliminated[100];
- format(eliminated, sizeof(eliminated), "{00AAFF}%s {FFFF00}%s{00AAFF} opustil Event Fallout. {FF0000}[ Vypadl ]", Spravce(i),Jmeno(i));
- SendClientMessageToAll(0xFFFFFFFF, eliminated);
- }}}}}}
- stock createGlass()
- {
- FallOutObject[0] = CreateObject(1649, -1740.44092, 845.66888, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[1] = CreateObject(1649, -1737.18042, 845.63318, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[2] = CreateObject(1649, -1740.48816, 841.32959, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[3] = CreateObject(1649, -1737.22803, 841.29327, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[4] = CreateObject(1649, -1743.76868, 841.38629, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[5] = CreateObject(1649, -1743.70081, 845.68628, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[6] = CreateObject(1649, -1743.67358, 850.00671, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[7] = CreateObject(1649, -1740.37341, 849.96948, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[8] = CreateObject(1649, -1737.11243, 849.93317, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[9] = CreateObject(1649, -1733.85181, 849.89679, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[10] = CreateObject(1649, -1733.93787, 845.51715, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[11] = CreateObject(1649, -1733.96399, 841.24866, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[12] = CreateObject(1649, -1730.74585, 841.14685, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[13] = CreateObject(1649, -1730.63953, 845.54553, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[14] = CreateObject(1649, -1730.59717, 849.84680, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[15] = CreateObject(1649, -1743.81250, 837.06433, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[16] = CreateObject(1649, -1740.53174, 837.00037, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[17] = CreateObject(1649, -1737.23096, 836.97479, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[18] = CreateObject(1649, -1734.09045, 836.91614, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[19] = CreateObject(1649, -1730.79199, 836.81165, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[20] = CreateObject(1649, -1747.12341, 837.09131, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[21] = CreateObject(1649, -1747.06689, 841.43445, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[22] = CreateObject(1649, -1747.01526, 845.75745, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[23] = CreateObject(1649, -1746.95740, 849.99884, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[24] = CreateObject(1649, -1730.82996, 832.48993, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[25] = CreateObject(1649, -1734.09753, 832.52924, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[26] = CreateObject(1649, -1737.34229, 832.58447, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[27] = CreateObject(1649, -1740.63342, 832.60742, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[28] = CreateObject(1649, -1743.83813, 832.65540, 428.79611, -90.00000, 0.00000, -90.60000);
- FallOutObject[29] = CreateObject(1649, -1747.13342, 832.65881, 428.79611, -90.00000, 0.00000, -90.60000);
- }
- stock destroyGlass()
- {
- for(new i = 0; i < 30; i++)
- {
- if(IsValidObject(FallOutObject[NextFalloutObject])) DestroyObject(FallOutObject[NextFalloutObject]);
- }
- KillTimer(FalloutTimer);
- KillTimer(FalloutDestroyTimer);
- DestroyObject(FallOutObject[0]);
- DestroyObject(FallOutObject[1]);
- DestroyObject(FallOutObject[2]);
- DestroyObject(FallOutObject[3]);
- DestroyObject(FallOutObject[4]);
- DestroyObject(FallOutObject[5]);
- DestroyObject(FallOutObject[6]);
- DestroyObject(FallOutObject[7]);
- DestroyObject(FallOutObject[8]);
- DestroyObject(FallOutObject[9]);
- DestroyObject(FallOutObject[10]);
- DestroyObject(FallOutObject[11]);
- DestroyObject(FallOutObject[12]);
- DestroyObject(FallOutObject[13]);
- DestroyObject(FallOutObject[14]);
- DestroyObject(FallOutObject[15]);
- DestroyObject(FallOutObject[16]);
- DestroyObject(FallOutObject[17]);
- DestroyObject(FallOutObject[18]);
- DestroyObject(FallOutObject[19]);
- DestroyObject(FallOutObject[20]);
- DestroyObject(FallOutObject[21]);
- DestroyObject(FallOutObject[22]);
- DestroyObject(FallOutObject[23]);
- DestroyObject(FallOutObject[24]);
- DestroyObject(FallOutObject[25]);
- DestroyObject(FallOutObject[26]);
- DestroyObject(FallOutObject[27]);
- DestroyObject(FallOutObject[28]);
- DestroyObject(FallOutObject[29]);
- }
- forward Hodinyx(playerid);
- public Hodinyx(playerid)
- {
- return Hodin[playerid];
- }
- forward AntiDerbyHeal(vehicleid, playerid);
- public AntiDerbyHeal(vehicleid, playerid)
- {
- new Float:DamageHealth;
- GetPlayerVehicleID(playerid);
- {
- if(Event[playerid] == 1)
- {
- if(EventDerbyPripojen[playerid] == true)
- {
- if(GetVehicleHealth(495, DamageHealth))
- {
- if(DamageHealth <= 991)
- {
- new EString[500];
- format(EString,sizeof(EString),"{00AAFF}%s "sc"%s{00AAFF} byl vykázán z {FFFF00}Derby{00AAFF}! {FF0000}[ Oprava Vozidla ]", LevelChat(playerid),Jmeno(playerid));
- SendClientMessageToAll(0x7700FFFF,EString);
- SetPlayerHealth(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- InEvent[playerid] = 0;
- HRACIEVENT[playerid]--;
- NactiPoziceZbrane(playerid);
- TextDrawHideForPlayer(playerid,HRACINAEVENTU);
- }
- }
- }
- }
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- stock DeatmatchTextdraw(playerid)
- {
- new string3[150],string4[150];
- //---------------------------------------------
- format(string3, sizeof(string3), "~y~Nazev: ~h~~r~Deatmatch");
- TextDrawSetString(Textdraw11, string3);
- format(string4, sizeof(string4), "~y~Misto: ~h~~r~/port");
- TextDrawSetString(Textdraw9, string4);
- format(string4, sizeof(string4), "~y~Odmena: ~h~~r~500.000~g~$ +~y~25 ~r~BODU");
- TextDrawSetString(Textdraw12, string4);
- format(string4, sizeof(string4), "~y~Deatmatch ~w~na >~r~/port ~w~<");
- TextDrawSetString(zann, string4);
- //------------------------------------------------------------
- TextDrawShowForPlayer(playerid, Textdraw11);
- TextDrawShowForPlayer(playerid, Textdraw9);
- TextDrawShowForPlayer(playerid, Textdraw12);
- TextDrawShowForPlayer(playerid, Textdraw7);
- TextDrawShowForPlayer(playerid, zann);
- return 1;
- }
- stock KopecTextdraw(playerid)
- {
- new string3[150],string4[150];
- //---------------------------------------------
- format(string3, sizeof(string3), "~y~Nazev: ~h~~r~KopecSmrti");
- TextDrawSetString(Textdraw11, string3);
- format(string4, sizeof(string4), "~y~Misto: ~h~~r~/port");
- TextDrawSetString(Textdraw9, string4);
- format(string4, sizeof(string4), "~y~Odmena: ~h~~r~500.000~g~$ +~y~25 ~r~BODU");
- TextDrawSetString(Textdraw12, string4);
- format(string4, sizeof(string4), "~y~Kopec smrti ~w~na >~r~/port ~w~<");
- TextDrawSetString(zann, string4);
- //------------------------------------------------------------
- TextDrawShowForPlayer(playerid, Textdraw11);
- TextDrawShowForPlayer(playerid, Textdraw9);
- TextDrawShowForPlayer(playerid, Textdraw12);
- TextDrawShowForPlayer(playerid, Textdraw7);
- TextDrawShowForPlayer(playerid, zann);
- return 1;
- }
- stock FalloutTextdraw(playerid)
- {
- new string3[150],string4[150];
- //---------------------------------------------
- format(string3, sizeof(string3), "~y~Nazev: ~h~~r~Fallout");
- TextDrawSetString(Textdraw11, string3);
- format(string4, sizeof(string4), "~y~Misto: ~h~~r~/port");
- TextDrawSetString(Textdraw9, string4);
- format(string4, sizeof(string4), "~y~Odmena: ~h~~r~500.000~g~$ +~y~25 ~r~BODU");
- TextDrawSetString(Textdraw12, string4);
- format(string4, sizeof(string4), "~y~Fallout ~w~na >~r~/port ~w~<");
- TextDrawSetString(zann, string4);
- //------------------------------------------------------------
- TextDrawShowForPlayer(playerid, Textdraw11);
- TextDrawShowForPlayer(playerid, Textdraw9);
- TextDrawShowForPlayer(playerid, Textdraw12);
- TextDrawShowForPlayer(playerid, Textdraw7);
- TextDrawShowForPlayer(playerid, zann);
- return 1;
- }
- stock TuningTextdraw(playerid)
- {
- new string3[150],string4[150];
- //---------------------------------------------
- format(string3, sizeof(string3), "~y~Nazev: ~h~~r~TuningSraz");
- TextDrawSetString(Textdraw11, string3);
- format(string4, sizeof(string4), "~y~Misto: ~h~~r~/port");
- TextDrawSetString(Textdraw9, string4);
- format(string4, sizeof(string4), "~y~Odmena: ~h~~r~500.000~g~$ +~y~25 ~r~BODU");
- TextDrawSetString(Textdraw12, string4);
- format(string4, sizeof(string4), "~y~TuningSraz ~w~na >~r~/port ~w~<");
- TextDrawSetString(zann, string4);
- //------------------------------------------------------------
- TextDrawShowForPlayer(playerid, Textdraw11);
- TextDrawShowForPlayer(playerid, Textdraw9);
- TextDrawShowForPlayer(playerid, Textdraw12);
- TextDrawShowForPlayer(playerid, Textdraw7);
- TextDrawShowForPlayer(playerid, zann);
- return 1;
- }
- stock DerbyTextdraw(playerid)
- {
- new string3[150],string4[150];
- //---------------------------------------------
- format(string3, sizeof(string3), "~y~Nazev: ~h~~r~Derby");
- TextDrawSetString(Textdraw11, string3);
- format(string4, sizeof(string4), "~y~Misto: ~h~~r~/port");
- TextDrawSetString(Textdraw9, string4);
- format(string4, sizeof(string4), "~y~Odmena: ~h~~r~500.000~g~$ +~y~25 ~r~BODU");
- TextDrawSetString(Textdraw12, string4);
- format(string4, sizeof(string4), "~y~Derby ~w~na >~r~/port ~w~<");
- TextDrawSetString(zann, string4);
- //------------------------------------------------------------
- TextDrawShowForPlayer(playerid, Textdraw11);
- TextDrawShowForPlayer(playerid, Textdraw9);
- TextDrawShowForPlayer(playerid, Textdraw12);
- TextDrawShowForPlayer(playerid, Textdraw7);
- TextDrawShowForPlayer(playerid, zann);
- return 1;
- }
- //------------------------------------------------------------------------------
- stock Datum(timestamp)
- {
- new year=1970, day=0, month=0, hour=0, mins=0;
- new days_of_month[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
- new returnstring[32];
- if(timestamp == 0)
- {
- format(returnstring, sizeof(returnstring), "%s", "{FF0000}Permanentí");
- return returnstring;
- }
- while(timestamp > 31622400)
- {
- timestamp -= 31536000;
- if(((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0) ) timestamp -= 86400;
- year++;
- }
- if(((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) days_of_month[1] = 29;
- else days_of_month[1] = 28;
- while(timestamp > 86400)
- {
- timestamp -= 86400, day++;
- if(day == days_of_month[month]) day=0, month++;
- }
- while(timestamp > 60)
- {
- timestamp -= 60, mins++;
- if(mins == 60) mins=0, hour++;
- }
- format(returnstring, 31, "%02d.%02d.%d %02d:%02d", day+1, month+1, year, hour, mins);
- return returnstring;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement