rendered paste body#include <a_samp>
#include <core>
#include <float>
// Global Stuff
static gTeam[MAX_PLAYERS];
new gPlayerClass[MAX_PLAYERS];
//forwards
forward SetupPlayerForClassSelection(playerid);
forward GameModeExitFunc();
//Color Defines
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_DARKRED 0x660000AA
//Team Defines
#define TEAM_WORKERLV 0
#define TEAM_WORKERSF 1
#define TEAM_WORKERLS 2
#define TEAM_MILITAER 3
#define TEAM_TERRORS 4
// Round Duration
new gRoundTime = 3600000;
//__________________________________________________________________________________________________________
main()
{
print("\n----------------------------------");
print(" LOST ISLAND TDM");
print("----------------------------------\n");
}
public OnGameModeInit()
{
SetGameModeText("LOST ISLAND TDM");
SetTeamCount(5);
ShowNameTags(1);
ShowPlayerMarkers(1);
AddPlayerClass(260,1268.2637,-1327.3767,13.5000,88.0629,0,0,0,0,0,0); // workerls
AddPlayerClass(260,2027.8961,1343.4987,10.8203,264.8200,0,0,0,0,0,0); // workerlv
CreateVehicle(541,2028.8256,1329.5519,10.4470,270.8310,0,0,-1); // bulletlv
CreateVehicle(411,2028.5250,1325.1710,10.5474,270.6459,0,0,-1); // infernuslv
CreateVehicle(451,2028.7970,1320.7699,10.5269,270.4625,0,0,-1); // turismolv
CreateVehicle(487,2031.2477,1365.0587,11.0012,273.0721,0,0,-1); // mavlv
CreateVehicle(411,1281.1259,-1311.3341,13.1019,94.5919,0,0,-1); // infernusls
CreateVehicle(541,1281.7070,-1299.7708,12.9909,85.3600,0,0,-1); // bulletls
CreateVehicle(487,1283.6643,-1377.2289,13.6248,94.9489,0,0,-1); // mavls
CreateVehicle(451,1281.0995,-1352.4390,13.0791,85.9228,0,0,-1); // turismols
CreateVehicle(541,-2034.9438,170.1936,28.4611,270.3704,0,0,-1); // bulletsf
CreateVehicle(451,-2034.1364,179.1068,28.5491,271.7623,0,0,-1); // turismosf
CreateVehicle(411,-2034.7273,174.3357,28.5648,273.4370,0,0,-1); // infernussf
CreateVehicle(487,-2026.0459,139.6130,29.0129,90.9722,0,0,-1); // mavsf
CreateObject(3361, 685.6322, -2814.0099, 40.3490, 0, 0, 0);
CreateObject(7450 ,-3860.81 ,1639.90 ,-3.00 ,0.00 ,0.00 ,360.00);
CreateObject(7451 ,-3679.87 ,1652.02 ,4.26 ,0.00 ,0.00 ,0.00 );
CreateObject(10387, -3715.90 ,1332.93 ,8.10 ,0.00 ,0.00 ,220.00 );
CreateObject(7557 ,-3988.62 ,1612.68 ,9.56 ,0.00 ,0.00 ,90.00 );
CreateObject(7451 ,-3919.68 ,1545.93 ,8.93 ,0.00 ,0.00 ,130.00 );
CreateObject(7450 ,-3794.13 ,1415.18 ,1.58 ,0.00 ,0.00 ,130.00 );
CreateObject(10387, -3752.81, 1436.02 ,7.30 ,0.00 ,0.00 ,190.00 );
CreateObject(10387, -3699.12, 1581.66 ,9.31 ,-2.00 ,0.00 ,150.00 );
CreateObject(16195, -3768.37, 1601.18 ,6.78 ,0.00 ,0.00 ,170.00 );
CreateObject(16250, -3808.11,1587.06 ,7.78 ,6.78 ,-1.00 ,60.00 );
CreateObject(16258, -3963.80 ,1597.18 ,20.87 ,0.00, 0.00 ,300.00 );
CreateObject(16250, -3925.92 ,1654.91 ,10.18 ,0.00, 5.00 ,180.00 );
CreateObject(16113 ,-3905.12 ,1502.82 ,21.35 ,-20.00, 20.00 ,10.00 );
CreateObject(16114, -3882.25, 1503.31 ,13.56 ,0.00 ,32.00 ,10.00 );
CreateObject(619 ,-3786.51, 1497.91 ,5.42 ,0.00, 0.00 ,90.00 );
CreateObject(620 ,-3790.58, 1503.07 ,-3.00 ,0.00, 0.00 ,0.00 );
CreateObject(621 ,-3741.76, 1579.43 ,5.71 ,0.00, 0.00 ,0.00 );
CreateObject(622 ,-3730.55, 1593.03 ,10.52 ,0.00 ,0.00 ,260.00 );
CreateObject(620 ,-3787.50 ,1523.06 ,-5.78 ,0.00, 0.00 ,0.00 );
CreateObject(624, -3786.40 ,1514.29, 2.04 ,0.00 ,0.00 ,0.00 );
CreateObject(625 ,-3804.37 ,1507.18 ,3.22 ,0.00 ,0.00 ,0.00 );
CreateObject(629, -3795.37 ,1509.68 ,3.57 ,0.00 ,0.00 ,0.00 );
CreateObject(634 ,-3777.78 ,1520.68 ,3.57 ,0.00 ,0.00 ,0.00 );
CreateObject(620 ,-3789.35 ,1494.93 ,6.26 ,0.00 ,0.00 ,0.00 );
CreateObject(619 ,-3787.76 ,1532.14 ,3.44 ,20.00 ,20.00 ,120.00 );
CreateObject(620 ,-3778.83 ,1542.40 ,4.11 ,0.00 ,0.00 ,0.00 );
CreateObject(620 ,-3774.78 ,1540.06 ,4.13 ,0.00 ,0.00 ,0.00 );
CreateObject(620 ,-3794.15 ,1521.52 ,3.41 ,0.00 ,0.00 ,0.00 );
CreateObject(620, -3797.69 ,1500.81 ,4.13 ,0.00 ,0.00 ,0.00 );
CreateObject(620 ,-3800.68, 1491.06 ,4.53 ,0.00 ,0.00 ,0.00 );
CreateObject(620 ,-3785.12 ,1484.56 ,7.57 ,0.00, 0.00 ,0.00 );
CreateObject(620 ,-3793.11 ,1470.07 ,7.36 ,0.00 ,0.00 ,0.00 );
CreateObject(620 ,-3788.88, 1529.68 ,3.45 ,0.00, 0.00,0.00 );
CreateObject(620 ,-3796.15 ,1525.80 ,3.55 ,0.00 ,0.00 ,0.00 );
CreateObject(620 ,-3802.37 ,1515.68 ,3.50 ,0.00 ,0.00 ,0.00 );
CreateObject(620 ,-3793.02, 1515.43 ,-8.60 ,0.00 ,0.00 ,0.00 );
CreateObject(620 ,-3798.57 ,1504.50 ,-8.47 ,0.00 ,0.00 ,0.00 );
CreateObject(622, -3780.59 ,1538.54 ,4.21 ,0.00 ,0.00 ,0.00 );
CreateObject(622 ,-3789.38 ,1520.31 ,3.49 ,0.00 ,0.00 ,-100.00 );
CreateObject(16122 ,-3852.12 ,1655.16 ,10.56 ,0.00 ,0.00 ,0.00 );
CreateObject(16121 ,-3786.37 ,1695.77 ,11.71 ,0.00 ,0.00 ,250.00 );
CreateObject(16121 ,-3820.02 ,1721.55 ,13.77 ,0.00 ,0.00 ,0.00 );
CreateObject(12991 ,-3760.51 ,1349.16 ,8.97 ,0.00 ,3.00 ,180.00 );
CreateObject(12937 ,-3894.58 ,1668.57 ,14.85 ,1.00 ,-6.00 ,0.00 );
CreateObject(16406 ,-3893.82, 1486.55 ,36.45 ,0.00 ,0.00 ,55.00 );
CreateObject(1452 ,-3836.57, 1733.43 ,26.37 ,-3.00 ,2.00 ,90.00 );
CreateObject(12957, -3672.88, 1566.45 ,1.12 ,0.00 ,28.00 ,320.00 );
CreateObject(1346 ,-3648.33 ,1661.32 ,8.75 ,0.00 ,0.00 ,0.00 );
CreateObject(8483, -3794.86 ,1390.34 ,9.81 ,0.00 ,0.00 ,-80.00 );
CreateObject(10166 ,-3813.45 ,1446.67 ,6.78 ,3.00 ,-10.00 ,254.00 );
CreateObject(744 ,-3783.71 ,1386.93, 4.84 ,0.00 ,0.00 ,40.00 );
CreateObject(3276, -3874.37 ,1507.38 ,37.47 ,-8.00 ,-1.00 ,75.00 );
CreateObject(3276, -3870.85 ,1517.50 ,37.90 ,0.00 ,3.00 ,248.00 );
CreateObject(16122, -3823.80, 1471.54 ,2.28 ,0.00 ,0.00 ,167.00 );
CreateObject(16122, -3839.20 ,1403.43 ,8.63 ,0.00 ,0.00 ,250.00 );
CreateObject(16110, -3786.09 ,1398.63 ,10.50 ,0.00 ,0.00 ,-35.00 );
CreateObject(16118, -3814.12 ,1374.38 ,10.18 ,-1.00 ,-30.00 ,240.00 );
CreateObject(12990, -3704.10 ,1550.28 ,0.81 ,0.00 ,0.00 ,40.00 );
CreateObject(16667, -3791.31 ,1388.81 ,12.10 ,10.00 ,20.00 ,0.00 );
CreateObject(16667, -3793.07 ,1382.61 ,22.04 ,110.00 ,69.00 ,450.00 );
CreateObject(16667, -3783.08, 1356.60 ,10.55 ,0.00 ,20.00 ,30.00 );
CreateObject(16667 ,-3774.54, 1368.70 ,3.89 ,0.00 ,40.00 ,10.00 );
CreateObject(900 ,-3806.49 ,1417.71 ,23.36 ,0.00 ,0.00 ,30.00 );
CreateObject(900 ,-3784.49 ,1450.26 ,16.68 ,0.00 ,0.00 ,0.00 );
CreateObject(900 ,-3793.27 ,1464.31 ,16.48 ,0.00 ,0.00 ,0.00 );
CreateObject(900 ,-3812.42 ,1452.27 ,17.52 ,0.00 ,0.00 ,140.00 );
CreateObject(900 ,-3816.94 ,1463.95 ,10.35 ,0.00 ,90.00 ,100.00 );
CreateObject(16112 ,-3780.23 ,1451.04 ,10.26 ,0.00 ,20.00 ,0.00 );
CreateObject(16112 ,-3786.54 ,1470.43 ,7.31 ,0.00 ,-29.00 ,240.00 );
CreateObject(16112 ,-3807.33 ,1429.61 ,20.78 ,0.00 ,10.00 ,60.00 );
CreateObject(16112 ,-3801.27 ,1409.74 ,17.94 ,0.00 ,-8.00 ,185.00 );
CreateObject(16112 ,-3828.18 ,1425.64 ,17.48, 0.00 ,10.00, 90.00 );
CreateObject(17031 ,-3638.96 ,1664.06 ,-2.23 ,0.00 ,0.00 ,53.00 );
CreateObject(17031 ,-3621.12 ,1701.65 ,0.30 ,0.00 ,0.00 ,0.00 );
CreateObject(17031 ,-3617.58 ,1760.81 ,-3.32 ,0.00 ,0.00 ,0.00 );
CreateObject(17031 ,-3619.33 ,1732.28 ,1.99 ,0.00 ,0.00 ,0.00 );
CreateObject(17031 ,-3696.69 ,1228.32 ,-0.51 ,0.00 ,0.00 ,90.00 );
CreateObject(17031 ,-3720.42 ,1254.04 ,-5.90 ,0.00 ,0.00 ,213.00 );
CreateObject(17031 ,-3753.95 ,1280.64 ,2.71 ,0.00 ,0.00 ,320.00 );
CreateObject(17031 ,-3782.64 ,1258.97 ,16.40 ,0.00 ,0.00 ,-50.00 );
CreateObject(14553 ,-1971.68 ,505.32 ,148.74 ,15.00 ,10.00, 130.00 );
CreateObject(14548 ,-1973.48 ,503.67 ,148.94 ,15.00 ,10.00 ,130.00 );
CreateObject(16112 ,-3904.25 ,1578.63 ,2.96 ,0.00 ,0.00 ,0.00 );
CreateObject(16112 ,-3930.75 ,1587.02 ,2.83 ,0.00 ,0.00 ,190.00 );
return 1;
}
public OnPlayerConnect(playerid)
{
GameTextForPlayer(playerid,"Lost Island TDM",5000,5);
SetPlayerColor(playerid, COLOR_GREY);
new jstr[256];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(jstr, sizeof(jstr), "%s ist dem Spiel beigetreten!", playername);
SendClientMessageToAll(0xFF6900AA, jstr);
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPlayerInterior(playerid,0);
if(gTeam[playerid] == TEAM_WORKERLV) {
SetPlayerColor(playerid,COLOR_GREEN); // Green
}
else if(gTeam[playerid] == TEAM_WORKERSF) {
SetPlayerColor(playerid,COLOR_RED); // Red
}
else if(gTeam[playerid] == TEAM_WORKERLS) {
SetPlayerColor(playerid,COLOR_YELLOW); // Yellow
}
else if(gTeam[playerid] == TEAM_MILITAER) {
SetPlayerColor(playerid,COLOR_BLUE); // Blue
}
else if(gTeam[playerid] == TEAM_TERRORS) {
SetPlayerColor(playerid,COLOR_DARKRED); // Darkred
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid==INVALID_PLAYER_ID) {
SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
}
else {
SendDeathMessage(killerid,playerid,reason);
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/befehl", cmdtext, true) == 0)
{
if (strcmp(cmdtext, "/kill", true)==0)
{
SetPlayerHealth(playerid, 0);
return 1;
}
}
return 0;
}
public SetupPlayerForClassSelection(playerid)
{
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
SetPlayerFacingAngle(playerid, 90.0);
SetPlayerCameraPos(playerid,256.0815,-43.0475,1003.0234);
SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
}
public OnPlayerRequestClass(playerid,classid)
{
SetPlayerClass(playerid, classid);
SetupPlayerForClassSelection(playerid);
gPlayerClass[playerid] = classid;
switch(classid) {
case 0:
{
GameTextForPlayer(playerid, "~g~WorkerLV", 500, 3);
}
case 1:
{
GameTextForPlayer(playerid, "~g~WorkerSF", 500, 3);
}
case 2:
{
GameTextForPlayer(playerid, "~g~WorkerLS", 500, 3);
}
case 3:
{
GameTextForPlayer(playerid, "~g~Militaer", 500, 3);
}
case 4:
{
GameTextForPlayer(playerid, "~g~Terrors", 500, 3);
}
}
return 1;
}
public GameModeExitFunc()
{
GameModeExit();
return 1;
}
SetPlayerClass(playerid, classid) {
if(classid == 0) {
gTeam[playerid] = TEAM_WORKERLV;
}
else if(classid == 1) {
gTeam[playerid] = TEAM_WORKERSF;
}
else if(classid == 2) {
gTeam[playerid] = TEAM_WORKERLS;
}
else if(classid == 3) {
gTeam[playerid] = TEAM_MILITAER;
}
else if(classid == 4) {
gTeam[playerid] = TEAM_TERRORS;
}
}