I need some help [fraktions]
#1

i looked at some tutorials but i never understood this ^^ can u show me ho to add Fraktions in my Gamemode? I want the AddPlayerClasses as Fraktions, only the first two zivilist sholud be able to take
Here is my full gamemode, its working 100%.
Thank you!

Код:
// Leichenleute
#include <a_samp>

public OnFilterScriptExit()
{
	return 1;
}
main()
{
	print("\n----------------------------------");
	print(" ..:DRNt:..");
	print(" by KampfMopZ ");
	print("----------------------------------\n");
}

public OnGameModeInit()
{
	// Spielerklassen
	SetGameModeText("DRN");
    AddPlayerClass(41,1673.7968,1447.2263,10.7844,294.4628,14,1,0,0,0,0); //Zivi Flughafen (weiblich)
    AddPlayerClass(26,2860.4595,1292.8418,11.3906,124.8445,4,1,0,0,0,0); // Zivi Zug (mдnnlich)
    AddPlayerClass(122,1040.2395,1303.6963,10.8203,1.1516,22,27,0,0,0,0); // Da Nang
    AddPlayerClass(287,279.4179,1833.5667,17.8676,358.6455,22,27,31,250,38,1500); // Bundeswehr
    AddPlayerClass(16,2814.8032,973.4550,10.7500,192.0434,4,1,0,0,0,0); //Stadtwerke Nuklearstadt
    AddPlayerClass(115,2487.9050,2398.4531,10.8203,271.9390,22,27,0,0,0,0); // Autodiebe (Vargos)
    AddPlayerClass(117,1897.3726,681.2701,10.8203,294.2263,22,27,0,0,0,0); //Auftragskiller
    AddPlayerClass(276,1583.4896,1769.0594,10.8203,106.3121,22,27,0,0,0,0); // Krankenhaus
    AddPlayerClass(277,1769.6420,2081.4060,10.8203,204.0989,6,1,0,0,0,0); // Feuerwehr
    AddPlayerClass(280,2337.4512,2458.8218,14.9688,14.1284,22,27,0,0,0,0); // Polizei
    AddPlayerClass(164,2000.7148,1525.9048,14.6172,344.4165,1,1,27,180,38,10000); // Superadmin
    

    // Autos
    /*::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
    // Polizei
    SetVehicleNumberPlate(CreateVehicle(599,2314.2881,2455.3110,3.4633,270.7912,0,1, -1), "Polizei-1");// Polizei Ranger 1
    SetVehicleNumberPlate(CreateVehicle(599,2314.0359,2480.6233,3.4631,270.7360,0,1, -1), "Polizei-2");// Polizei Ranger 1
    SetVehicleNumberPlate(CreateVehicle(598,2268.5437,2474.4795,3.4639,177.9949,0,1, -1), "Polizei-3");// Polizei Auto 1
    SetVehicleNumberPlate(CreateVehicle(598,2263.8201,2474.0398,3.0210,357.8968,0,1, -1), "Polizei-4");// Polizei Auto 2
    SetVehicleNumberPlate(CreateVehicle(598,2240.2266,2471.1558,3.0162,88.0408,0,1, -1), "Polizei-5");// Polizei Auto 3
    SetVehicleNumberPlate(CreateVehicle(601,2226.5974,2458.6731,-7.2592,89.1041,0,1, -1), "Polizei-6");// Wasserpanzer
    SetVehicleNumberPlate(CreateVehicle(523,2256.4534,2444.0569,10.3854,168.8099,0,1, -1), "Polizei-7");// Motorrad 1
    SetVehicleNumberPlate(CreateVehicle(523,2240.5581,2475.4351,3.4661,89.6483,0,1, -1), "Polizei-8");// Motorrad 2
    SetVehicleNumberPlate(CreateVehicle(523,2260.5996,2443.5583,10.3946,184.1373,0,1, -1), "Polizei-9");// Motorrad 3
    
    // Bundeswehr
    SetVehicleNumberPlate(CreateVehicle(470,271.8863,1978.7411,17.6374,275.5085,243,1, -1), "BW-1");// Patriot 1
    SetVehicleNumberPlate(CreateVehicle(470,280.2787,1989.8644,17.6345,279.0660,243,1, -1), "BW-2");// Patriot 2
    SetVehicleNumberPlate(CreateVehicle(470,270.7959,1984.2654,17.6320,276.7364,243,1, -1), "BW-3");// Patriot 3
    SetVehicleNumberPlate(CreateVehicle(433,273.7652,2018.2791,17.6304,278.3372,243,1, -1), "BW-4");// Truck
    SetVehicleNumberPlate(CreateVehicle(444,277.6732,1998.0297,17.6303,264.7662,243,1, -1), "BW-5");// Monstertruck
    SetVehicleNumberPlate(CreateVehicle(521,278.8461,1977.9375,17.6337,315.4432,243,1, -1), "BW-6");// FRC 900 1
    SetVehicleNumberPlate(CreateVehicle(521,279.8675,1982.7228,17.6362,306.4090,243,1, -1), "BW-7");// FRC 900 2
    SetVehicleNumberPlate(CreateVehicle(539,2505.6035,2711.3547,10.5247,272.4566,243,1, -1), "BW-7");// Vortex Hovercart
    SetVehicleNumberPlate(CreateVehicle(432,273.8799,1948.2053,17.6300,274.1331,243,1, -1), "BW-9");// Panzer
    SetVehicleNumberPlate(CreateVehicle(432,274.7448,1959.6072,17.6343,267.6766,243,1, -1), "BW-10");// Panzer
    SetVehicleNumberPlate(CreateVehicle(425,362.0978,1937.2734,17.6342,97.0411,243,1, -1), "HNTR-1");// Hunter 1
	SetVehicleNumberPlate(CreateVehicle(425,362.4151,1972.1219,17.6346,119.6343,243,1, -1), "HNTR-2");// Hunter 2
	SetVehicleNumberPlate(CreateVehicle(520,308.8718,2049.2124,17.6326,179.2669,243,1, -1), "HYDR-1");// Hydra 1
	SetVehicleNumberPlate(CreateVehicle(520,299.6486,2052.3208,17.6360,178.4136,243,1, -1), "HYDR-2");// Hydra 2

    // Krankenhaus
    SetVehicleNumberPlate(CreateVehicle(416,1579.8630,1791.2183,10.5561,179.8340,151,1, -1), "KH-1");// Krankenwagen 1
    SetVehicleNumberPlate(CreateVehicle(416,1582.4247,1745.2654,10.5585,91.0224,151,1, -1), "KH-2");// Krankenwagen 2
    SetVehicleNumberPlate(CreateVehicle(581,1616.9299,1838.5569,10.3916,3.1035,151,1, -1), "KH-3");// Motorrad 1
    SetVehicleNumberPlate(CreateVehicle(581,1594.0953,1832.0254,10.3914,178.8649,151,1, -1), "KH-4");// Motorrad 2
    SetVehicleNumberPlate(CreateVehicle(487,1606.4019,1768.8352,37.3125,8.2846,151,1, -1), "KH-5");// Maverick

    //Sixt
	SetVehicleNumberPlate(CreateVehicle(405,1713.9341,1472.4437,10.5654,161.1487,7,1, -1), "Sixt-1");// Sixt Sentinel 1
    SetVehicleNumberPlate(CreateVehicle(405,1705.0391,1436.9319,10.4850,176.2805,132,1, -1), "Sixt-2");// Sixt Sentinel 2
    SetVehicleNumberPlate(CreateVehicle(405,1726.9995,1391.3506,10.3871,16.5643,130,1, -1), "Sixt-3");// Sixt Sentinel 3
    SetVehicleNumberPlate(CreateVehicle(410,1676.4951,1306.1927,10.5677,180.3627,71,1, -1), "Sixt-4");// Sixt Manana 1
    SetVehicleNumberPlate(CreateVehicle(410,1689.1573,1305.6443,10.4734,180.7652,103,1, -1), "Sixt-5");// Sixt Manana 2
    SetVehicleNumberPlate(CreateVehicle(410,2226.5974,2458.6731,-7.2592,89.1041,51,1, -1), "Sixt-6");// Sixt Manana 3
    SetVehicleNumberPlate(CreateVehicle(436,2251.4092,2442.5774,11.0107,178.7200,151,1, -1), "Sixt-7");// Sixt Previon 1
    SetVehicleNumberPlate(CreateVehicle(436,1695.3953,1316.9962,10.5885,1.4395,65,1, -1), "Sixt-8");// Sixt Previon 2
	SetVehicleNumberPlate(CreateVehicle(436,2260.5996,2443.5583,10.3946,184.1373,0,1, -1), "Sixt-9");// Sixt Previon 3
    //Flugzeuge
	SetVehicleNumberPlate(CreateVehicle(577,1537.7594,1441.2240,11.0338,24.0837,0,1, -1), "Flug-01");// Kleiner Airbus
    SetVehicleNumberPlate(CreateVehicle(519,1605.1946,1615.7657,11.0157,148.8852,0,1, -1), "Flug-02");// Privatjet
    //Gang Da Nang
    SetVehicleNumberPlate(CreateVehicle(587,1066.7795,1288.2394,11.0083,180.2076,101,1, -1), "Nang-1");// Gang Euros 1
    SetVehicleNumberPlate(CreateVehicle(587,1090.6398,1233.8704,11.0128,261.5386,101,1, -1), "Nang-2");// Gang Euros 2
	SetVehicleNumberPlate(CreateVehicle(587,1089.7905,1273.6022,11.0076,273.5336,101,1, -1), "Nang-3");// Gang Euros 3
    SetVehicleNumberPlate(CreateVehicle(400,1044.9221,1347.3442,11.0068,85.0191,101,1, -1), "Nang-3");// Gang Landstalker
    SetVehicleNumberPlate(CreateVehicle(547,1091.1863,1356.5658,11.0132,269.9403,101,1, -1), "Nang-4");// Gang Primo 1
    SetVehicleNumberPlate(CreateVehicle(547,1037.2205,1307.5934,11.0070,169.9154,101,1, -1), "Nang-5");// Gang Primo 2
    SetVehicleNumberPlate(CreateVehicle(547,1096.5043,1366.7589,11.0071,270.0289,101,1, -1), "Nang-6");// Gang Primo 3
    SetVehicleNumberPlate(CreateVehicle(521,1053.4659,1366.0826,11.0048,265.9622,101,1, -1), "Nang-7");// Gang FCR-900
    //Stadtwerke
    SetVehicleNumberPlate(CreateVehicle(471,2804.8645,940.0552,10.4964,178.7814,118,1, -1), "SW-1");// Quad
    SetVehicleNumberPlate(CreateVehicle(552,2811.1306,938.8313,10.4995,180.9367,118,1, -1), "SW-2");// Utiliti-Van
	SetVehicleNumberPlate(CreateVehicle(552,2817.4297,938.6637,10.4963,179.9472,118,1, -1), "SW-3");// Utiliti-Van
    SetVehicleNumberPlate(CreateVehicle(525,2827.3367,928.1806,10.4973,355.4052,118,1, -1), "SW-4");// Abschlepper
    SetVehicleNumberPlate(CreateVehicle(574,2811.1235,928.4958,10.4944,0.2655,118,1, -1), "SW-5");// Kehrmaschine
    SetVehicleNumberPlate(CreateVehicle(572,2833.2637,928.6903,10.5179,358.5944,118,1, -1), "SW-6");// Rasenmдher
    SetVehicleNumberPlate(CreateVehicle(422,2833.9045,939.7069,10.4945,179.8992,118,1, -1), "SW-7");// Bobcat SW
    SetVehicleNumberPlate(CreateVehicle(422,2804.6265,927.4565,10.4925,0.1813,118,1, -1), "SW-8");// Bobcat SW
	SetVehicleNumberPlate(CreateVehicle(408,2789.2856,1006.0909,11.2846,357.3838,0,1, -1), "SW-9");// Mьll-Laster
	SetVehicleNumberPlate(CreateVehicle(443,2827.5986,896.2371,10.0442,359.7175,130,1, -1), "SW-10");// Packer-LKW
	//Gang [3]
    SetVehicleNumberPlate(CreateVehicle(415,2511.8801,2375.0151,10.5689,265.3213,144,1, -1), "LS-82");// Cheeta-Geklaut
    SetVehicleNumberPlate(CreateVehicle(419,2513.1458,2360.2200,10.5649,264.7461,126,1, -1), "LV-12");// Esperanto-Geklaut
	SetVehicleNumberPlate(CreateVehicle(426,2512.7087,2364.4541,10.5631,274.1859,0,1, -1), "Dieb-1");// Premier
    SetVehicleNumberPlate(CreateVehicle(426,2511.1191,2394.4160,10.5666,269.0092,0,1, -1), "Dieb-2");// Premier
    SetVehicleNumberPlate(CreateVehicle(434,2513.8025,2372.4744,3.9596,271.1566,0,1, -1), "Dieb-3");// Hotknife
    SetVehicleNumberPlate(CreateVehicle(475,2525.0569,2381.0989,3.9536,87.4805,6,1, -1), "Dieb-4");// Sabre
    SetVehicleNumberPlate(CreateVehicle(475,2528.7778,2398.0500,3.9541,2.0229,6,1, -1), "Dieb-5");// Sabre
    // Admin
    SetVehicleNumberPlate(CreateVehicle(506,2040.2649,1553.6182,10.6719,358.5083,6,1, -1), "HH-88");// Auto 1
    SetVehicleNumberPlate(CreateVehicle(451,2040.0289,1533.5247,10.6719,178.9900,144,1, -1), "HH-444");// Auto 2
    SetVehicleNumberPlate(CreateVehicle(522,2038.7775,1544.5332,10.6719,262.9642,126,1, -1), "S-Admin");// Adminbike
    // Schutzstaffel
    SetVehicleNumberPlate(CreateVehicle(587,1916.5406,697.7056,10.5646,2.5229,0,1, -1), "AK-1");// Euros-SS 1
    SetVehicleNumberPlate(CreateVehicle(587,1932.3835,697.2249,10.5667,358.1956,0,1, -1), "AK-2");// Euros-SS 2
	SetVehicleNumberPlate(CreateVehicle(587,1926.0480,709.4722,10.5594,181.0207,0,1, -1), "AK-3");// Euros-SS 3
    SetVehicleNumberPlate(CreateVehicle(470,1916.3315,708.6348,10.5668,176.4168,0,1, -1), "AK-4");// Patriot 1
    SetVehicleNumberPlate(CreateVehicle(470,1913.4376,709.8135,10.5622,181.4514,0,1, -1), "AK-5");// Patriot 2
    SetVehicleNumberPlate(CreateVehicle(470,1928.9889,698.2945,10.5948,3.5541,0,1, -1), "AK-5");// Patriot 3
    SetVehicleNumberPlate(CreateVehicle(521,1942.3856,667.8450,10.5639,270.9399,0,1, -1), "AK-6");// FRC-SS 1
    SetVehicleNumberPlate(CreateVehicle(521,1916.1501,738.1306,10.5659,95.1779,0,1, -1), "AK-7");// FRC-SS 2
	return 1;
}
//Klassenwahl-Script
public OnPlayerRequestClass(playerid,classid)
{

SetPlayerPos(playerid,2260.9995,-285.0844,64.4470);
SetPlayerCameraPos(playerid,2261.4006,-288.7633,64.3798);
SetPlayerCameraLookAt(playerid,2261.5576,-285.6434,64.4228);
SetPlayerFacingAngle(playerid, 193.9833);
return 1;
}
Reply


Forum Jump:


Users browsing this thread: