A game móde még nincs teljesen kész azaz még csak a béta verzióját töltöttem fel![/quote]
Kasztok:
Gyalogos
Mesterlövész
Nehézfegyveres
Szanitéc
Régen foglalkoztam már vele, szóval valószínûleg bugos.
Használjátok egészséggel és sok sikert a befejezéshez.
#include <a_samp>
#include <fixchars>
#include <zcmd>
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
new gTeam[MAX_PLAYERS];
new CTFZona;
new FeherMesa;
new FeherRancher;
new FeherQuad1;
new FeherQuad2;
new VorosMesa;
new VorosRancher;
new VorosQuad1;
new VorosQuad2;
new FeherZaszlo;
new VorosZaszlo;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
forward ASD(playerid);
public ASD(playerid)
{
SetPlayerHealth(playerid, 100);
TogglePlayerControllable(playerid,1);
return 1;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define FEHER_CSAPAT 0
#define VOROS_CSAPAT 1
#define COLOR_WHITE 0xFFFFFFAA //Fehér Csapat
#define COLOR_DARKRED 0x660000AA //Vörös Csapat
#define COLOR_CYAN 0x99FFFFAA //CTFZona
#define FEGYVERZETDIALOG 1
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
main()
{
print(\"Szerezd meg a zászlót! GameMode by Neo\");
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
public OnGameModeInit()
{
SetGameModeText(\"[HUN]CTF\");
UsePlayerPedAnims();
GangZoneCreate(1758.3746,783.9999,1577.0929,661.9604);
CreateObject(987,1577.50000000,662.40002441,9.80000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (1)
CreateObject(987,1589.50000000,662.40002441,9.80000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (2)
CreateObject(987,1601.50000000,662.40002441,9.80000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (3)
CreateObject(987,1613.50000000,662.40002441,9.80000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (4)
CreateObject(987,1625.50000000,662.40002441,9.80000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (5)
CreateObject(987,1637.50000000,662.40002441,9.80000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (6)
CreateObject(987,1649.50000000,662.40002441,9.80000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (7)
CreateObject(987,1661.50000000,662.40002441,9.80000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (
CreateObject(987,1673.50000000,662.40002441,9.80000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (9)
CreateObject(987,1685.50000000,662.40002441,9.80000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (10)
CreateObject(987,1697.50000000,662.40002441,9.80000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (11)
CreateObject(987,1709.50000000,662.40002441,9.80000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (12)
CreateObject(987,1721.50000000,662.40002441,9.80000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (13)
CreateObject(987,1733.50000000,662.40002441,9.80000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (14)
CreateObject(987,1745.40002441,662.50000000,9.80000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (15)
CreateObject(987,1745.80004883,662.59997559,9.80000019,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (16)
CreateObject(987,1758.00000000,662.40002441,9.80000019,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (17)
CreateObject(987,1758.00000000,674.40002441,9.80000019,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (18)
CreateObject(987,1758.00000000,686.40002441,9.80000019,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (19)
CreateObject(987,1758.00000000,698.40002441,9.80000019,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (20)
CreateObject(987,1758.00000000,710.40002441,9.80000019,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (21)
CreateObject(987,1758.00000000,722.40002441,9.80000019,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (22)
CreateObject(987,1758.00000000,734.40002441,9.80000019,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (23)
CreateObject(987,1758.00000000,746.40002441,9.80000019,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (24)
CreateObject(987,1758.00000000,758.40002441,9.80000019,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (25)
CreateObject(987,1758.00000000,770.40002441,9.80000019,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (26)
CreateObject(987,1758.00000000,771.50000000,9.80000019,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (27)
CreateObject(987,1758.09997559,783.50000000,9.80000019,0.00000000,0.00000000,180.00000000); //object(elecfence_bar) (28)
CreateObject(987,1746.09997559,783.50000000,9.80000019,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (29)
CreateObject(987,1734.09997559,783.50000000,9.80000019,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (30)
CreateObject(987,1722.09997559,783.50000000,9.80000019,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (31)
CreateObject(987,1710.09997559,783.50000000,9.80000019,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (32)
CreateObject(987,1698.09997559,783.50000000,9.80000019,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (34)
CreateObject(987,1686.09997559,783.50000000,9.80000019,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (35)
CreateObject(987,1674.09997559,783.50000000,9.80000019,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (36)
CreateObject(987,1662.09997559,783.50000000,9.80000019,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (37)
CreateObject(987,1650.09997559,783.50000000,9.80000019,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (38)
CreateObject(987,1638.09997559,783.59997559,9.80000019,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (39)
CreateObject(987,1626.09997559,783.59997559,9.80000019,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (40)
CreateObject(987,1614.09997559,783.59997559,9.80000019,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (41)
CreateObject(987,1602.09997559,783.59997559,9.80000019,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (42)
CreateObject(987,1590.09997559,783.59997559,9.80000019,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (43)
CreateObject(987,1589.30004883,783.50000000,9.80000019,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (44)
CreateObject(987,1577.19995117,783.59997559,9.80000019,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (45)
CreateObject(987,1577.19995117,771.59997559,9.80000019,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (46)
CreateObject(987,1577.19995117,759.59997559,9.80000019,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (47)
CreateObject(987,1577.19995117,747.59997559,9.80000019,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (48)
CreateObject(987,1577.19995117,735.59997559,9.80000019,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (49)
CreateObject(987,1577.19921875,723.59960938,9.80000019,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (50)
CreateObject(987,1577.19995117,711.59997559,9.80000019,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (51)
CreateObject(987,1577.19995117,699.59997559,9.80000019,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (52)
CreateObject(987,1577.19995117,687.59997559,9.80000019,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (53)
CreateObject(987,1577.19995117,675.59997559,9.80000019,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (54)
CreateObject(987,1577.19995117,674.29998779,9.80000019,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (55)
CreateObject(14537,1745.69995117,720.20001221,8.10000038,0.00000000,0.00000000,0.00000000); //object(pdomesbar) (1)
CreateObject(14537,1589.19921875,720.19921875,8.10000038,0.00000000,0.00000000,0.00000000); //object(pdomesbar) (2)
CreateObject(14782,1739.80004883,744.09997559,10.80000019,0.00000000,0.00000000,90.00000000); //object(int3int_boxing30) (1)
CreateObject(14782,1591.00000000,697.09997559,10.80000019,0.00000000,0.00000000,270.00000000); //object(int3int_boxing30) (2)
CreateObject(2934,1729.00000000,777.40002441,11.30000019,0.00000000,0.00000000,0.00000000); //object(kmb_container_red) (1)
CreateObject(2935,1732.09997559,779.20001221,11.30000019,0.00000000,0.00000000,0.00000000); //object(kmb_container_yel) (1)
CreateObject(2932,1729.00000000,777.40002441,14.19999981,0.00000000,0.00000000,0.00000000); //object(kmb_container_blue) (1)
CreateObject(18260,1720.90002441,775.70001221,11.39999962,0.00000000,0.00000000,0.00000000); //object(crates01) (1)
CreateObject(2991,1731.50000000,780.79998779,13.39999962,0.00000000,0.00000000,90.00000000); //object(imy_bbox) (1)
CreateObject(2932,1740.59997559,666.79998779,11.30000019,0.00000000,0.00000000,0.00000000); //object(kmb_container_blue) (2)
CreateObject(2991,1740.00000000,665.29998779,13.39999962,0.00000000,0.00000000,90.00000000); //object(imy_bbox) (2)
CreateObject(2932,1609.80004883,777.40002441,11.30000019,0.00000000,0.00000000,0.00000000); //object(kmb_container_blue) (3)
CreateObject(2935,1612.90002441,779.20001221,11.30000019,0.00000000,0.00000000,0.00000000); //object(kmb_container_yel) (2)
CreateObject(2991,1609.19995117,775.79998779,13.39999962,0.00000000,0.00000000,90.00000000); //object(imy_bbox) (3)
CreateObject(2934,1612.80004883,779.20001221,14.19999981,0.00000000,0.00000000,0.00000000); //object(kmb_container_red) (3)
CreateObject(2934,1621.90002441,666.79998779,11.30000019,0.00000000,0.00000000,0.00000000); //object(kmb_container_red) (4)
CreateObject(2932,1621.80004883,666.79998779,14.19999981,0.00000000,0.00000000,0.00000000); //object(kmb_container_blue) (5)
CreateObject(1428,1733.30004883,775.20001221,11.39999962,0.00000000,0.00000000,0.00000000); //object(dyn_ladder) (1)
CreateObject(1428,1609.50000000,781.40002441,11.39999962,0.00000000,0.00000000,180.00000000); //object(dyn_ladder) (2)
CreateObject(4882,1667.00000000,720.29998779,14.68999958,0.00000000,0.00000000,0.00000000); //object(lasbrid1_las) (1)
CreateObject(5262,1738.09997559,728.90002441,12.69999981,0.00000000,0.00000000,180.00000000); //object(las2dkwar04) (1)
CreateObject(5262,1598.69995117,711.70001221,12.70000172,0.00000000,0.00000000,0.00000000); //object(las2dkwar04) (2)
CreateObject(14612,1644.90002441,747.00000000,12.50000000,0.00000000,0.00000000,0.00000000); //object(ab_abattoir_box2) (1)
VorosZaszlo = CreateObject(2993,1589.19995117,720.20001221,10.10000038,0.00000000,0.00000000,0.00000000); //object(kmb_goflag) (1) Vörös Zászló
FeherZaszlo = CreateObject(2914,1745.80004883,720.20001221,10.10000038,0.00000000,0.00000000,180.00000000); //object(kmb_rcflag) (1) Fehér Zászló
CreateObject(8077,1636.59997559,690.09997559,13.80000019,0.00000000,0.00000000,342.00000000); //object(vgsfrates06) (1)
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
AddPlayerClass(121,2230.9919,-1158.4938,29.7969,91.6852,0,0,0,0,0,0); // Fehér
AddPlayerClass(83,2230.9919,-1158.4938,29.7969,91.6852,0,0,0,0,0,0); // Fehér
AddPlayerClass(242,2230.9919,-1158.4938,29.7969,91.6852,0,0,0,0,0,0); // Fehér
AddPlayerClass(70,2230.9919,-1158.4938,29.7969,91.6852,0,0,0,0,0,0); // Fehér
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
AddPlayerClass(19,2230.9919,-1158.4938,29.7969,91.6852,0,0,0,0,0,0); // Vörös
AddPlayerClass(170,2230.9919,-1158.4938,29.7969,91.6852,0,0,0,0,0,0); // Vörös
AddPlayerClass(80,2230.9919,-1158.4938,29.7969,91.6852,0,0,0,0,0,0); // Vörös
AddPlayerClass(189,2230.9919,-1158.4938,29.7969,91.6852,0,0,0,0,0,0); // Vörös
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
FeherMesa = CreateVehicle(500,1742.4135,757.9680,10.9357,269.7510,1,0,60);
FeherRancher = CreateVehicle(505,1742.8970,752.8687,10.9719,270.3470,1,0,60);
FeherQuad1 = CreateVehicle(471,1740.5801,706.2083,10.3021,269.0260,1,0,60);
FeherQuad2 = CreateVehicle(471,1740.5358,703.9911,10.3025,267.8627,1,0,60);
VorosMesa = CreateVehicle(500,1588.6920,682.8476,10.9245,90.6691,3,0,60);
VorosRancher = CreateVehicle(489,1588.1251,688.1191,10.9642,91.6131,3,0,60);
VorosQuad1 = CreateVehicle(471,1590.2939,735.1116,10.3024,92.6977,3,0,60);
VorosQuad2 = CreateVehicle(471,1590.2036,736.7749,10.3026,88.3956,3,0,60);
return 1;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if((vehicleid == FeherMesa || vehicleid == FeherRancher || vehicleid == FeherQuad1 || vehicleid == FeherQuad2) && gTeam[playerid] == VOROS_CSAPAT)
{
SendClientMessage(playerid, COLOR_DARKRED, \"Ezt a jármûvet csak a fehér csapat tagja használhatja.\");
ClearAnimations(playerid);
return 0;
}
if((vehicleid == VorosMesa || vehicleid == VorosRancher || vehicleid == VorosQuad1 || vehicleid == VorosQuad2) && gTeam[playerid] == FEHER_CSAPAT)
{
SendClientMessage(playerid, COLOR_WHITE, \"Ezt a jármûvet csak a vörös csapat tagja használhatja.\");
ClearAnimations(playerid);
return 0;
}
return 1;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1543.1180, -1353.1674, 329.4742);
SetPlayerInterior(playerid, 0);
SetPlayerFacingAngle(playerid, 85.7327);
SetPlayerCameraPos(playerid, 1539.6180, -1349.1674, 330.9742);
SetPlayerCameraLookAt(playerid, 1543.1180, -1353.1674, 329.4742);
switch(classid)
{
case 0:
{
gTeam[playerid] = FEHER_CSAPAT;
GameTextForPlayer(playerid, \"Fehér Csapat\", 1000, 4);
}
case 1:
{
gTeam[playerid] = FEHER_CSAPAT;
GameTextForPlayer(playerid, \"Fehér Csapat\", 1000, 4);
}
case 2:
{
gTeam[playerid] = FEHER_CSAPAT;
GameTextForPlayer(playerid, \"Fehér Csapat\", 1000, 4);
}
case 3:
{
gTeam[playerid] = FEHER_CSAPAT;
GameTextForPlayer(playerid, \"Fehér Csapat\", 1000, 4);
}
case 4:
{
gTeam[playerid] = VOROS_CSAPAT;
GameTextForPlayer(playerid, \"Vörös Csapat\", 1000, 4);
}
case 5:
{
gTeam[playerid] = VOROS_CSAPAT;
GameTextForPlayer(playerid, \"Vörös Csapat\", 1000, 4);
}
case 6:
{
gTeam[playerid] = VOROS_CSAPAT;
GameTextForPlayer(playerid, \"Vörös Csapat\", 1000, 4);
}
case 7:
{
gTeam[playerid] = VOROS_CSAPAT;
GameTextForPlayer(playerid, \"Vörös Csapat\", 1000, 4);
}
}
return 1;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
public OnPlayerSpawn(playerid)
{
CreateExplosion(1577.0929, 661.9604, 10.8203, 12, 10.0);
CreateExplosion(1598.4724, 720.1661, 35.1458, 12, 10.0);
CreateExplosion(1629.2949, 719.9738, 33.3751, 12, 10.0);
CreateExplosion(1652.4092, 719.8300, 30.0373, 12, 10.0);
CreateExplosion(1687.4753, 719.6127, 31.7964, 12, 10.0);
CreateExplosion(1718.8981, 720.2831, 30.9119, 12, 10.0);
CreateExplosion(1740.8732, 720.5759, 28.1602, 12, 10.0);
GangZoneShowForPlayer(playerid, CTFZona, 0x99FFFFAA);
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, \"Válassz felszerelést!\", \"Gyalogos\\nMesterlövész\\nNehézfegyveres\\nSzanitéc\", \"Kiválasztom\", \"\");
TogglePlayerControllable(playerid,0);
SetPlayerHealth(playerid, 99999);
SendClientMessage(playerid, 0xFFFFFFAA, \"Spawn-védelem alatt vagy 10 másodpercig! Addig választhatsz felszerelést.\");
SetTimerEx(\"ASD\",10000,0,\"i\",playerid);
if(gTeam[playerid] == FEHER_CSAPAT)
{
SetPlayerColor(playerid, COLOR_WHITE);
GivePlayerWeapon(playerid, 26, 500);
SetPlayerPos(playerid, 1744.0237, 744.0296, 10.8203);
}
else if(gTeam[playerid] == VOROS_CSAPAT)
{
SetPlayerColor(playerid, COLOR_DARKRED);
SetPlayerPos(playerid, 1587.3448,697.4843,10.8279);
}
return 1;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(response == 1)
{
switch(listitem)
{
case 0:
{
ResetPlayerWeapons(playerid);
SendClientMessage(playerid, 0xFFFFFFAA, \"Kiválasztottad a gyalogos felszerelést!\");
GivePlayerWeapon(playerid, 16, 2);
GivePlayerWeapon(playerid, 22, 50);
GivePlayerWeapon(playerid, 30, 200);
SetPlayerArmour(playerid, 100);
}
case 1:
{
ResetPlayerWeapons(playerid);
SendClientMessage(playerid, 0xFFFFFFAA, \"Kiválasztottad a mesterlövész felszerelést!\");
GivePlayerWeapon(playerid, 4, 1);
GivePlayerWeapon(playerid, 23, 50);
GivePlayerWeapon(playerid, 33, 50);
GivePlayerWeapon(playerid, 34, 50);
SetPlayerArmour(playerid, 100);
}
case 2:
{
ResetPlayerWeapons(playerid);
SendClientMessage(playerid, 0xFFFFFFAA, \"Kiválasztottad a nehézfegyveres felszerelést!\");
GivePlayerWeapon(playerid, 27, 50);
GivePlayerWeapon(playerid, 35, 3);
GivePlayerWeapon(playerid, 37, 2000);
GivePlayerWeapon(playerid, 16, 5);
SetPlayerArmour(playerid, 100);
}
case 3:
{
ResetPlayerWeapons(playerid);
SendClientMessage(playerid, 0xFFFFFFAA, \"Kiválasztottad a szanitéc felszerelést!\");
GivePlayerWeapon(playerid, 25, 100);
GivePlayerWeapon(playerid, 31, 100);
SetPlayerArmour(playerid, 100);
}
}
}
return 1;
}
return 0;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////