Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <dudb>
- #include <gl_common>
- #define MAX_PLAYERS_EX MAX_PLAYERS
- #define MAX_VEHICLES_EX MAX_VEHICLES
- #pragma tabsize 0
- #define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
- #if !defined isnull
- #define isnull(%1) \
- ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
- #endif
- new PLAYERLIST_authed[MAX_PLAYERS];
- new AdminLevel[MAX_PLAYERS];
- new veh[MAX_PLAYERS];
- new dm[MAX_PLAYERS];
- new Odpocet;
- forward OdpocetS();
- // 1
- // 2
- #define D_Commands 3
- #define D_ClickPlayer 4
- #define D_ClickPlayer_Penize 5
- #define D_ClickPlayer_Zprava 6
- #define D_Radio 7
- #define D_Weapons 8
- #define D_Pravidla 9
- #define D_ACommands 10
- #define D_Loterie 11
- #define D_SinSlavy 12
- // 13
- // 14
- // 15
- new Loto_Cislo[MAX_PLAYERS];
- forward Loto();
- new pDrunkLevelLast[MAX_PLAYERS];
- new pFPS[MAX_PLAYERS];
- new ClickPlayer[MAX_PLAYERS];
- new Float:RandomSpawn[][4] =
- {
- {-1977.2421,883.2938,45.2031,86.9292},
- {-1981.2690,1187.8273,45.4453,175.2891},
- {-2181.7217,1008.4358,80.0000,359.4662},
- {-2465.3218,791.8402,35.1719,357.8995},
- {-2593.3662,327.7408,4.5478,92.5505},
- {-2518.4299,-6.8110,25.6172,268.0189},
- {-2233.8013,-198.2429,35.3228,359.1998},
- {-2027.4506,-51.8560,35.3724,178.7181},
- {-1982.6265,137.9619,27.6875,88.5005},
- {-1717.2699,42.6675,3.5547,129.8843}
- };
- new Kill[MAX_PLAYERS];
- new Respekt[MAX_PLAYERS];
- new Killed[MAX_PLAYERS];
- new Text:ZUR[MAX_PLAYERS];
- new Text:TimeName;
- new Text:ModeName;
- new Text:ModeName2;
- new Text:txtTimeDisp;
- new hour, minute;
- new timestr[32];
- new fine_weather_ids[] = {1,2,3,4,5,6,7,12,13,14,15,17,18,24,25,26,27,28,29,30,40};
- new foggy_weather_ids[] = {9,19,20,31,32};
- new wet_weather_ids[] = {8};
- new total_vehicles_from_files=0;
- stock UpdateWorldWeather()
- {
- new next_weather_prob = random(100);
- if(next_weather_prob < 70) SetWeather(fine_weather_ids[random(sizeof(fine_weather_ids))]);
- else if(next_weather_prob < 95) SetWeather(foggy_weather_ids[random(sizeof(foggy_weather_ids))]);
- else SetWeather(wet_weather_ids[random(sizeof(wet_weather_ids))]);
- }
- forward UpdateTimeAndWeather();
- new FortunaPickup;
- new ExitFortunaPickup;
- new LoterieFortunaPickup;
- new AmmunitionPickup;
- new ExitAmmunitionPickup;
- new OneAmmunitionPickup;
- main()
- {
- print("\n----------------------------------");
- print(" Blank Gamemode by your name here");
- print("----------------------------------\n");
- }
- #define MAX_HOUSES 100
- #define HOUSE_DIALOG 13
- #define CAR_DIALOG 14
- #define VEHICLE_DIALOG 15
- #define HaveNotMoney(%1,%2) if(GetPlayerMoney(%1) < %2) return SendClientMessage(%1,0xFFFFFFFF,"Nemáš dostatok peňazí !")
- enum HOUSE_DATA
- {
- Float:p_X,
- Float:p_Y,
- Float:p_Z,
- Float:i_X,
- Float:i_Y,
- Float:i_Z,
- iin,
- Cena,
- Vlastnik[MAX_PLAYER_NAME],
- Text3D:Text,
- Pickup,
- VW,
- Zamek,
- Float:v_X,
- Float:v_Y,
- Float:v_Z,
- Float:v_A,
- vModel,
- Color1,
- Color2,
- Paintjob,
- Vehicle,
- Vmod[17]
- }
- new HouseInfo[MAX_HOUSES][HOUSE_DATA];
- new InHouse[MAX_PLAYERS] = {-1,...};
- new HouseCount = -1;
- new bool:DialogShowed[MAX_PLAYERS];
- new spoiler[20][0] = {
- {1000},
- {1001},
- {1002},
- {1003},
- {1014},
- {1015},
- {1016},
- {1023},
- {1058},
- {1060},
- {1049},
- {1050},
- {1138},
- {1139},
- {1146},
- {1147},
- {1158},
- {1162},
- {1163},
- {1164}
- };
- new nitro[3][0] = {
- {1008},
- {1009},
- {1010}
- };
- new fbumper[23][0] = {
- {1117},
- {1152},
- {1153},
- {1155},
- {1157},
- {1160},
- {1165},
- {1167},
- {1169},
- {1170},
- {1171},
- {1172},
- {1173},
- {1174},
- {1175},
- {1179},
- {1181},
- {1182},
- {1185},
- {1188},
- {1189},
- {1192},
- {1193}
- };
- new rbumper[22][0] = {
- {1140},
- {1141},
- {1148},
- {1149},
- {1150},
- {1151},
- {1154},
- {1156},
- {1159},
- {1161},
- {1166},
- {1168},
- {1176},
- {1177},
- {1178},
- {1180},
- {1183},
- {1184},
- {1186},
- {1187},
- {1190},
- {1191}
- };
- new exhaust[28][0] = {
- {1018},
- {1019},
- {1020},
- {1021},
- {1022},
- {1028},
- {1029},
- {1037},
- {1043},
- {1044},
- {1045},
- {1046},
- {1059},
- {1064},
- {1065},
- {1066},
- {1089},
- {1092},
- {1104},
- {1105},
- {1113},
- {1114},
- {1126},
- {1127},
- {1129},
- {1132},
- {1135},
- {1136}
- };
- new bventr[2][0] = {
- {1042},
- {1044}
- };
- new bventl[2][0] = {
- {1043},
- {1045}
- };
- new bscoop[4][0] = {
- {1004},
- {1005},
- {1011},
- {1012}
- };
- new rscoop[13][0] = {
- {1006},
- {1032},
- {1033},
- {1035},
- {1038},
- {1053},
- {1054},
- {1055},
- {1061},
- {1067},
- {1068},
- {1088},
- {1091}
- };
- new lskirt[21][0] = {
- {1007},
- {1026},
- {1031},
- {1036},
- {1039},
- {1042},
- {1047},
- {1048},
- {1056},
- {1057},
- {1069},
- {1070},
- {1090},
- {1093},
- {1106},
- {1108},
- {1118},
- {1119},
- {1133},
- {1122},
- {1134}
- };
- new rskirt[21][0] = {
- {1017},
- {1027},
- {1030},
- {1040},
- {1041},
- {1051},
- {1052},
- {1062},
- {1063},
- {1071},
- {1072},
- {1094},
- {1095},
- {1099},
- {1101},
- {1102},
- {1107},
- {1120},
- {1121},
- {1124},
- {1137}
- };
- new hydraulics[1][0] = {
- {1087}
- };
- new base[1][0] = {
- {1086}
- };
- new rbbars[2][0] = {
- {1109},
- {1110}
- };
- new fbbars[2][0] = {
- {1115},
- {1116}
- };
- new wheels[17][0] = {
- {1025},
- {1073},
- {1074},
- {1075},
- {1076},
- {1077},
- {1078},
- {1079},
- {1080},
- {1081},
- {1082},
- {1083},
- {1084},
- {1085},
- {1096},
- {1097},
- {1098}
- };
- new lights[2][0] = {
- {1013},
- {1024}
- };
- forward GetPlayerDistanceToPointEx(playerid,Float:x,Float:y,Float:z);
- forward IsPlayerInSphere(playerid,Float:x,Float:y,Float:z,radius);
- forward AddHouse(Float:pX, Float:pY, Float:pZ, Float:iX, Float:iY, Float:iZ,ii,Float:vX,Float:vY,Float:vZ,Float:vA, Cenik);
- public AddHouse(Float:pX, Float:pY, Float:pZ, Float:iX, Float:iY, Float:iZ,ii,Float:vX,Float:vY,Float:vZ,Float:vA, Cenik)
- {
- HouseCount ++;
- if(HouseCount < MAX_HOUSES)
- {
- if(HouseCount == 0){
- for(new i; i<MAX_HOUSES;i++){
- HouseInfo[i][Vehicle] = -1;
- }
- }
- HouseInfo[HouseCount][p_X] = pX;
- HouseInfo[HouseCount][p_Y] = pY;
- HouseInfo[HouseCount][p_Z] = pZ;
- HouseInfo[HouseCount][i_X] = iX;
- HouseInfo[HouseCount][i_Y] = iY;
- HouseInfo[HouseCount][i_Z] = iZ;
- HouseInfo[HouseCount][iin] = ii;
- HouseInfo[HouseCount][Cena] = Cenik;
- HouseInfo[HouseCount][VW] = 2+HouseCount;
- HouseInfo[HouseCount][Vlastnik] = 0;
- HouseInfo[HouseCount][Zamek] = 0;
- HouseInfo[HouseCount][v_X] = vX;
- HouseInfo[HouseCount][v_Y] = vY;
- HouseInfo[HouseCount][v_Z] = vZ;
- HouseInfo[HouseCount][v_A] = vA;
- new s[128];
- format(s,128,"Houses/House%d.txt",HouseCount);
- if(!fexist(s)){
- dini_Create(s);
- dini_Set(s,"Owner","none");
- dini_IntSet(s,"Locked",0);
- dini_IntSet(s,"Auto",0);
- dini_IntSet(s,"Vehicle",0);
- dini_IntSet(s,"Color1",0);
- dini_IntSet(s,"Color2",0);
- dini_IntSet(s,"Paintjob",-1);
- dini_IntSet(s,"Tuning1",0);
- dini_IntSet(s,"Tuning2",0);
- dini_IntSet(s,"Tuning3",0);
- dini_IntSet(s,"Tuning4",0);
- dini_IntSet(s,"Tuning5",0);
- dini_IntSet(s,"Tuning6",0);
- dini_IntSet(s,"Tuning7",0);
- dini_IntSet(s,"Tuning8",0);
- dini_IntSet(s,"Tuning9",0);
- dini_IntSet(s,"Tuning10",0);
- dini_IntSet(s,"Tuning11",0);
- dini_IntSet(s,"Tuning12",0);
- dini_IntSet(s,"Tuning13",0);
- dini_IntSet(s,"Tuning14",0);
- dini_IntSet(s,"Tuning15",0);
- dini_IntSet(s,"Tuning16",0);
- dini_IntSet(s,"Tuning17",0);
- }
- new sx[100];
- if(strcmp(dini_Get(s,"Owner"),"none",true) == 0){
- format(HouseInfo[HouseCount][Vlastnik],MAX_PLAYER_NAME,"Nikto");
- HouseInfo[HouseCount][Zamek] = 0;
- HouseInfo[HouseCount][Pickup] = CreatePickup(1273,1,pX, pY, pZ);
- format(sx,100,"Dům č.%d\r\nMajitel: Nikdo\r\nCena: %d",HouseCount,Cenik);
- HouseInfo[HouseCount][Text] = Create3DTextLabel(sx,0xFF0000FF,pX,pY,pZ+1,50,0);
- }else{
- HouseInfo[HouseCount][Pickup] = CreatePickup(1272,1,pX, pY, pZ);
- format(HouseInfo[HouseCount][Vlastnik],MAX_PLAYER_NAME,"%s",dini_Get(s,"Owner"));
- HouseInfo[HouseCount][Zamek] = dini_Int(s,"Locked");
- if(dini_Int(s,"Auto") == 1){
- HouseInfo[HouseCount][Color1]=dini_Int(s,"Color1");
- HouseInfo[HouseCount][Color2]=dini_Int(s,"Color2");
- HouseInfo[HouseCount][Paintjob]=dini_Int(s,"Paintjob");
- HouseInfo[HouseCount][Vmod][0]=dini_Int(s,"Tuning1");
- HouseInfo[HouseCount][Vmod][1]=dini_Int(s,"Tuning2");
- HouseInfo[HouseCount][Vmod][2]=dini_Int(s,"Tuning3");
- HouseInfo[HouseCount][Vmod][3]=dini_Int(s,"Tuning4");
- HouseInfo[HouseCount][Vmod][4]=dini_Int(s,"Tuning5");
- HouseInfo[HouseCount][Vmod][5]=dini_Int(s,"Tuning6");
- HouseInfo[HouseCount][Vmod][6]=dini_Int(s,"Tuning7");
- HouseInfo[HouseCount][Vmod][7]=dini_Int(s,"Tuning8");
- HouseInfo[HouseCount][Vmod][8]=dini_Int(s,"Tuning9");
- HouseInfo[HouseCount][Vmod][9]=dini_Int(s,"Tuning10");
- HouseInfo[HouseCount][Vmod][10]=dini_Int(s,"Tuning11");
- HouseInfo[HouseCount][Vmod][11]=dini_Int(s,"Tuning12");
- HouseInfo[HouseCount][Vmod][12]=dini_Int(s,"Tuning13");
- HouseInfo[HouseCount][Vmod][13]=dini_Int(s,"Tuning14");
- HouseInfo[HouseCount][Vmod][14]=dini_Int(s,"Tuning15");
- HouseInfo[HouseCount][Vmod][15]=dini_Int(s,"Tuning16");
- HouseInfo[HouseCount][Vmod][16]=dini_Int(s,"Tuning17");
- HouseInfo[HouseCount][Vehicle] = CreateVehicle(dini_Int(s,"Vehicle"),vX,vY,vZ,vA,HouseInfo[HouseCount][Color1],HouseInfo[HouseCount][Color2],-1);
- TuneThisCar(HouseCount,HouseInfo[HouseCount][Vehicle]);
- printf("=====================\r\n%d",HouseInfo[HouseCount][Vehicle]);
- }
- format(sx,100,"Dům č.%d\r\nMajitel: %s",HouseCount,dini_Get(s,"Owner"));
- HouseInfo[HouseCount][Text] = Create3DTextLabel(sx,0xFF0000FF,pX,pY,pZ+1,50,0);
- }
- printf("Dom %d Vytvorený",HouseCount);
- }else{
- print("<!-- Prekročili ste max. počet domov, dom nebol vytvorený !-->");
- print("<!-- Prekročili ste max. počet domov, dom nebol vytvorený !-->");
- print("<!-- Prekročili ste max. počet domov, dom nebol vytvorený !-->");
- }
- return 1;
- }
- public OnGameModeInit()
- {
- SetGameModeText("Kill or be Killed");
- DisableInteriorEnterExits();
- UsePlayerPedAnims();
- for(new i=0;i<MAX_VEHICLES;i++) {
- SetVehicleNumberPlate(i, "KobK");
- }
- FortunaPickup = CreatePickup(1239, 1, -2156.1958, 151.2136, 35.3203, 0);
- ExitFortunaPickup = CreatePickup(1239, 1, 834.3804, 7.4337, 1004.1870, 0);
- LoterieFortunaPickup = CreatePickup(1212, 1, 822.4749, 1.8655, 1004.1797, 0);
- Create3DTextLabel("Vstup do\n{FF0000}Fortuny", 0xFFFFFFAA, -2156.1958, 151.2136, 35.3203, 40.0, 0, 0);
- Create3DTextLabel("Vychod z\n{FF0000}Fortuny", 0xFFFFFFAA, 834.3804, 7.4337, 1004.1870, 40.0, 0, 0);
- Create3DTextLabel("Loterie", 0xFF0000AA, 822.4749, 1.8655, 1004.1797, 40.0, 0, 0);
- AmmunitionPickup = CreatePickup(1239, 1, -2051.9497, 555.4014, 35.1719, 0);
- ExitAmmunitionPickup = CreatePickup(1239, 1, 315.7190, -143.1917, 999.6016, 0);
- OneAmmunitionPickup = CreatePickup(2061, 1, 314.1212, -133.1166, 999.6016, 0);
- Create3DTextLabel("Vstup do\n{FF0000}Ammunition", 0xFFFFFFAA, -2051.9497, 555.4014, 35.1719, 40.0, 0, 0);
- Create3DTextLabel("Vychod z\n{FF0000}Ammunition", 0xFFFFFFAA, 315.7190, -143.1917, 999.6016, 40.0, 0, 0);
- Create3DTextLabel("Ammunition Balíček", 0xFF0000AA, 314.1212, -133.1166, 999.6016, 40.0, 0, 0);
- AddPlayerClass(4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(177, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(141, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
- // AddHouse(x,y,z,xi,yi,zi,ii,xv,yv,zv,vv, cena);
- // Levné domy.
- AddHouse(-2014.6338,897.4714,45.4453,2807.619873,-1171.899902,1025.570312,8,-2011.6630,888.6288,45.4783,1.2342,450000);
- AddHouse(-2017.1914,849.2830,45.4453,2807.619873,-1171.899902,1025.570312,8,-2011.6198,857.9726,45.4787,179.1022,450000);
- AddHouse(-2017.2177,832.0926,45.4453,2807.619873,-1171.899902,1025.570312,8,-2011.5889,839.0927,45.4641,179.4774,450000);
- AddHouse(-2017.2854,865.6391,45.4453,2807.619873,-1171.899902,1025.570312,8,-2011.8127,872.3675,45.4716,179.2538,450000);
- AddHouse(-2017.2017,784.6005,45.4453,2807.619873,-1171.899902,1025.570312,8,-2012.0509,778.5232,45.1619,1.4071,450000);
- AddHouse(-2017.0026,766.4005,45.4453,2807.619873,-1171.899902,1025.570312,8,-2011.8623,758.5705,45.1608,0.3614,450000);
- // Dražší vily.
- AddHouse(-2722.2429,923.9252,67.5938,225.630997,1022.479980,1084.069946,7,-2732.1931,902.2782,67.3412,148.4360,1600000);
- // SPECIAL
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/trains.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/pilots.txt");
- // LAS VENTURAS
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_law.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_airport.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/lv_gen.txt");
- // SAN FIERRO
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_law.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_airport.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/sf_gen.txt");
- // LOS SANTOS
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_law.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_airport.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_gen_inner.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/ls_gen_outer.txt");
- // OTHER AREAS
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/whetstone.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/bone.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/flint.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/tierra.txt");
- total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/red_county.txt");
- printf("Total vehicles from files: %d",total_vehicles_from_files);
- UpdateTimeAndWeather();
- SetTimer("UpdateTimeAndWeather",1000 * 60,1);
- SetTimer("UpdateAll", 1000, true);
- SetTimer("Loto", 60000*5, 1);
- TextDraws();
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public Loto(){
- new lotocislo1 = 1 + random(20), lotocislo2 = 1 + random(20), lotocislo3 = 1 + random(20), str[150];
- for(new i=0; i< GetMaxPlayers(); i++){
- if(IsPlayerConnected(i) && Loto_Cislo[i] > 0){
- if(Loto_Cislo[i] == lotocislo1){
- SendClientMessage(i, 0xFF9933AA, "V loterii jsi zadal první vylosované číslo a vyhrál jsi {FF0000}JACKPOT{FF9933} {33AA33}$1000000{FF9933} +10 respect.");
- Loto_Cislo[i] = 0;
- GivePlayerMoney(i, 1000000);
- Respekt[i] += 10;
- }
- if(Loto_Cislo[i] == lotocislo2){
- SendClientMessage(i, 0xFF9933AA, "V loterii jsi zadal druhé vylosované číslo a vyhrál jsi {33AA33}$10000{FF9933} +5 respect.");
- Loto_Cislo[i] = 0;
- GivePlayerMoney(i, 10000);
- Respekt[i] += 5;
- }
- if(Loto_Cislo[i] == lotocislo3){
- SendClientMessage(i, 0xFF9933AA, "V loterii jsi zadal třetí vylosované číslo a vyhrál jsi {33AA33}$1000{FF9933} +2 respect.");
- Loto_Cislo[i] = 0;
- GivePlayerMoney(i, 1000);
- Respekt[i] += 2;
- }else{
- SendClientMessage(i, 0xFF9933AA, "V loterii bohužel nevylosovali tvé číslo, nic jsi nevyhrál.");
- Loto_Cislo[i] = 0;
- }
- }
- }
- format(str, 150, "V loterii byla vylosována tato čísla: {FFFFFF}%d{FF9933}, {FFFFFF}%d{FF9933}, {FFFFFF}%d{FF9933}!", lotocislo1, lotocislo2, lotocislo3);
- SendClientMessageToAll(0xFF9933AA, str);
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerInterior(playerid, 2);
- SetPlayerPos(playerid, 2243.6670,-1077.6992,1049.0234);
- SetPlayerCameraPos(playerid, 2241.4524,-1076.0842,1049.0310);
- SetPlayerCameraLookAt(playerid, 2243.6670,-1077.6992,1049.0234);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- new string[128];
- format(string, sizeof(string), "Hráč {FF0000}%s{FFFFFF} se připojil na server.", Jmeno(playerid));
- SendClientMessageToAll(0xFFFFFFAA, string);
- Kill[playerid] = 0;
- Killed[playerid] = 0;
- pFPS[playerid] = 0;
- Respekt[playerid] = 0;
- dm[playerid] = 0;
- gettime(hour, minute);
- SetPlayerTime(playerid,hour,minute);
- PLAYERLIST_authed[playerid] = false;
- if (!PLAYERLIST_authed[playerid])
- {
- if(udb_Exists(Jmeno(playerid)))
- {
- ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"KobK","{FFFFFF}Vítej zpět na {33AA33}Kill{FFFFFF} or be {FF0000}Killed{FFFFFF}!\nNapiš své heslo které si uvedl při registraci.","Použít","Odpojit se");
- } else {
- ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"KobK","{FFFFFF}Vítej na {33AA33}Kill{FFFFFF} or be {FF0000}Killed{FFFFFF}\nZaregistruj se, napiš heslo které si budeš pamatovat.","Použít","Odpojit se");
- }
- }
- SetPlayerMapIcon(playerid, 0, -2156.1958, 151.2136, 35.3203, 25, 0, MAPICON_LOCAL); // Fortuna.
- SetPlayerMapIcon(playerid, 1, -2051.9497, 555.4014, 35.1719, 6, 0, MAPICON_LOCAL); // Ammunition.
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new string[128];
- format(string, sizeof(string), "Hráč {FF0000}%s{FFFFFF} se odpojil ze serveru.", Jmeno(playerid));
- SendClientMessageToAll(0xFFFFFFAA, string);
- TextDrawHideForPlayer(playerid,ModeName);
- TextDrawHideForPlayer(playerid,TimeName);
- if (PLAYERLIST_authed[playerid])
- {
- new Float:hp;
- GetPlayerHealth(playerid,hp);
- new Float:am;
- GetPlayerArmour(playerid,am);
- dUserSetINT(Jmeno(playerid)).("Health", floatround(hp));
- dUserSetINT(Jmeno(playerid)).("Armour", floatround(am));
- dUserSetINT(Jmeno(playerid)).("Money",GetPlayerMoney(playerid));
- dUserSetINT(Jmeno(playerid)).("Kills",Kill[playerid]);
- dUserSetINT(Jmeno(playerid)).("Deaths",Killed[playerid]);
- dUserSetINT(Jmeno(playerid)).("Respect",Respekt[playerid]);
- dUserSetINT(Jmeno(playerid)).("AdminLevel",AdminLevel[playerid]);
- }
- PLAYERLIST_authed[playerid] = false;
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- SetPlayerInterior(playerid, 0);
- TextDrawShowForPlayer(playerid,txtTimeDisp);
- TextDrawShowForPlayer(playerid,TimeName);
- TextDrawShowForPlayer(playerid,ModeName);
- gettime(hour, minute);
- SetPlayerTime(playerid,hour,minute);
- new rand = random(sizeof(RandomSpawn));
- SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);
- SetPlayerFacingAngle(playerid, RandomSpawn[rand][3]);
- GivePlayerWeapon(playerid, 26, 9998);
- if(dm[playerid] == 1){
- SetPlayerVirtualWorld(playerid,1);
- SetPlayerPos(playerid,-1862.5531,668.0342,81.3984);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 26, 9998);
- }
- if(dm[playerid] == 2){
- SetPlayerVirtualWorld(playerid,2);
- SetPlayerPos(playerid,-1417.4907,397.4567,30.0859);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 27, 9998);
- }
- if(dm[playerid] == 3){
- SetPlayerVirtualWorld(playerid,3);
- SetPlayerPos(playerid,-2048.1331,565.9178,35.0156);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 26, 9998);
- SetPlayerArmour(playerid, 100);
- }
- if(dm[playerid] == 4){
- SetPlayerVirtualWorld(playerid,4);
- SetPlayerPos(playerid,-2763.6677,-296.2934,7.0391);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 25, 9998);
- GivePlayerWeapon(playerid, 24, 9998);
- }
- UpdatePlayer(playerid);
- return 1;
- }
- public UpdateTimeAndWeather()
- {
- gettime(hour, minute);
- format(timestr,32,"~w~%02d~r~:~w~%02d",hour,minute);
- TextDrawSetString(txtTimeDisp,timestr);
- SetWorldTime(hour);
- new x=0;
- while(x!=MAX_PLAYERS) {
- if(IsPlayerConnected(x) && GetPlayerState(x) != PLAYER_STATE_NONE) {
- SetPlayerTime(x,hour,minute);
- }
- x++;
- }
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- SendDeathMessage(killerid, playerid, reason);
- Kill[killerid]++;
- Killed[playerid]++;
- TextDrawHideForPlayer(playerid,txtTimeDisp);
- // Pro všechny.
- new string[256];
- format(string, sizeof(string), "[Kill] Hráč {33AA33}%s{FFFFFF} zabil hráče {FF0000}%s{FFFFFF} +5 respekt pro hráče {33AA33}%s{FFFFFF}.", Jmeno(killerid), Jmeno(playerid), Jmeno(killerid));
- SendClientMessageToAll(0xFFFFFFAA,string);
- // Dá hráči za zabití.
- GivePlayerMoney(killerid,1000);
- GameTextForPlayer(killerid, "~w~+~g~$1000", 3000, 1);
- Respekt[killerid] += 5;
- new playercash;
- if(killerid == INVALID_PLAYER_ID) {
- ResetPlayerMoney(playerid);
- } else {
- playercash = GetPlayerMoney(playerid);
- if(playercash > 0) {
- GivePlayerMoney(killerid, playercash);
- ResetPlayerMoney(playerid);
- }
- }
- new wanted;
- wanted = GetPlayerWantedLevel(killerid);
- SetPlayerWantedLevel(killerid,wanted+1);
- UpdatePlayer(playerid);
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid){
- for(new i; i < HouseCount+1;i++){
- if(HouseInfo[i][Vehicle] == vehicleid){
- new s[128];
- format(s,128,"Houses/House%d.txt",i);
- DestroyVehicle(HouseInfo[i][Vehicle]);
- dini_IntSet(s,"Auto",0);
- dini_IntSet(s,"Vehicle",0);
- dini_IntSet(s,"Color1",0);
- dini_IntSet(s,"Color2",0);
- dini_IntSet(s,"Paintjob",-1);
- dini_IntSet(s,"Tuning1",0);
- dini_IntSet(s,"Tuning2",0);
- dini_IntSet(s,"Tuning3",0);
- dini_IntSet(s,"Tuning4",0);
- dini_IntSet(s,"Tuning5",0);
- dini_IntSet(s,"Tuning6",0);
- dini_IntSet(s,"Tuning7",0);
- dini_IntSet(s,"Tuning8",0);
- dini_IntSet(s,"Tuning9",0);
- dini_IntSet(s,"Tuning10",0);
- dini_IntSet(s,"Tuning11",0);
- dini_IntSet(s,"Tuning12",0);
- dini_IntSet(s,"Tuning13",0);
- dini_IntSet(s,"Tuning14",0);
- dini_IntSet(s,"Tuning15",0);
- dini_IntSet(s,"Tuning16",0);
- dini_IntSet(s,"Tuning17",0);
- HouseInfo[i][Vehicle] = -1;
- }
- }
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/mycommand", cmdtext, true, 10) == 0)
- {
- // Do something here
- return 1;
- }
- dcmd(help,4,cmdtext);
- dcmd(informace,9,cmdtext);
- dcmd(radio,5,cmdtext);
- dcmd(kill,4,cmdtext);
- dcmd(lock,4,cmdtext);
- dcmd(unlock,6,cmdtext);
- dcmd(pravidla,8,cmdtext);
- dcmd(ahelp,5,cmdtext);
- dcmd(dm,2,cmdtext);
- dcmd(dmexit,6,cmdtext);
- dcmd(sinslavy,8,cmdtext);
- dcmd(lv,2,cmdtext);
- dcmd(ls,2,cmdtext);
- dcmd(sf,2,cmdtext);
- dcmd(pyramida,8,cmdtext);
- dcmd(wangcars,8,cmdtext);
- dcmd(stavba,6,cmdtext);
- dcmd(tfdragons,9,cmdtext);
- dcmd(centrum,7,cmdtext);
- dcmd(stadion,7,cmdtext);
- dcmd(alhambra,8,cmdtext);
- dcmd(skatepark,9,cmdtext);
- dcmd(beach,5,cmdtext);
- dcmd(jizzy,5,cmdtext);
- dcmd(golf,4,cmdtext);
- dcmd(setlevel,8,cmdtext);
- dcmd(setport,7,cmdtext);
- dcmd(goport,6,cmdtext);
- dcmd(veh,3,cmdtext);
- dcmd(vehdel,6,cmdtext);
- dcmd(vehcolor,8,cmdtext);
- dcmd(freeze,6,cmdtext);
- dcmd(unfreeze,8,cmdtext);
- dcmd(deduction,9,cmdtext);
- dcmd(ban,3,cmdtext);
- dcmd(pban,4,cmdtext);
- dcmd(kick,4,cmdtext);
- dcmd(pchat,5,cmdtext);
- dcmd(killed,6,cmdtext);
- dcmd(goto,4,cmdtext);
- dcmd(get,3,cmdtext);
- return 0;
- }
- dcmd_help(playerid, params[])
- {
- #pragma unused params
- new string[1500];
- strcat(string, "{FFFFFF}Vítejte na {33AA33}Kill{FFFFFF} or be {FF0000}Killed{FFFFFF} tento mod je navržen tak že tu jde převážně o skill.\n");
- strcat(string, "{FFFFFF}Čím více hráču zabijete tím větší šance že budete TOP hráč.\n");
- strcat(string, "{FFFFFF}Za každé zabití hráče dostanete sumu, kteoru si lze uložit do banky.\n");
- strcat(string, "{FFFFFF}Všechna potřebná data se na serveru ukládají, takže se nebojte že přijdete o peníze atd...\n");
- strcat(string, "{FFFFFF}Hráče nemusíte jen vraždit pro to aby jste byl {33AA33}TOP{FFFFFF}, lze si také užít dalších funkcí serveru.\n");
- strcat(string, "{FFFFFF}Pokud si chcete něco pustit je možné použít {FF0000}/radio{FFFFFF} kde jsou české stanice.\n");
- strcat(string, "{FFFFFF}Koupit hráči zbran, poslat peníze atd... Lze kliknutím v TAB na jeho jméno.\n");
- strcat(string, "{FFFFFF}Prosíme aby jste si přečetl {FF0000}/pravidla{FFFFFF} a nejlépe uděláte když je budete dodržovat.\n");
- strcat(string, "{FFFFFF}Pokud udeříte hráče {FF0000}Baseballkou{FFFFFF} automaticky ho okradete o nějaké peníze které má u sebe.\n\n");
- strcat(string, "{FFFFFF}COMMANDS:\n");
- strcat(string, "{FF0000}/radio /informace /lock /unlock /kill /ahelp /weapons /pravidla /dm /dmexit\n\n");
- strcat(string, "{FFFFFF}TELEPORTS:\n");
- strcat(string, "{0099FF}/lv /ls /sf /pyramida /wangcars /stavba /tfdragons /centrum\n");
- strcat(string, "{0099FF}/stadion /alhambra /skatepark /beach /jizzy /golf\n\n");
- strcat(string, "{33AA33}Kill{FFFFFF} or be {FF0000}Killed{FFFFFF} vytvořil Ref.\n");
- ShowPlayerDialog(playerid, D_Commands, DIALOG_STYLE_MSGBOX, "Help (pomoc, nápověda):", string ,"Zavřít","");
- return 1;
- }
- dcmd_informace(playerid, params[])
- {
- #pragma unused params
- new string[256];
- format(string, sizeof(string), "Informace hráče {FF0000}%s{FFFFFF}:", Jmeno(playerid));
- SendClientMessage(playerid, 0xFFFFFFAA, string);
- format(string, sizeof(string), "[ Kills: {FF0000}%d{FFFFFF} | Deaths: {FF0000}%d{FFFFFF} | Respect: {FF0000}%d{FFFFFF} | AdminLevel: {FF0000}%d/5{FFFFFF} ]", Kill[playerid], Killed[playerid], Respekt[playerid], AdminLevel[playerid]);
- SendClientMessage(playerid, 0xFFFFFFAA, string);
- return 1;
- }
- dcmd_kill(playerid,params[])
- {
- #pragma unused params
- new string[128];
- SetPlayerHealth(playerid, 0.0);
- format(string,128,"[Death] Hráč {FF0000}%s{FFFFFF} si vzal život.",Jmeno(playerid));
- SendClientMessageToAll(0xFFFFFFAA,string);
- return true;
- }
- dcmd_lock(playerid,params[])
- {
- #pragma unused params
- if(IsPlayerInAnyVehicle(playerid))
- {
- new State=GetPlayerState(playerid);
- if(State!=PLAYER_STATE_DRIVER)
- {
- SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Zamknout vozidlo muže jen řidič.");
- return 1;
- }
- new i;
- for(i=0;i<MAX_PLAYERS;i++)
- {
- if(i != playerid)
- {
- SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
- }
- }
- SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Vozidlo zamčeno.");
- new Float:pX, Float:pY, Float:pZ;
- GetPlayerPos(playerid,pX,pY,pZ);
- PlayerPlaySound(playerid,1056,pX,pY,pZ);
- }
- else
- {
- SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nejsi ve vozidle.");
- }
- return true;
- }
- dcmd_unlock(playerid,params[])
- {
- #pragma unused params
- if(IsPlayerInAnyVehicle(playerid))
- {
- new State=GetPlayerState(playerid);
- if(State!=PLAYER_STATE_DRIVER)
- {
- SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Odemknout vozidlo muže jen řidič.");
- return 1;
- }
- new i;
- for(i=0;i<MAX_PLAYERS;i++)
- {
- SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
- }
- SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Vozidlo odemčeno.");
- new Float:pX, Float:pY, Float:pZ;
- GetPlayerPos(playerid,pX,pY,pZ);
- PlayerPlaySound(playerid,1057,pX,pY,pZ);
- }
- else
- {
- SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nejsi ve vozidle.");
- }
- return true;
- }
- dcmd_radio(playerid, params[])
- {
- #pragma unused params
- ShowPlayerDialog(playerid,D_Radio,DIALOG_STYLE_LIST,"Radio stanice:","{FF0000}Vypnout Radio\n{FFFF00}Radio Evropa 2\n{FF66FF}Fajn Radio\n{FFFFFF}Fox Radio\n{AFAFAF}Radio Frekvence 1\n{33AA33}Radio HipHopStage\n{0099FF}Radio Impuls","Vybrat","Zavřít");
- return 1;
- }
- dcmd_pravidla(playerid, params[])
- {
- #pragma unused params
- new string[952];
- strcat(string, "{FF0000}1.{FFFFFF} Je zakázené používat sobeit, cleo, aimbot a ostatní cheaty.\n");
- strcat(string, "{FF0000}2.{FFFFFF} Je zakázané dělat reklamy na jíné servery a webové stránky.\n");
- strcat(string, "{FF0000}3.{FFFFFF} Je zakázané napadat slovně administrátory a naše jméno.\n");
- strcat(string, "{FF0000}4.{FFFFFF} Je zakázané zneužívat nalezené bugy, je potřeba je hned nahlásit.\n");
- strcat(string, "{FF0000}5.{FFFFFF} Je zakázáno spamovat v chatu.\n");
- strcat(string, "{FF0000}6.{FFFFFF} Je zakázané zabijení hráču na spawnu a teleportu!\n");
- strcat(string, "{FF0000}7.{FFFFFF} Je zakázané vlastnit více jak jeden účet!\n\n");
- strcat(string, "{FFFFFF}Všechna vypsaná pravidla jsou aktuální a jejich porušení se trestá.");
- ShowPlayerDialog(playerid, D_Pravidla, DIALOG_STYLE_MSGBOX, "Pravidla:", string ,"Zavřít","");
- return 1;
- }
- dcmd_dm(playerid, params[])
- {
- new string[256];
- new DM = strval(params);
- if(!params[0]) return SendClientMessage(playerid, 0xFF0000AA, "/dm [1-4]");
- else if(DM < 1 || DM > 4) return SendClientMessage(playerid, 0xFF0000AA, "/dm [1-4]");
- switch(DM)
- {
- case 1:
- {
- SetPlayerVirtualWorld(playerid,1);
- SetPlayerPos(playerid,-1862.5531,668.0342,81.3984);
- ResetPlayerWeapons(playerid);
- dm[playerid] = 1;
- GivePlayerWeapon(playerid, 26, 9998);
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 0);
- format(string,sizeof(string),"Hráč {FFFFFF}%s{33AA33} se zapojil do DM 1 {FFFFFF}Sawnoff Shotgun{33AA33}.",Jmeno(playerid));
- SendClientMessageToAll(0x33AA33AA,string);
- }
- case 2:
- {
- SetPlayerVirtualWorld(playerid,2);
- SetPlayerPos(playerid,-1417.4907,397.4567,30.0859);
- ResetPlayerWeapons(playerid);
- dm[playerid] = 2;
- GivePlayerWeapon(playerid, 27, 9998);
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 0);
- format(string,sizeof(string),"Hráč {FFFFFF}%s{33AA33} se zapojil do DM 2 {FFFFFF}Combat Shotgun{33AA33}.",Jmeno(playerid));
- SendClientMessageToAll(0x33AA33AA,string);
- }
- case 3:
- {
- SetPlayerVirtualWorld(playerid,3);
- SetPlayerPos(playerid,-2048.1331,565.9178,35.0156);
- ResetPlayerWeapons(playerid);
- dm[playerid] = 3;
- GivePlayerWeapon(playerid, 26, 9998);
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 100);
- format(string,sizeof(string),"Hráč {FFFFFF}%s{33AA33} se zapojil do DM 3 {FFFFFF}Sawnoff Shotgun + Armour{33AA33}.",Jmeno(playerid));
- SendClientMessageToAll(0x33AA33AA,string);
- }
- case 4:
- {
- SetPlayerVirtualWorld(playerid,4);
- SetPlayerPos(playerid,-2763.6677,-296.2934,7.0391);
- ResetPlayerWeapons(playerid);
- dm[playerid] = 4;
- GivePlayerWeapon(playerid, 25, 9998);
- GivePlayerWeapon(playerid, 24, 9998);
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 0);
- format(string,sizeof(string),"Hráč {FFFFFF}%s{33AA33} se zapojil do DM 4 {FFFFFF}Shotgun + Desert Eagle{33AA33}.",Jmeno(playerid));
- SendClientMessageToAll(0x33AA33AA,string);
- }
- }
- return true;
- }
- dcmd_dmexit(playerid,params[])
- {
- #pragma unused params
- if(IsPlayerConnected(playerid))
- {
- new string[150];
- SetPlayerVirtualWorld(playerid,0);
- dm[playerid] = 0;
- ResetPlayerWeapons(playerid);
- SpawnPlayer(playerid);
- GivePlayerWeapon(playerid, 26, 9998);
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 0);
- format(string,sizeof(string),"Hráč {FFFFFF}%s{33AA33} opustil DeathMatch.",Jmeno(playerid));
- SendClientMessageToAll(0x33AA33AA,string);
- }
- return 1;
- }
- dcmd_sinslavy(playerid,params[])
- {
- #pragma unused params
- // Nejvíc zabil.
- new maxkills,id,string[256],name[MAX_PLAYER_NAME];
- for (new i = 0; i < MAX_PLAYERS; i++)
- {
- if(Kill[i] > maxkills)
- {
- maxkills = Kill[i];
- id = i;
- }
- }
- GetPlayerName(id,name,sizeof(name));
- //
- // Největší respekt.
- new maxres,idd,namee[MAX_PLAYER_NAME];
- for (new i = 0; i < MAX_PLAYERS; i++)
- {
- if(Respekt[i] > maxres)
- {
- maxres = Respekt[i];
- idd = i;
- }
- }
- GetPlayerName(idd,namee,sizeof(namee));
- //
- format(string,256,"{FFFFFF}Nejvíce hráču na serveru zabil:\n%s [ Kills: %d ]\n\nNejvetší respekt má hráč:\n%s [ Respect: %d ]",name,maxkills,namee,maxres);
- ShowPlayerDialog(playerid,D_SinSlavy,DIALOG_STYLE_MSGBOX,"Sín Slávy",string,"Další","");
- return true;
- }
- // Teleporty .................. START
- dcmd_lv(playerid,params[])
- {
- #pragma unused params
- new string[200];
- Warp(playerid, 1669.0104, 1310.2052, 10.8203, 0);
- format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval do Las Venturas.",Jmeno(playerid));
- SendClientMessageToAll(0x0099FFAA,string);
- return true;
- }
- dcmd_ls(playerid,params[])
- {
- #pragma unused params
- new string[200];
- Warp(playerid, 1270.8721,-1338.6042,13.3395, 0);
- format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval do Los Santos.",Jmeno(playerid));
- SendClientMessageToAll(0x0099FFAA,string);
- return true;
- }
- dcmd_sf(playerid,params[])
- {
- #pragma unused params
- new string[200];
- Warp(playerid, -1410.6317,-313.1867,13.9926, 0);
- format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval do San Fierra.",Jmeno(playerid));
- SendClientMessageToAll(0x0099FFAA,string);
- return true;
- }
- dcmd_pyramida(playerid,params[])
- {
- #pragma unused params
- new string[200];
- Warp(playerid, 2219.9436,1285.3647,10.8203, 0);
- format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval k Pyramide.",Jmeno(playerid));
- SendClientMessageToAll(0x0099FFAA,string);
- return true;
- }
- dcmd_wangcars(playerid,params[])
- {
- #pragma unused params
- new string[200];
- Warp(playerid, -1986.9955,288.2577,34.4164, 0);
- format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval k Wang Cars.",Jmeno(playerid));
- SendClientMessageToAll(0x0099FFAA,string);
- return true;
- }
- dcmd_stavba(playerid,params[])
- {
- #pragma unused params
- new string[200];
- Warp(playerid, 2705.2410,853.3575,9.8438, 0);
- format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval na Stavbu.",Jmeno(playerid));
- SendClientMessageToAll(0x0099FFAA,string);
- return true;
- }
- dcmd_tfdragons(playerid,params[])
- {
- #pragma unused params
- new string[200];
- Warp(playerid, 2029.9124,1008.2343,10.8203, 0);
- format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval k The Four Dragons.",Jmeno(playerid));
- SendClientMessageToAll(0x0099FFAA,string);
- return true;
- }
- dcmd_centrum(playerid,params[])
- {
- #pragma unused params
- new string[200];
- Warp(playerid, 2801.7971,2395.5332,10.8203, 0);
- format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval k Centrum.",Jmeno(playerid));
- SendClientMessageToAll(0x0099FFAA,string);
- return true;
- }
- dcmd_stadion(playerid,params[])
- {
- #pragma unused params
- new string[200];
- Warp(playerid, 2672.1599,-1688.0907,9.3783, 0);
- format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval k Stadionu.",Jmeno(playerid));
- SendClientMessageToAll(0x0099FFAA,string);
- return true;
- }
- dcmd_alhambra(playerid,params[])
- {
- #pragma unused params
- new string[200];
- Warp(playerid, 1823.7289,-1681.9412,13.3828, 0);
- format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval k Alhambra.",Jmeno(playerid));
- SendClientMessageToAll(0x0099FFAA,string);
- return true;
- }
- dcmd_skatepark(playerid,params[])
- {
- #pragma unused params
- new string[200];
- Warp(playerid, 1877.8224,-1387.5604,13.5740, 0);
- format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval do Skateparku.",Jmeno(playerid));
- SendClientMessageToAll(0x0099FFAA,string);
- return true;
- }
- dcmd_beach(playerid,params[])
- {
- #pragma unused params
- new string[200];
- Warp(playerid, 582.1698,-1863.1613,4.6498, 0);
- format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval na Pláž.",Jmeno(playerid));
- SendClientMessageToAll(0x0099FFAA,string);
- return true;
- }
- dcmd_jizzy(playerid,params[])
- {
- #pragma unused params
- new string[200];
- Warp(playerid, -2636.5427,1359.0043,7.1288, 0);
- format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval k Jizzy.",Jmeno(playerid));
- SendClientMessageToAll(0x0099FFAA,string);
- return true;
- }
- dcmd_golf(playerid,params[])
- {
- #pragma unused params
- new string[200];
- Warp(playerid, -2751.4612,-294.3576,7.0391, 0);
- format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval na Golf.",Jmeno(playerid));
- SendClientMessageToAll(0x0099FFAA,string);
- return true;
- }
- // Teleporty .................. KONEC
- // Admin příkazy ....................
- dcmd_ahelp(playerid, params[])
- {
- #pragma unused params
- new string[1500];
- if(AdminLevel[playerid] < 1) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
- strcat(string, "{CC0000}AdminLevel (1):\n");
- strcat(string, "{FFFFFF}?text /vehcolor /deduction /pchat\n\n");
- strcat(string, "{CC0000}AdminLevel (2):\n");
- strcat(string, "{FFFFFF}/setport /veh /vehdel /freeze /unfreeze /goto /get\n\n");
- strcat(string, "{CC0000}AdminLevel (3):\n");
- strcat(string, "{FFFFFF}/kick /killed\n\n");
- strcat(string, "{CC0000}AdminLevel (4):\n");
- strcat(string, "{FFFFFF}/ban\n\n");
- strcat(string, "{CC0000}AdminLevel (5):\n");
- strcat(string, "{FFFFFF}/pban\n\n");
- strcat(string, "{CC0000}Pro Rcon:\n");
- strcat(string, "{FFFFFF}/setlevel\n\n");
- ShowPlayerDialog(playerid, D_ACommands, DIALOG_STYLE_MSGBOX, "Admin příkazy:", string ,"Zavřít","");
- return 1;
- }
- dcmd_setlevel(playerid,params[])
- {
- if(AdminLevel[playerid] == 0 || AdminLevel[playerid] == 1 || AdminLevel[playerid] == 2 || AdminLevel[playerid] == 3 || AdminLevel[playerid] == 4 || AdminLevel[playerid] == 5)
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
- {
- new string[128], pos, level;
- if(!params[0]||!(pos=chrfind(' ',params)+1)||!params[pos]) return SendClientMessage(playerid, 0xFF0000AA, "/setlevel [id] [0-5]");
- if(strlen(params) > 23) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Zadal jste chybné parametry.");
- new id = strval(params[0]);
- level = strval(params[pos]);
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Hráč se zadaným id není na serveru.");
- if(level < 0 || level > 5) return SendClientMessage(playerid, 0xFF0000AA, "/setlevel [id] [0-5]");
- format(string,128,"Admin {FFFFFF}%s{CC0000} nastavil hráči {FFFFFF}%s{CC0000} admin level {FFFFFF}%d{CC0000}.",Jmeno(playerid),Jmeno(id),level);
- SendClientMessageToAll(0xCC0000AA,string);
- AdminLevel[id] = level;
- }
- }
- return true;
- }
- new Float:xport,Float:yport,Float:zport;
- dcmd_setport(playerid,params[])
- {
- #pragma unused params
- if(AdminLevel[playerid] < 2) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
- GetPlayerPos(playerid,xport,yport,zport);
- new string[128];
- format(string,128,"Admin {FFFFFF}%s{CC0000} uložil veřejný port {FFFFFF}/goport{CC0000}.",Jmeno(playerid));
- SendClientMessageToAll(0xCC0000AA,string);
- return true;
- }
- dcmd_goport(playerid,params[])
- {
- #pragma unused params
- new string[200];
- if(IsPlayerConnected(playerid))
- {
- new vozidlo = GetPlayerVehicleID(playerid);
- if(!IsPlayerInAnyVehicle(playerid))
- {
- SetPlayerPos(playerid,xport,yport,zport);
- format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval na veřejný port {AFAFAF}/goport{0099FF}.",Jmeno(playerid));
- SendClientMessageToAll(0x0099FFAA,string);
- }else{
- SetVehiclePos(vozidlo,xport,yport,zport);
- format(string,200,"Hráč {AFAFAF}%s{0099FF} se teleportoval na veřejný port {AFAFAF}/goport{0099FF}.",Jmeno(playerid));
- SendClientMessageToAll(0x0099FFAA,string);
- }
- }
- return true;
- }
- dcmd_veh(playerid,params[])
- {
- if(AdminLevel[playerid] < 2) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
- if(!params[0]) return SendClientMessage(playerid, 0xFF0000AA, "/veh [400 - 611]");
- new ID_CAR = strval(params[0]);
- if(ID_CAR < 400 || ID_CAR > 611) return SendClientMessage(playerid, 0xFF0000AA, "/veh [400 - 611]");
- if(veh[playerid])
- {
- DestroyVehicle(veh[playerid]);
- veh[playerid] = '\0';
- }
- new Float:vehx,Float:vehy,Float:vehz,Float:uhel;
- GetPlayerPos(playerid, vehx, vehy, vehz);
- GetPlayerFacingAngle(playerid, uhel);
- veh[playerid] = CreateVehicle(ID_CAR, vehx, vehy, vehz, uhel, -1, -1, 60);
- PutPlayerInVehicle(playerid, veh[playerid], 0);
- LinkVehicleToInterior(veh[playerid], GetPlayerInterior(playerid));
- new MaxDoors = GetVehicleMaxDoor(ID_CAR);
- new string2[300];
- format(string2, sizeof(string2), "Vytvořil jste {FFFFFF}%d{CC0000} dveřové vozidlo id {FFFFFF}%d{CC0000}.",MaxDoors,ID_CAR);
- SendClientMessage(playerid,0xCC0000AA, string2);
- format(string2, sizeof(string2), "Pro zníčení vystupte na {FFFFFF}60{CC0000} sekund z vozidla nebo použij příkaz {FFFFFF}/vehdel{CC0000}.");
- SendClientMessage(playerid,0xCC0000AA, string2);
- return true;
- }
- dcmd_vehdel(playerid,params[])
- {
- #pragma unused params
- if(AdminLevel[playerid] < 2) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
- if(!veh[playerid]) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Žádné vozidlo nemáte vytvořeno, použijte {99FF00}/veh [400-611]{FFFFFF}!");
- DestroyVehicle(veh[playerid]);
- veh[playerid] = '\0';
- SendClientMessage(playerid, 0xCC0000AA, "Vozidlo bylo zničeno. Můžete znovu použít příkaz {FFFFFF}%s/veh [400-611]{CC0000}!");
- return true;
- }
- dcmd_vehcolor(playerid,params[])
- {
- if(AdminLevel[playerid] < 1) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
- new farba = strval(params),pos = chrfind(' ', params);
- if(pos == -1) return SendClientMessage(playerid, 0xFF0000AA, "/vehcolor [Barva 1] [Barva 2]");
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nejste ve vozidle.");
- new farba2 = strval(params[pos]);
- if(farba > 128 || farba < 0) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Zadal jste špatné ID první barvy [1-127]!");
- if(farba2 > 128 || farba2 < 0) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Zadal jste špatné ID druhé barvy [1-127]!");
- ChangeVehicleColor(GetPlayerVehicleID(playerid), farba, farba2);
- return true;
- }
- dcmd_freeze(playerid, params[])
- {
- new id = strval(params),string[200];
- if(AdminLevel[playerid] < 2) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
- if (!strlen(params)) return SendClientMessage(playerid, 0xFF0000AA, "/freeze [id]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Hráč se zadaným id není na serveru.");
- format(string, sizeof(string), "Admin {FFFFFF}%s{CC0000} zmrazil hráče {FFFFFF}%s{CC0000}.", Jmeno(playerid),Jmeno(id));
- SendClientMessageToAll(0xCC0000AA, string);
- TogglePlayerControllable(id,0);
- return 1;
- }
- dcmd_unfreeze(playerid, params[])
- {
- new id = strval(params),string[200];
- if(AdminLevel[playerid] < 2) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
- if (!strlen(params)) return SendClientMessage(playerid, 0xFF0000AA, "/unfreeze [id]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Hráč se zadaným id není na serveru.");
- format(string, sizeof(string), "Admin {FFFFFF}%s{CC0000} odmrazil hráče {FFFFFF}%s{CC0000}.", Jmeno(playerid),Jmeno(id));
- SendClientMessageToAll(0xCC0000AA, string);
- TogglePlayerControllable(id,1);
- return 1;
- }
- dcmd_deduction(playerid, params[])
- {
- if(AdminLevel[playerid] < 1) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
- if(!strlen(params)) return SendClientMessage(playerid, 0xFF0000AA, "/deduction [1-60]");
- if(strlen(params) > 15) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Použití: Zadal jste chybné parametry!");
- new Cas = strval(params);
- if(Cas < 1 || 60 < Cas) return SendClientMessage(playerid, 0xFF0000AA, "/deduction [1-60]");
- if(Odpocet > 0) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Odpočet již probíhá!");
- new string[128];
- format(string, 128, "Admin {FFFFFF}%s{CC0000} spustil odpočet na {FFFFFF}%d{CC0000} sekund.", Jmeno(playerid), Cas);
- SendClientMessageToAll(0xCC0000AA, string);
- Odpocet = Cas;
- SetTimer("OdpocetS",1000, false);
- return true;
- }
- public OdpocetS()
- {
- new string[8];
- if(Odpocet > 0)
- {
- format(string,8,"~w~%d",Odpocet);
- GameTextForAll(string, 1000, 4);
- Odpocet--;
- SetTimer("OdpocetS", 1000, false);
- }else{
- GameTextForAll("~g~START!", 2000, 4);
- }
- }
- dcmd_kick(playerid, params[])
- {
- new duvod[25];
- new id = strval(params);
- new string[256];
- if(AdminLevel[playerid] < 3) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
- if(sscanf(params,"uz",id,duvod)) return SendClientMessage(playerid, 0xFF0000AA, "/kick [id] [důvod]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Hráč se zadaným id není na serveru.");
- format(string, sizeof(string), "Admin {FFFFFF}%s{CC0000} vyhodil hráče {FFFFFF}%s{CC0000} z důvodu: [ {FFFFFF}%s{CC0000} ].", Jmeno(playerid), Jmeno(id), duvod);
- SendClientMessageToAll(0xCC0000AA, string);
- Kick(id);
- return 1;
- }
- dcmd_ban(playerid, params[])
- {
- new duvod[25];
- new id = strval(params);
- new string[256];
- if(AdminLevel[playerid] < 4) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
- if(sscanf(params,"uz",id,duvod)) return SendClientMessage(playerid, 0xFF0000AA, "/ban [id] [důvod]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Hráč se zadaným id není na serveru.");
- format(string, sizeof(string), "Admin {FFFFFF}%s{CC0000} zabanoval hráče {FFFFFF}%s{CC0000} z důvodu: [ {FFFFFF}%s{CC0000} ].", Jmeno(playerid), Jmeno(id), duvod);
- SendClientMessageToAll(0xCC0000AA, string);
- Ban(id);
- return 1;
- }
- dcmd_pban(playerid, params[])
- {
- new duvod[25];
- new id = strval(params);
- new string[256];
- if(AdminLevel[playerid] < 5) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
- if(sscanf(params,"uz",id,duvod)) return SendClientMessage(playerid, 0xFF0000AA, "/pban [id] [důvod]");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Hráč se zadaným id není na serveru.");
- format(string, sizeof(string), "Admin {FFFFFF}%s{CC0000} dal pban hráči {FFFFFF}%s{CC0000} z důvodu: [ {FFFFFF}%s{CC0000} ].", Jmeno(playerid), Jmeno(id), duvod);
- SendClientMessageToAll(0xCC0000AA, string);
- BanEx(id,"Pernamentní Ban");
- return 1;
- }
- dcmd_pchat(playerid, params[])
- {
- #pragma unused params
- if(AdminLevel[playerid] < 1) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
- for(new c=0;c<10;c++) SendClientMessageToAll(-1," ");
- new string[200];
- format(string, sizeof(string), "Admin {FFFFFF}%s{CC0000} promazal chat.", Jmeno(playerid));
- SendClientMessageToAll(0xCC0000AA, string);
- return 1;
- }
- dcmd_killed(playerid, params[])
- {
- #pragma unused params
- if(AdminLevel[playerid] < 3) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
- if(isnull(params)) return SendClientMessage(playerid, 0xFF0000AA, "/killed [id]");
- new id = strval(params);
- SetPlayerHealth(id,-1);
- new string[256];
- format(string, sizeof(string), "Admin {FFFFFF}%s{CC0000} zabil hráče {FFFFFF}%s{CC0000}.",Jmeno(playerid),Jmeno(id));
- SendClientMessageToAll(0xCC0000AA, string);
- return 1;
- }
- dcmd_goto(playerid,params[])
- {
- #pragma unused params
- if(AdminLevel[playerid] < 2) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
- if(isnull(params)) return SendClientMessage(playerid, 0xFF0000AA, "/goto [id]");
- new id = strval(params);
- new Float:Pos[3];
- GetPlayerPos(id,Pos[0],Pos[1],Pos[2]);
- SetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
- new string[256];
- format(string, sizeof(string), "Admin {FFFFFF}%s{CC0000} se teleportoval k hráči {FFFFFF}%s{CC0000}.",Jmeno(playerid),Jmeno(id));
- SendClientMessageToAll(0xCC0000AA, string);
- return true;
- }
- dcmd_get(playerid,params[])
- {
- #pragma unused params
- if(AdminLevel[playerid] < 2) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Nemáš oprávnění použít tento příkaz.");
- if(isnull(params)) return SendClientMessage(playerid, 0xFF0000AA, "/get [id]");
- new id = strval(params);
- new Float:Pos[3];
- GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
- SetPlayerPos(id,Pos[0],Pos[1],Pos[2]);
- new string[256];
- format(string, sizeof(string), "Admin {FFFFFF}%s{CC0000} k sobě přitáhl hráče {FFFFFF}%s{CC0000}.",Jmeno(playerid),Jmeno(id));
- SendClientMessageToAll(0xCC0000AA, string);
- return true;
- }
- // Admin příkazy .............. KONEC
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid,newstate,oldstate)
- {
- if(newstate == PLAYER_STATE_DRIVER){
- new vehicleid = GetPlayerVehicleID(playerid);
- for(new h; h < HouseCount+1;h++){
- if(vehicleid == HouseInfo[h][Vehicle]){
- if(!IsPlayerHouseOwner(playerid,h)){
- RemovePlayerFromVehicle(playerid);
- }
- }
- }
- }
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- new a = GetPlayerHouse(playerid);
- if(!DialogShowed[playerid]){
- if(a != -1){
- SetPVarInt(playerid, "HouseID", a);
- ShowPlayerDialog(playerid,HOUSE_DIALOG,DIALOG_STYLE_LIST,"Dům","Koupit\nProdat\nZamknout\nOdemknout\nStatistiky\nVozidlo\nVstoupit","Vybrat","Zavřít");
- DialogShowed[playerid] = true;
- }}
- // Fortuna v San Fierru.
- if(pickupid == FortunaPickup) {
- SetPlayerInterior(playerid, 3);
- SetPlayerPos(playerid, 832.3189,7.3165,1004.1797);
- return 1;
- }
- if(pickupid == ExitFortunaPickup) {
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, -2153.6738,151.2602,35.3203);
- return 1;
- }
- if(pickupid == LoterieFortunaPickup) {
- if(Loto_Cislo[playerid] > 0) return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Už jsi podával loterii, počkej na slosování.");
- ShowPlayerDialog(playerid,D_Loterie,DIALOG_STYLE_INPUT,"Fortuna","{FFFFFF}Napiš číslo které chceš vsadit do Loterie.\nPokud zadáš číslo které bude jako první, dostaneš výhru {33AA33}$1000000{FFFFFF}!\nNa vsázení je zapotřebí {33AA33}$200{FFFFFF}, rozmezí čísel je {FF0000}0{FFFFFF} až {FF0000}20{FFFFFF}.","Vsadit","Zavřít");
- return 1;
- }
- // Ammunition v San Fierru.
- if(pickupid == AmmunitionPickup) {
- SetPlayerInterior(playerid, 7);
- SetPlayerPos(playerid, 314.8122,-141.3575,999.6016);
- return 1;
- }
- if(pickupid == ExitAmmunitionPickup) {
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, -2051.7429,558.4496,35.0156);
- return 1;
- }
- if(pickupid == OneAmmunitionPickup) {
- ShowPlayerDialog(playerid,D_Weapons,DIALOG_STYLE_LIST,"Ammunition Balíček:","{FFFFFF}Baseball ({33AA33}$100{FFFFFF})\n{FFFFFF}Katana ({33AA33}$250{FFFFFF})\nDesert Eagle ({33AA33}$400{FFFFFF})\nSawnoff Shotgun ({33AA33}$900{FFFFFF})\nCombat Shotgun ({33AA33}$1000{FFFFFF})\nMicro SMG/Uzi ({33AA33}$1200{FFFFFF})\nAK-47 ({33AA33}$1500{FFFFFF})\nM4 ({33AA33}$1500{FFFFFF})\nSniper Rifle ({33AA33}$2500{FFFFFF})","Koupit","Zavřít");
- return 1;
- }
- return 1;
- }
- public OnVehicleMod(playerid,vehicleid,componentid)
- {
- for(new h; h < HouseCount+1;h++){
- if(HouseInfo[h][Vehicle] == vehicleid){
- new s[128];
- format(s,128,"Houses/House%d.txt",h);
- switch(InitComponents(componentid)){
- case 1: HouseInfo[h][Vmod][0] = componentid;
- case 2: HouseInfo[h][Vmod][1] = componentid;
- case 3: HouseInfo[h][Vmod][2] = componentid;
- case 4: HouseInfo[h][Vmod][3] = componentid;
- case 5: HouseInfo[h][Vmod][4] = componentid;
- case 6: HouseInfo[h][Vmod][5] = componentid;
- case 7: HouseInfo[h][Vmod][6] = componentid;
- case 8: HouseInfo[h][Vmod][7] = componentid;
- case 9: HouseInfo[h][Vmod][8] = componentid;
- case 10: HouseInfo[h][Vmod][9] = componentid;
- case 11: HouseInfo[h][Vmod][10] = componentid;
- case 12: HouseInfo[h][Vmod][11] = componentid;
- case 13: HouseInfo[h][Vmod][12] = componentid;
- case 14: HouseInfo[h][Vmod][13] = componentid;
- case 15: HouseInfo[h][Vmod][14] = componentid;
- case 16: HouseInfo[h][Vmod][15] = componentid;
- case 17: HouseInfo[h][Vmod][16] = componentid;
- }
- printf("Component Slot %d | Componentid %d",InitComponents(componentid),componentid);
- }
- }
- return 1;
- }
- public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- {
- for(new i; i < HouseCount+1;i++){
- if(vehicleid == HouseInfo[i][Vehicle]){
- new s[128];
- format(s,128,"Houses/House%d.txt",i);
- HouseInfo[i][Paintjob] = paintjobid;
- }
- }
- return 1;
- }
- public OnVehicleRespray(playerid, vehicleid, color1, color2)
- {
- for(new i; i < HouseCount+1;i++){
- if(vehicleid == HouseInfo[i][Vehicle]){
- new s[128];
- format(s,128,"Houses/House%d.txt",i);
- HouseInfo[i][Color1] = color1;
- HouseInfo[i][Color2] = color2;
- }
- }
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(newkeys == KEY_WALK)
- {
- if(InHouse[playerid] != -1){
- new HouseId = InHouse[playerid];
- if(IsPlayerInRangeOfPoint(playerid,10,HouseInfo[HouseId][i_X],HouseInfo[HouseId][i_Y],HouseInfo[HouseId][i_Z]))
- {
- SetPlayerPos(playerid,HouseInfo[HouseId][p_X],HouseInfo[HouseId][p_Y],HouseInfo[HouseId][p_Z]);
- SetPlayerInterior(playerid,0);
- SetPlayerVirtualWorld(playerid,0);
- InHouse[playerid] = -1;
- }
- }
- }
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- new drunknew;
- drunknew = GetPlayerDrunkLevel(playerid);
- if (drunknew < 100) {
- SetPlayerDrunkLevel(playerid, 2000);
- } else {
- if (pDrunkLevelLast[playerid] != drunknew) {
- new wfps = pDrunkLevelLast[playerid] - drunknew;
- if ((wfps > 0) && (wfps < 200))
- pFPS[playerid] = wfps;
- pDrunkLevelLast[playerid] = drunknew;
- }
- }
- return 1;
- }
- forward OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid);
- public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
- {
- if(issuerid != INVALID_PLAYER_ID && weaponid == 5)
- {
- new money = GetPlayerMoney(playerid) / random(15);
- GivePlayerMoney(issuerid,money);
- GivePlayerMoney(playerid,-money);
- new str[50];
- format(str, sizeof(str), "~w~+~g~%d",money);
- GameTextForPlayer(issuerid, str, 2000, 1);
- format(str, sizeof(str), "~w~-~r~%d",money);
- GameTextForPlayer(playerid, str, 2000, 1);
- }
- return 0;
- }
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- return 1;
- }
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamOut(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == 1)
- {
- if(response == 1)
- {
- if (udb_Exists(Jmeno(playerid))) return ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"KobK","Přihlaš se, napiš své heslo které si uvedl při registraci.","Použít","Odpojit se");
- if (strlen(inputtext)==0) return ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"KobK","Musíš napsat heslo!","Použít","Odpojit se");
- if (udb_Create(Jmeno(playerid),inputtext)) return ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"KobK","Víborně, nyní napiš heslo znovu!","Použít","Odpojit se");
- }
- if(response == 2)
- {
- Kick(playerid);
- }
- }
- //==============================================================================
- if(dialogid == 2)
- {
- if(response == 1)
- {
- if (strlen(inputtext)==0) return ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"KobK","Musíš zadat heslo, napiš ho...","Použít","Odpojit se");
- if (udb_CheckLogin(Jmeno(playerid),inputtext))
- {
- new Float:hp = dUserINT(Jmeno(playerid)).("Health");
- if(hp != 0)
- {
- SetPlayerHealth(playerid, hp);
- }
- new Float:am = dUserINT(Jmeno(playerid)).("Armour");
- if(am != 0)
- {
- SetPlayerArmour(playerid, am);
- }
- GivePlayerMoney(playerid,dUserINT(Jmeno(playerid)).("Money")-GetPlayerMoney(playerid));
- Kill[playerid] = dUserINT(Jmeno(playerid)).("Kills");
- Killed[playerid] = dUserINT(Jmeno(playerid)).("Deaths");
- Respekt[playerid] = dUserINT(Jmeno(playerid)).("Respect");
- AdminLevel[playerid] = dUserINT(Jmeno(playerid)).("AdminLevel");
- PLAYERLIST_authed[playerid] = true;
- return SendClientMessage(playerid, 0xFF0000AA, "[!]{FFFFFF} Úspěšně jste se přihlásil.");
- }
- return ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"KobK","Nesprávné heslo!","Použít","Odpojit se");
- }
- if(response == 2)
- {
- Kick(playerid);
- }
- }
- // Kliknutím na hráče -------------------------------------------------- //
- if(dialogid == D_ClickPlayer)
- {
- if(response == 1)
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid,D_ClickPlayer_Penize,DIALOG_STYLE_INPUT,"Poslat peníze:","Zadejte částku kterou chcete hráči poslat:","Poslat","Zavřít");
- }
- else if(listitem == 1)
- {
- ShowPlayerDialog(playerid,D_ClickPlayer_Zprava,DIALOG_STYLE_INPUT,"Napsat soukromou zprávu:","Zadejte zprávu kterou chcete hráči poslat:","Poslat","Zavřít");
- }
- }
- }
- // --------------------------------------------------------------------- //
- if(dialogid == D_ClickPlayer_Penize)
- {
- if(response == 1)
- {
- new id = ClickPlayer[playerid];
- new cash = strval(inputtext);
- if(!response) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nezadal si částku.");
- if(GetPlayerMoney(playerid) < cash) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemáš dostatek peněz.");
- if(cash == 0) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Zadal si malou částku.");
- if(id == playerid) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemůžeš poslat peníze sám sobě.");
- GivePlayerMoney(playerid,-cash);
- GivePlayerMoney(id,cash);
- new string[256];
- format(string, sizeof(string), "Hráč {FF0000}%s{FFFFFF} poslal hráči {FF0000}%s{FFFFFF} částku {33AA33}$%d{FFFFFF}.", Jmeno(playerid), Jmeno(id), cash);
- SendClientMessageToAll(0xFFFFFFAA, string);
- }
- }
- // --------------------------------------------------------------------- //
- if(dialogid == D_ClickPlayer_Zprava)
- {
- if(response == 1)
- {
- new id = ClickPlayer[playerid];
- if(!response) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nenapsal si žádnou zprávu.");
- if(id == playerid) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemůžeš poslat soukromou zprávu sám sobě.");
- new string[256];
- format(string, sizeof(string), "PM pro {FF0000}%s{FFFFFF} [{FF0000}%d{FFFFFF}]: {FFFF00}%s{FFFFFF}", Jmeno(id), id, inputtext);
- SendClientMessage(playerid, 0xFFFFFFAA, string);
- format(string, sizeof(string), "PM od {FF0000}%s{FFFFFF} [{FF0000}%d{FFFFFF}]: {FFFF00}%s{FFFFFF}", Jmeno(playerid), playerid, inputtext);
- SendClientMessage(id, 0xFFFFFFAA, string);
- }
- }
- // Kliknutím na hráče -------------------------------------------- Konec //
- // Radio --------------------------------------------------------------- //
- if(dialogid == D_Radio)
- {
- if(response == 1)
- {
- if(listitem == 0)
- {
- StopAudioStreamForPlayer(playerid);
- SendClientMessage(playerid,0xFF0000AA,"[!]{FFFFFF} Radio vypnuté!");
- }
- else if(listitem == 1)
- {
- PlayAudioStreamForPlayer(playerid,"http://icecast3.play.cz/evropa2-128.mp3");
- SendClientMessage(playerid,0xFFFFFFAA,"[Radio] Chvilku strpení, radio {FF9900}EVROPA 2{FFFFFF} se spouští.");
- }
- else if(listitem == 2)
- {
- PlayAudioStreamForPlayer(playerid,"http://ice.abradio.cz:8000/fajn128.mp3");
- SendClientMessage(playerid,0xFFFFFFAA,"[Radio] Chvilku strpení, radio {FF9900}FAJN{FFFFFF} se spouští.");
- }
- else if(listitem == 3)
- {
- PlayAudioStreamForPlayer(playerid,"http://sc.foxradio.cz:8888");
- SendClientMessage(playerid,0xFFFFFFAA,"[Radio] Chvilku strpení, radio {FF9900}FOX{FFFFFF} se spouští.");
- }
- else if(listitem == 4)
- {
- PlayAudioStreamForPlayer(playerid,"http://icecast6.play.cz/frekvence1-128.mp3");
- SendClientMessage(playerid,0xFFFFFFAA,"[Radio] Chvilku strpení, radio {FF9900}FREKVENCE 1{FFFFFF} se spouští.");
- }
- else if(listitem == 5)
- {
- PlayAudioStreamForPlayer(playerid,"http://icecast2.play.cz:8000/HipHopStage192.mp3");
- SendClientMessage(playerid,0xFFFFFFAA,"[Radio] Chvilku strpení, radio {FF9900}HIPHOPSTAGE{FFFFFF} se spouští.");
- }
- else if(listitem == 6)
- {
- PlayAudioStreamForPlayer(playerid,"http://icecast5.play.cz/impuls128.mp3.m3u");
- SendClientMessage(playerid,0xFFFFFFAA,"[Radio] Chvilku strpení, radio {FF9900}IMPULS{FFFFFF} se spouští.");
- }
- }
- }
- // Radio --------------------------------------------------------- Konec //
- // Weapons ------------------------------------------------------- Konec //
- if(dialogid == D_Weapons)
- {
- if(response == 1)
- {
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemáš dostatek peněz.");
- GivePlayerMoney(playerid, -100);
- GivePlayerWeapon(playerid, 5, 1);
- }
- else if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) < 250) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemáš dostatek peněz.");
- GivePlayerMoney(playerid, -250);
- GivePlayerWeapon(playerid, 8, 1);
- }
- else if(listitem == 2)
- {
- if(GetPlayerMoney(playerid) < 400) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemáš dostatek peněz.");
- GivePlayerMoney(playerid, -400);
- GivePlayerWeapon(playerid, 24, 150);
- }
- else if(listitem == 3)
- {
- if(GetPlayerMoney(playerid) < 900) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemáš dostatek peněz.");
- GivePlayerMoney(playerid, -900);
- GivePlayerWeapon(playerid, 26, 150);
- }
- else if(listitem == 4)
- {
- if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemáš dostatek peněz.");
- GivePlayerMoney(playerid, -1000);
- GivePlayerWeapon(playerid, 27, 150);
- }
- else if(listitem == 5)
- {
- if(GetPlayerMoney(playerid) < 1200) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemáš dostatek peněz.");
- GivePlayerMoney(playerid, -1200);
- GivePlayerWeapon(playerid, 28, 150);
- }
- else if(listitem == 6)
- {
- if(GetPlayerMoney(playerid) < 1500) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemáš dostatek peněz.");
- GivePlayerMoney(playerid, -1500);
- GivePlayerWeapon(playerid, 30, 150);
- }
- else if(listitem == 7)
- {
- if(GetPlayerMoney(playerid) < 1500) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemáš dostatek peněz.");
- GivePlayerMoney(playerid, -1500);
- GivePlayerWeapon(playerid, 31, 150);
- }
- else if(listitem == 8)
- {
- if(GetPlayerMoney(playerid) < 2500) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemáš dostatek peněz.");
- GivePlayerMoney(playerid, -2500);
- GivePlayerWeapon(playerid, 34, 150);
- }
- }
- }
- if(dialogid == D_Loterie)
- {
- if(response == 1)
- {
- new castka = strval(inputtext), str[150];
- if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemáš dostatek peněz, potřebuješ $200.");
- if(!strlen(inputtext)) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Zadal jsi chybé číslo.");
- if(castka < 1 || castka > 20) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Rozmezí čísel je 1 až 20.");
- Loto_Cislo[playerid] = castka;
- GivePlayerMoney(playerid, -200);
- format(str, 150, "Vsadil jsi do loterie číslo {FF0000}%d{FFFFFF}, byl ti stržen poplatek {FF0000}-$200{FFFFFF}.", castka);
- SendClientMessage(playerid, 0xFFFFFFAA, str);
- }
- }
- DialogShowed[playerid] = false;
- new h = GetPlayerHouse(playerid);
- if(dialogid == HOUSE_DIALOG)
- {
- if(response == 1)
- {
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) < HouseInfo[h][Cena]) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nemáš dostatek peněz.");
- if(!IsHouseForSale(h)) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Tento dům již někdo vlastní.");
- new s[128];
- format(s,128,"Houses/House%d.txt",h);
- dini_Set(s,"Owner",PlayerName(playerid));
- GivePlayerMoney(playerid, -HouseInfo[h][Cena]);
- SendClientMessage(playerid, 0xFF0000AA, "Nyní jsi nový Majitel tohoto domů.");
- new sx[100];
- format(sx,100,"Dům č.%d\r\nMajitel: %s",h,dini_Get(s,"Owner"));
- Update3DTextLabelText(HouseInfo[h][Text],0xFF0000FF,sx);
- DestroyPickup(HouseInfo[h][Pickup]);
- HouseInfo[h][Pickup] = CreatePickup(1272,1,HouseInfo[h][p_X],HouseInfo[h][p_Y],HouseInfo[h][p_Z]);
- }
- else if(listitem == 1)
- {
- if(!IsPlayerHouseOwner(playerid,h)) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nejsi Majitel tohoto domů.");
- new s[128];
- format(s,128,"Houses/House%d.txt",h);
- dini_Set(s,"Owner","none");
- GivePlayerMoney(playerid, HouseInfo[h][Cena]/2);
- SendClientMessage(playerid, 0xFF0000AA, "Úspešne jsi prodal svůj dům. Dostal jsi polovinu ceny domů.");
- new sx[100];
- format(sx,100,"Dům č.%d\r\nMajitel: Nikdo\r\nCena: %d",h,HouseInfo[h][Cena]);
- Update3DTextLabelText(HouseInfo[h][Text],0xFF0000FF,sx);
- DestroyPickup(HouseInfo[h][Pickup]);
- HouseInfo[h][Pickup] = CreatePickup(1273,1,HouseInfo[h][p_X],HouseInfo[h][p_Y],HouseInfo[h][p_Z]);
- }
- else if(listitem == 2)
- {
- if(!IsPlayerHouseOwner(playerid,h)) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nejsi Majitel tohoto domů.");
- new s[128];
- format(s,128,"Houses/House%d.txt",h);
- dini_IntSet(s,"Locked",1);
- HouseInfo[h][Zamek] = 0;
- SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Dveře domů zamčené.");
- }
- else if(listitem == 3)
- {
- if(!IsPlayerHouseOwner(playerid,h)) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nejsi Majitel tohoto domů.");
- SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Dveře domů odemčené.");
- new s[128];
- format(s,128,"Houses/House%d.txt",h);
- dini_IntSet(s,"Locked",0);
- HouseInfo[h][Zamek] = 1;
- }
- else if(listitem == 4)
- {
- SendClientMessage(playerid, 0xFFFFFFFF, "Informace o domů:");
- if(HouseInfo[h][Zamek] == 0)
- {
- SendClientMessage(playerid,0xFF0000AA,"Dveře domů jsou zamčené.");
- }else{
- SendClientMessage(playerid,0xFF0000AA,"Dveře domů jsou odemčené.");
- }
- if (IsHouseForSale(h))
- {
- SendClientMessage(playerid,0xFF0000AA,"Tento dům je možné si koupit.");
- }else{
- SendClientMessage(playerid,0xFF0000AA,"Tento dům není na prodej.");
- }
- }
- else if(listitem == 5){
- if(!IsPlayerHouseOwner(playerid,h)) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nejsi Majitel tohoto domů.");
- ShowPlayerDialog(playerid,CAR_DIALOG,DIALOG_STYLE_LIST,"Vozidlo","Vozidlo\nUložit tuning\nProdat vozidlo","Vybrat","Zavřít");
- DialogShowed[playerid] = true;
- }
- else if(listitem == 6)
- {
- if(HouseInfo[h][Zamek] == 0) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Dveře domů jsou zamčené.");
- SetPlayerPos(playerid, HouseInfo[h][i_X],HouseInfo[h][i_Y],HouseInfo[h][i_Z]);
- SetPlayerInterior(playerid, HouseInfo[h][iin]);
- SetPlayerVirtualWorld(playerid,HouseInfo[h][VW]);
- InHouse[playerid] = h;
- SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Dům opustíš pomocí L.ALT.");
- }
- }
- }
- if(dialogid == CAR_DIALOG && response == 1){
- new s[128];
- format(s,128,"Houses/House%d.txt",h);
- if(listitem == 0){
- ShowPlayerDialog(playerid,VEHICLE_DIALOG,DIALOG_STYLE_LIST,"Vozidlo","Infernus\t1 000 000\nTurismo\t1 250 000\nNRG-500\t250 000\nPCJ-600\t100 000\nSultan\t\t750 000\nBlade\t\t800 000\nSavanna\t650 000\nRemington\t500 000\nClover\t\t450 000\nElegy\t\t900 000\nAlpha\t\t340 000\nBullet\t\t800 000\nEuros\t\t400 000\nHotring\t\t1 200 000\nJester\t\t850 000\nPhoenix\t600 000\nSuper GT\t900 000","Koupit","Zavřít");
- DialogShowed[playerid] = true;
- }
- else if(listitem == 1){
- if(dini_Int(s,"Auto") == 0) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nevlastníš vozidlo.");
- dini_IntSet(s,"Color1",HouseInfo[h][Color1]);
- dini_IntSet(s,"Color2",HouseInfo[h][Color1]);
- dini_IntSet(s,"Paintjob",HouseInfo[h][Paintjob]);
- dini_IntSet(s,"Tuning1",HouseInfo[h][Vmod][0]);
- dini_IntSet(s,"Tuning2",HouseInfo[h][Vmod][1]);
- dini_IntSet(s,"Tuning3",HouseInfo[h][Vmod][2]);
- dini_IntSet(s,"Tuning4",HouseInfo[h][Vmod][3]);
- dini_IntSet(s,"Tuning5",HouseInfo[h][Vmod][4]);
- dini_IntSet(s,"Tuning6",HouseInfo[h][Vmod][5]);
- dini_IntSet(s,"Tuning7",HouseInfo[h][Vmod][6]);
- dini_IntSet(s,"Tuning8",HouseInfo[h][Vmod][7]);
- dini_IntSet(s,"Tuning9",HouseInfo[h][Vmod][8]);
- dini_IntSet(s,"Tuning10",HouseInfo[h][Vmod][9]);
- dini_IntSet(s,"Tuning11",HouseInfo[h][Vmod][10]);
- dini_IntSet(s,"Tuning12",HouseInfo[h][Vmod][11]);
- dini_IntSet(s,"Tuning13",HouseInfo[h][Vmod][12]);
- dini_IntSet(s,"Tuning14",HouseInfo[h][Vmod][13]);
- dini_IntSet(s,"Tuning15",HouseInfo[h][Vmod][14]);
- dini_IntSet(s,"Tuning16",HouseInfo[h][Vmod][15]);
- dini_IntSet(s,"Tuning17",HouseInfo[h][Vmod][16]);
- SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Tuning vozidla uložen.");
- }
- else if(listitem == 2){
- if(dini_Int(s,"Auto") == 0) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Nevlastníš vozidlo.");
- DestroyVehicle(HouseInfo[h][Vehicle]);
- dini_IntSet(s,"Auto",0);
- dini_IntSet(s,"Vehicle",0);
- dini_IntSet(s,"Color1",0);
- dini_IntSet(s,"Color2",0);
- dini_IntSet(s,"Paintjob",-1);
- dini_IntSet(s,"Tuning1",0);
- dini_IntSet(s,"Tuning2",0);
- dini_IntSet(s,"Tuning3",0);
- dini_IntSet(s,"Tuning4",0);
- dini_IntSet(s,"Tuning5",0);
- dini_IntSet(s,"Tuning6",0);
- dini_IntSet(s,"Tuning7",0);
- dini_IntSet(s,"Tuning8",0);
- dini_IntSet(s,"Tuning9",0);
- dini_IntSet(s,"Tuning10",0);
- dini_IntSet(s,"Tuning11",0);
- dini_IntSet(s,"Tuning12",0);
- dini_IntSet(s,"Tuning13",0);
- dini_IntSet(s,"Tuning14",0);
- dini_IntSet(s,"Tuning15",0);
- dini_IntSet(s,"Tuning16",0);
- dini_IntSet(s,"Tuning17",0);
- HouseInfo[h][Vehicle] = -1;
- //kdyz smaze vozidlo
- }
- }
- if(dialogid == VEHICLE_DIALOG && response == 1){
- new s[128];
- format(s,128,"Houses/House%d.txt",h);
- if(listitem == 0){
- if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
- HaveNotMoney(playerid,1000000);
- HouseInfo[h][Vehicle] = CreateVehicle(411,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
- dini_IntSet(s,"Vehicle",411);
- GivePlayerMoney(playerid,-1000000);
- SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
- dini_IntSet(s,"Auto",1);
- }
- if(listitem == 1){
- if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
- HaveNotMoney(playerid,1250000);
- HouseInfo[h][Vehicle] = CreateVehicle(451,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
- dini_IntSet(s,"Vehicle",451);
- GivePlayerMoney(playerid,-1250000);
- SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
- dini_IntSet(s,"Auto",1);
- }
- if(listitem == 2){
- if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
- HaveNotMoney(playerid,250000);
- HouseInfo[h][Vehicle] = CreateVehicle(522,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
- dini_IntSet(s,"Vehicle",522);
- GivePlayerMoney(playerid,-250000);
- SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si novou motorku.");
- dini_IntSet(s,"Auto",1);
- }
- if(listitem == 3){
- if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
- HaveNotMoney(playerid,100000);
- HouseInfo[h][Vehicle] = CreateVehicle(461,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
- dini_IntSet(s,"Vehicle",461);
- GivePlayerMoney(playerid,-100000);
- SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
- dini_IntSet(s,"Auto",1);
- }
- if(listitem == 4){
- if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
- HaveNotMoney(playerid,750000);
- HouseInfo[h][Vehicle] = CreateVehicle(560,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
- dini_IntSet(s,"Vehicle", 560);
- GivePlayerMoney(playerid,-750000);
- SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
- dini_IntSet(s,"Auto",1);
- }
- if(listitem == 5){
- if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
- HaveNotMoney(playerid,800000);
- HouseInfo[h][Vehicle] = CreateVehicle(567,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
- dini_IntSet(s,"Vehicle",567);
- GivePlayerMoney(playerid,-800000);
- SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
- dini_IntSet(s,"Auto",1);
- }
- if(listitem == 6){
- if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
- HaveNotMoney(playerid,650000);
- HouseInfo[h][Vehicle] = CreateVehicle(534,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
- dini_IntSet(s,"Vehicle",534);
- GivePlayerMoney(playerid,-650000);
- SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
- dini_IntSet(s,"Auto",1);
- }
- if(listitem == 7){
- if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
- HaveNotMoney(playerid,500000);
- HouseInfo[h][Vehicle] = CreateVehicle(542,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
- dini_IntSet(s,"Vehicle",542);
- GivePlayerMoney(playerid,-500000);
- SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
- dini_IntSet(s,"Auto",1);
- }
- if(listitem == 8){
- if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
- HaveNotMoney(playerid,450000);
- HouseInfo[h][Vehicle] = CreateVehicle(562,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
- dini_IntSet(s,"Vehicle",562);
- GivePlayerMoney(playerid,-450000);
- SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
- dini_IntSet(s,"Auto",1);
- }
- if(listitem == 9){
- if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
- HaveNotMoney(playerid,900000);
- HouseInfo[h][Vehicle] = CreateVehicle(536,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
- dini_IntSet(s,"Vehicle",536);
- GivePlayerMoney(playerid,-900000);
- SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
- dini_IntSet(s,"Auto",1);
- }
- if(listitem == 10){
- if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
- HaveNotMoney(playerid,340000);
- HouseInfo[h][Vehicle] = CreateVehicle(602,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
- dini_IntSet(s,"Vehicle",602);
- GivePlayerMoney(playerid,-340000);
- SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
- dini_IntSet(s,"Auto",1);
- }
- if(listitem == 11){
- if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
- HaveNotMoney(playerid,800000);
- HouseInfo[h][Vehicle] = CreateVehicle(541,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
- dini_IntSet(s,"Vehicle",541);
- GivePlayerMoney(playerid,-800000);
- SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
- dini_IntSet(s,"Auto",1);
- }
- if(listitem == 12){
- if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
- HaveNotMoney(playerid,400000);
- HouseInfo[h][Vehicle] = CreateVehicle( 587,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
- dini_IntSet(s,"Vehicle", 587);
- GivePlayerMoney(playerid,-400000);
- SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
- dini_IntSet(s,"Auto",1);
- }
- if(listitem == 13){
- if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
- HaveNotMoney(playerid,1200000);
- HouseInfo[h][Vehicle] = CreateVehicle(494,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
- dini_IntSet(s,"Vehicle",494);
- GivePlayerMoney(playerid,-1200000);
- SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
- dini_IntSet(s,"Auto",1);
- }
- if(listitem == 14){
- if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
- HaveNotMoney(playerid,850000);
- HouseInfo[h][Vehicle] = CreateVehicle(559,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
- dini_IntSet(s,"Vehicle",559);
- GivePlayerMoney(playerid,-850000);
- SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
- dini_IntSet(s,"Auto",1);
- }
- if(listitem == 15){
- if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
- HaveNotMoney(playerid,600000);
- HouseInfo[h][Vehicle] = CreateVehicle( 603,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
- dini_IntSet(s,"Vehicle", 603);
- GivePlayerMoney(playerid,-600000);
- SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
- dini_IntSet(s,"Auto",1);
- }
- if(listitem == 16){
- if(dini_Int(s,"Auto") == 1) return SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Již vlastníš vozidlo.");
- HaveNotMoney(playerid,900000);
- HouseInfo[h][Vehicle] = CreateVehicle( 506,HouseInfo[h][v_X],HouseInfo[h][v_Y],HouseInfo[h][v_Z],HouseInfo[h][v_A],random(128),random(128),-1);
- dini_IntSet(s,"Vehicle", 506);
- GivePlayerMoney(playerid,-900000);
- SendClientMessage(playerid, 0xFF0000AA,"[!]{FFFFFF} Koupil si si nové vozidlo.");
- dini_IntSet(s,"Auto",1);
- }
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- ClickPlayer[playerid] = clickedplayerid;
- new str[128];
- format(str,128,"%s",Jmeno(clickedplayerid));
- ShowPlayerDialog(playerid,D_ClickPlayer,DIALOG_STYLE_LIST,str,"Poslat hráči peníze\nNapsat hráči soukromou zprávu","Vybrat","Zavřít");
- return 1;
- }
- forward UpdateAll();
- public UpdateAll()
- {
- new str[256],Float:ratio;
- for(new i; i < MAX_PLAYERS;i++){
- if(Killed[i] == 0) ratio = Kill[i];
- else ratio = float(Kill[i])/float(Killed[i]);
- new Fps = GetPlayerFPS(i);
- new Ping = GetPlayerPing(i);
- format(str,256,"~w~Kills: ~b~%d ~w~l Deaths: ~r~%d ~w~l Ratio: ~y~%0.2f~n~~w~Fps: ~y~%d ~w~l Ping: ~r~%d~n~~w~Respect: ~g~%d",Kill[i],Killed[i],ratio,Fps,Ping,Respekt[i]);
- TextDrawSetString(ZUR[i],str);
- TextDrawHideForPlayer(i,ZUR[i]);
- TextDrawShowForPlayer(i,ZUR[i]);
- }
- return 1;
- }
- stock UpdatePlayer(playerid)
- {
- new str[256],Float:ratio;
- if(Killed[playerid] == 0) ratio = Kill[playerid];
- else ratio = float(Kill[playerid])/float(Killed[playerid]);
- new Fps = GetPlayerFPS(playerid);
- new Ping = GetPlayerPing(playerid);
- format(str,256,"~w~Kills: ~b~%d ~w~l Deaths: ~r~%d ~w~l Ratio: ~y~%0.2f~n~~w~Fps: ~y~%d ~w~l Ping: ~r~%d~n~~w~Respect: ~g~%d",Kill[playerid],Killed[playerid],ratio,Fps,Ping,Respekt[playerid]);
- TextDrawSetString(ZUR[playerid],str);
- TextDrawHideForPlayer(playerid,ZUR[playerid]);
- TextDrawShowForPlayer(playerid,ZUR[playerid]);
- return 1;
- }
- stock TextDraws()
- {
- for(new i; i < MAX_PLAYERS;i++){
- ZUR[i] = TextDrawCreate(470 ,390 ,"~w~Kills: ~b~0 ~w~l Deaths: ~r~0 ~w~l Ratio: ~y~0.00~n~~w~Fps: ~y~0 ~w~l Ping: ~r~0~n~~w~Respect: ~g~0");
- TextDrawTextSize(ZUR[i] ,700,700);
- TextDrawFont(ZUR[i],1);
- TextDrawSetShadow(ZUR[i],1);
- TextDrawColor(ZUR[i], 0xFFFFFFAA);
- TextDrawUseBox(ZUR[i],0);
- TextDrawLetterSize(ZUR[i] ,0.20 ,1.20);
- TextDrawBoxColor(ZUR[i], 0xFFFFFFAA);
- }
- ModeName = TextDrawCreate(500 ,5 ,"~g~Kill ~w~or be ~r~Killed");
- TextDrawTextSize(ModeName ,700,700);
- TextDrawFont(ModeName,1);
- TextDrawSetShadow(ModeName,1);
- TextDrawColor(ModeName, 0xFFFFFFAA);
- TextDrawUseBox(ModeName,0);
- TextDrawLetterSize(ModeName ,0.20 ,1.20);
- TextDrawBoxColor(ModeName, 0xFFFFFFAA);
- txtTimeDisp = TextDrawCreate(565 ,40 ,"~w~00~r~:~w~00");
- TextDrawTextSize(txtTimeDisp ,700,700);
- TextDrawFont(txtTimeDisp,1);
- TextDrawSetShadow(txtTimeDisp,1);
- TextDrawColor(txtTimeDisp, 0xFFFFFFAA);
- TextDrawUseBox(txtTimeDisp,0);
- TextDrawLetterSize(txtTimeDisp ,0.20 ,1.20);
- TextDrawBoxColor(txtTimeDisp, 0xFFFFFFAA);
- TimeName = TextDrawCreate(565 ,30 ,"~w~Time~r~:");
- TextDrawTextSize(TimeName,700,700);
- TextDrawFont(TimeName,1);
- TextDrawSetShadow(TimeName,1);
- TextDrawColor(TimeName, 0xFFFFFFAA);
- TextDrawUseBox(TimeName,0);
- TextDrawLetterSize(TimeName ,0.20 ,1.20);
- TextDrawBoxColor(TimeName, 0xFFFFFFAA);
- ModeName2 = TextDrawCreate(180 ,200 ,"~n~ ~g~Kill ~w~or be ~r~Killed~n~");
- TextDrawTextSize(ModeName2 ,700,700);
- TextDrawFont(ModeName2,1);
- TextDrawSetShadow(ModeName2,1);
- TextDrawColor(ModeName2, 0xFFFFFFAA);
- TextDrawUseBox(ModeName2,0);
- TextDrawLetterSize(ModeName2 ,1.00 ,3.00);
- TextDrawBoxColor(ModeName2, 0xFFFFFFAA);
- }
- stock GetPlayerFPS(playerid) return pFPS[playerid];
- stock Jmeno(playerid)
- {
- new n[26];
- GetPlayerName(playerid, n, sizeof(n));
- return n;
- }
- stock Warp(playerid, Float:X, Float:Y, Float:Z, interior){
- if(IsPlayerConnected(playerid)){
- if(IsPlayerInAnyVehicle(playerid)){
- SetPlayerInterior(playerid, interior);
- LinkVehicleToInterior(GetPlayerVehicleID(playerid), interior);
- SetVehiclePos(GetPlayerVehicleID(playerid), X,Y,Z);
- }else{
- SetPlayerInterior(playerid, interior);
- SetPlayerPos(playerid, X,Y,Z);
- }
- }
- }
- stock chrfind(needle, haystack[], start = 0)
- {
- while (haystack[start]) if (haystack[start++] == needle) return start - 1;
- return -1;
- }
- stock sscanf(string[], format[], {Float,_}:...)
- {
- #if defined isnnull
- if (isnnull(string))
- #else
- if (string[0] == 0 || (string[0] == 1 && string[1] == 0))
- #endif
- {
- return format[0];
- }
- #pragma tabsize 4
- new
- formatPos = 0,
- stringPos = 0,
- paramPos = 2,
- paramCount = numargs(),
- delim = ' ';
- while (string[stringPos] && string[stringPos] <= ' ')
- {
- stringPos++;
- }
- while (paramPos < paramCount && string[stringPos])
- {
- switch (format[formatPos++])
- {
- case '\0':
- {
- return 0;
- }
- case 'i', 'd':
- {
- new
- neg = 1,
- num = 0,
- ch = string[stringPos];
- if (ch == '-')
- {
- neg = -1;
- ch = string[++stringPos];
- }
- do
- {
- stringPos++;
- if ('0' <= ch <= '9')
- {
- num = (num * 10) + (ch - '0');
- }
- else
- {
- return -1;
- }
- }
- while ((ch = string[stringPos]) > ' ' && ch != delim);
- setarg(paramPos, 0, num * neg);
- }
- case 'h', 'x':
- {
- new
- num = 0,
- ch = string[stringPos];
- do
- {
- stringPos++;
- switch (ch)
- {
- case 'x', 'X':
- {
- num = 0;
- continue;
- }
- case '0' .. '9':
- {
- num = (num << 4) | (ch - '0');
- }
- case 'a' .. 'f':
- {
- num = (num << 4) | (ch - ('a' - 10));
- }
- case 'A' .. 'F':
- {
- num = (num << 4) | (ch - ('A' - 10));
- }
- default:
- {
- return -1;
- }
- }
- }
- while ((ch = string[stringPos]) > ' ' && ch != delim);
- setarg(paramPos, 0, num);
- }
- case 'c':
- {
- setarg(paramPos, 0, string[stringPos++]);
- }
- case 'f':
- {
- new changestr[16], changepos = 0, strpos = stringPos;
- while(changepos < 16 && string[strpos] && string[strpos] != delim)
- {
- changestr[changepos++] = string[strpos++];
- }
- changestr[changepos] = '\0';
- setarg(paramPos,0,_:floatstr(changestr));
- }
- case 'p':
- {
- delim = format[formatPos++];
- continue;
- }
- case '\'':
- {
- new
- end = formatPos - 1,
- ch;
- while ((ch = format[++end]) && ch != '\'') {}
- if (!ch)
- {
- return -1;
- }
- format[end] = '\0';
- if ((ch = strfind(string, format[formatPos], false, stringPos)) == -1)
- {
- if (format[end + 1])
- {
- return -1;
- }
- return 0;
- }
- format[end] = '\'';
- stringPos = ch + (end - formatPos);
- formatPos = end + 1;
- }
- case 'u':
- {
- new
- end = stringPos - 1,
- id = 0,
- bool:num = true,
- ch;
- while ((ch = string[++end]) && ch != delim)
- {
- if (num)
- {
- if ('0' <= ch <= '9')
- {
- id = (id * 10) + (ch - '0');
- }
- else
- {
- num = false;
- }
- }
- }
- if (num && IsPlayerConnected(id))
- {
- setarg(paramPos, 0, id);
- }
- else
- {
- #if !defined foreach
- #define foreach(%1,%2) for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
- #define __SSCANF_FOREACH__
- #endif
- string[end] = '\0';
- num = false;
- new
- name[MAX_PLAYER_NAME];
- id = end - stringPos;
- foreach (Player, playerid)
- {
- GetPlayerName(playerid, name, sizeof (name));
- if (!strcmp(name, string[stringPos], true, id))
- {
- setarg(paramPos, 0, playerid);
- num = true;
- break;
- }
- }
- if (!num)
- {
- setarg(paramPos, 0, INVALID_PLAYER_ID);
- }
- string[end] = ch;
- #if defined __SSCANF_FOREACH__
- #undef foreach
- #undef __SSCANF_FOREACH__
- #endif
- }
- stringPos = end;
- }
- case 's', 'z':
- {
- new
- i = 0,
- ch;
- if (format[formatPos])
- {
- while ((ch = string[stringPos++]) && ch != delim)
- {
- setarg(paramPos, i++, ch);
- }
- if (!i)
- {
- return -1;
- }
- }
- else
- {
- while ((ch = string[stringPos++]))
- {
- setarg(paramPos, i++, ch);
- }
- }
- stringPos--;
- setarg(paramPos, i, '\0');
- }
- default:
- {
- continue;
- }
- }
- while (string[stringPos] && string[stringPos] != delim && string[stringPos] > ' ')
- {
- stringPos++;
- }
- while (string[stringPos] && (string[stringPos] == delim || string[stringPos] <= ' '))
- {
- stringPos++;
- }
- paramPos++;
- }
- do
- {
- if ((delim = format[formatPos++]) > ' ')
- {
- if (delim == '\'')
- {
- while ((delim = format[formatPos++]) && delim != '\'') {}
- }
- else if (delim != 'z')
- {
- return delim;
- }
- }
- }
- while (delim > ' ');
- return 0;
- }
- stock GetVehicleMaxDoor(vehicleid)
- {
- new a;
- if(vehicleid < 400 || vehicleid > 611) return 0;
- switch(vehicleid)
- {
- case 435,449,450,465,501,564,569,570,584,590,591,594,606,607,608,610,611: a=0;
- case 406,425,430,431,432,441,446,448,452,453,454,464,472,473,476,481,484,485,486,493,509,510,512,513,519,520,530,531,532,537,538,539,548,553,568,571,572,574,577,583,592,595: a=1;
- case 401..403,407,408,410..412,414,415,417,419,422,423,424,429,433,434,436,439,442,443,444,447,451,455,456,457,460,461,462,463,468,469,471,474,475,477,478,480,488,489,491,494,495,496,499,500,502,503,504,505,506,508,511,514,515,517,518,521,522,523,524,525,526,527,528,533,534,535,536,541,542,543,544,545,549,552,554,555,556,557,558,559,562,563,565,573,575,576,578,581,586,587,588,589,593,599,600,601,602,603,605: a=2;
- case 483: a=3;
- case 400,404,405,409,413,416,418,420,421,426,427,428,438,440,445,458,459,466,467,470,479,482,487,490,492,497,498,507,516,529,540,546,547,550,551,560,561,566,567,579,580,582,585,596,597,598,604,609: a=4;
- case 437: a=5;
- default: a=0;
- }
- return a;
- }
- stock PlayerName(playerid){
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,MAX_PLAYER_NAME);
- return name;
- }
- stock IsPlayerHouseOwner(playerid,houseid)
- {
- new cesta[50];
- format(cesta,150,"Houses/House%d.txt",houseid);
- if(strcmp(PlayerName(playerid),dini_Get(cesta,"Owner"), false) == 0) return true;
- return false;
- }
- stock IsHouseForSale(houseid)
- {
- new cesta[50];
- format(cesta,150,"Houses/House%d.txt",houseid);
- if(strcmp("none",dini_Get(cesta,"Owner"), false) == 0) return true;
- return false;
- }
- stock GetPlayerHouse(playerid){
- for(new h=0;h<HouseCount+1;h++)
- {
- if(IsPlayerInRangeOfPoint(playerid,2,HouseInfo[h][p_X],HouseInfo[h][p_Y],HouseInfo[h][p_Z]))
- {
- return h;
- }
- }
- return -1;
- }
- InitComponents(componentid)
- {
- new i;
- for(i=0; i<20; i++)
- {
- if(spoiler[i][0]==componentid) { return 1; }
- }
- for(i=0; i<3; i++)
- {
- if(nitro[i][0]==componentid) { return 2; }
- }
- for(i=0; i<23; i++)
- {
- if(fbumper[i][0]==componentid) { return 3; }
- }
- for(i=0; i<22; i++)
- {
- if(rbumper[i][0]==componentid) { return 4; }
- }
- for(i=0; i<28; i++)
- {
- if(exhaust[i][0]==componentid) { return 5; }
- }
- for(i=0; i<2; i++)
- {
- if(bventr[i][0]==componentid) { return 6; }
- }
- for(i=0; i<2; i++)
- {
- if(bventl[i][0]==componentid) { return 7; }
- }
- for(i=0; i<4; i++)
- {
- if(bscoop[i][0]==componentid) { return 8; }
- }
- for(i=0; i<13; i++)
- {
- if(rscoop[i][0]==componentid) { return 9; }
- }
- for(i=0; i<21; i++)
- {
- if(lskirt[i][0]==componentid) { return 10; }
- }
- for(i=0; i<21; i++)
- {
- if(rskirt[i][0]==componentid) { return 11; }
- }
- if(hydraulics[0][0]==componentid) { return 12; }
- if(base[0][0]==componentid) { return 13; }
- for(i=0; i<2; i++)
- {
- if(rbbars[i][0]==componentid) { return 14; }
- }
- for(i=0; i<2; i++)
- {
- if(fbbars[i][0]==componentid) { return 15; }
- }
- for(i=0; i<17; i++)
- {
- if(wheels[i][0]==componentid) { return 16; }
- }
- for(i=0; i<2; i++)
- {
- if(lights[i][0]==componentid) { return 17; }
- }
- return 0;
- }
- stock TuneThisCar(i,vehicleid)
- {
- if(HouseInfo[i][Vmod][0]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][0]); }
- if(HouseInfo[i][Vmod][1]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][1]); }
- if(HouseInfo[i][Vmod][2]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][2]); }
- if(HouseInfo[i][Vmod][3]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][3]); }
- if(HouseInfo[i][Vmod][4]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][4]); }
- if(HouseInfo[i][Vmod][5]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][5]); }
- if(HouseInfo[i][Vmod][6]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][6]); }
- if(HouseInfo[i][Vmod][7]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][7]); }
- if(HouseInfo[i][Vmod][8]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][8]); }
- if(HouseInfo[i][Vmod][9]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][9]); }
- if(HouseInfo[i][Vmod][10]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][10]); }
- if(HouseInfo[i][Vmod][11]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][11]); }
- if(HouseInfo[i][Vmod][12]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][12]); }
- if(HouseInfo[i][Vmod][13]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][13]); }
- if(HouseInfo[i][Vmod][14]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][14]); }
- if(HouseInfo[i][Vmod][15]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][15]); }
- if(HouseInfo[i][Vmod][16]!=0) { AddVehicleComponent(vehicleid,HouseInfo[i][Vmod][16]); }
- if(HouseInfo[i][Paintjob]!=-1) { ChangeVehiclePaintjob(vehicleid,HouseInfo[i][Paintjob]); }
- if(HouseInfo[i][Color1]!=0 || HouseInfo[i][Color2]!=0)
- {
- ChangeVehicleColor(vehicleid,HouseInfo[i][Color1],HouseInfo[i][Color2]);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement