Not respawning in DM after death. This FS > -
I tried a lot to fix this but I cannot and I thought it might be a cake for you guys
So it will be better if you guys remove the /dmspawnon CMD for rcon admin and /dmspawn for players. I need players to automatically respawn in DM after his/her death.
I downloaded this FS because it said players respawn after death in DM. But I dont see it in my server
Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT
#include <a_samp>
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define DMWORLD_MIN MAX_PLAYERS*30+5
#if defined FILTERSCRIPT
new gMyVar = 0;
new DM[MAX_PLAYERS] = 0;
new gDmSpawn[MAX_PLAYERS] = 0;
new gHeal = 0;
new dmspawnon = 0;
public OnFilterScriptInit()
{
Create3DTextLabel("You are in the Deagle DM.\nType /exitdm to leave DM zone.",0x33AA33AA,-332.45, 1844.28, 42.28,40.0, DMWORLD_MIN);
Create3DTextLabel("You are in the Minigun DM.\nType /exitdm to leave DM zone.",0x33AA33AA,-2098.2512, -93.5136, 35.3273,40.0, DMWORLD_MIN);
Create3DTextLabel("You are in the Combat Shotgun DM.\nType /exitdm to leave DM zone. ",0x33AA33AA,-326.58, 1522.54, 75.35,40.0,DMWORLD_MIN);
Create3DTextLabel("You are in the M4 DM.\nType /exitdm to leave DM zone.",0x33AA33AA,1187.21, -2037.22, 69.00,40.0,DMWORLD_MIN);
Create3DTextLabel("You are in DM 1.\nType /exitdm to leave DM zone. ",0x33AA33AA,-2633.39, 1365.04, 7.11,40.0,DMWORLD_MIN);
Create3DTextLabel("You are in DM 2.\nType /exitdm to leave DM zone. ",0x33AA33AA,-2057.31, -208.63, 35.32,40.0,DMWORLD_MIN);
Create3DTextLabel("You are in DM 3.\nType /exitdm to leave DM zone. ",0x33AA33AA,-2096.54, 244.28, 35.76,40.0,DMWORLD_MIN);
Create3DTextLabel("You are in DM 4.\nType /exitdm to leave DM zone. ",0x33AA33AA,-1131.96, 1049.56, 1345.74,40.0,DMWORLD_MIN);
Create3DTextLabel("You are in DM 5.\nType /exitdm to leave DM zone. ",0x33AA33AA,213.82, 1906.08, 17.64,40.0,DMWORLD_MIN);
Create3DTextLabel("You are in DM 6.\nType /exitdm to leave DM zone. ",0x33AA33AA,-1601.67, 686.98, -5.24,40.0,DMWORLD_MIN);
Create3DTextLabel("You are in DM 7.\nType /exitdm to leave DM zone. ",0x33AA33AA,244.34, 173.59, 1003.02,40.0,DMWORLD_MIN);
Create3DTextLabel("You are in DM 8.\nType /exitdm to leave DM zone. ",0x33AA33AA,291.77, -36.51, 1001.51,40.0,DMWORLD_MIN);
Create3DTextLabel("You are in the Walking Weapon Area.\nType /exitdm to leave DM zone. ",0x33AA33AA,-2114.26, -219.48, 35.32,40.0,DMWORLD_MIN);
Create3DTextLabel("You are in the Walking Weapon Area 1\nType /exitdm to leave DM zone. . ",0x33AA33AA,355.19, 2500.88, 16.48,40.0,DMWORLD_MIN);
Create3DTextLabel("You are in the Running Weapons Area.\nType /exitdm to leave DM zone. ",0x33AA33AA,-1397.46, 1246.44, 1039.86,40.0,DMWORLD_MIN);
Create3DTextLabel("You are in Sniper DM.\nType /exitdm to leave DM zone. ",0x33AA33AA,2531.00, 2776.78, 10.82,40.0,DMWORLD_MIN);
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" DM Zone's by Cam3");
print("----------------------------------\n");
}
#endif
public OnPlayerDeath(playerid, killerid, reason)
{
if (gDmSpawn[playerid] == 1){
return 1;}
else if (gDmSpawn[playerid] == 0){
DM[playerid] = 1;}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/dmlist", cmdtext, true, 10) == 0)
{
SendClientMessage (playerid, COLOR_YELLOW, "DM Zones || /Deagle /spaz /m4 /Sniper /minigun");
SendClientMessage (playerid, COLOR_YELLOW, "DM Zones || /ww /ww1 /rw /rw1 /dm1 /dm2 /dm3 /dm4 /dm5 /dm6 /dm7 /dm8");
SendClientMessage (playerid, COLOR_YELLOW, "Player Commands || /dmspawn /exitdm /heal");
SendClientMessage (playerid, COLOR_YELLOW, "Admin Commands || /dmlock /dmunlock /dmkick /dmhealon /dmhealoff");
}
if (strcmp("/dmspawnoff", cmdtext, true, 10) == 0)
{
if (!IsPlayerAdmin(playerid)) {
SendClientMessage(playerid, COLOR_RED, "You are not an Admin.");
return 1;
} else if (IsPlayerAdmin(playerid)) {
dmspawnon = 0;
new var2[24];
new var4[256];
GetPlayerName(playerid, var2, 24);
format(var4, 256, "** %s has DISABLED the ability to respawn in DM zones ", var2);
SendClientMessageToAll(COLOR_YELLOW, var4);
return 1;
}
}
if (strcmp("/dmspawnon", cmdtext, true, 10) == 0)
{
if (!IsPlayerAdmin(playerid)) {
SendClientMessage(playerid, COLOR_RED, "You are not an Admin.");
return 1;
} else if (IsPlayerAdmin(playerid)) {
dmspawnon = 1;
new var2[24];
new var4[256];
GetPlayerName(playerid, var2, 24);
format(var4, 256, "** %s has ENABLED the ability to respawn in DM zones ", var2);
SendClientMessageToAll(COLOR_YELLOW, var4);
return 1;
}
}
if (strcmp("/dmhealon", cmdtext, true, 10) == 0)
{
if (!IsPlayerAdmin(playerid)) {
SendClientMessage(playerid, COLOR_RED, "You are not an Admin.");
return 1;
} else if (IsPlayerAdmin(playerid)) {
gHeal = 1;
new var2[24];
new var4[256];
GetPlayerName(playerid, var2, 24);
format(var4, 256, "** %s has enabled healing in DM Zones ", var2);
SendClientMessageToAll(COLOR_YELLOW, var4);
return 1;
}
}
if (strcmp("/dmhealoff", cmdtext, true, 10) == 0)
{
if (!IsPlayerAdmin(playerid)) {
SendClientMessage(playerid, COLOR_RED, "You are not an Admin.");
return 1;
} else if (IsPlayerAdmin(playerid)) {
gHeal = 0;
new var2[24];
new var4[256];
GetPlayerName(playerid, var2, 24);
format(var4, 256, "** %s has disabled healing in DM Zones ", var2);
SendClientMessageToAll(COLOR_YELLOW, var4);
return 1;
}
}
if (strcmp("/heal", cmdtext, true, 10) == 0)
{
if (gDmSpawn[playerid] == 0){
SendClientMessage (playerid, COLOR_RED, "You must be in DM Spawn mode to use this feature, type /dmspawn to respawn in DM's");
return 1;
} else if (gDmSpawn[playerid] == 1){
if (gHeal == 0){
SendClientMessage(playerid, COLOR_RED, "You cannot use the heal command until an Admin has enabled this feature");
return 1;
} else if (gHeal == 1){
SetPlayerHealth (playerid, 100);
SetPlayerArmour (playerid, 100);
SendClientMessage (playerid, COLOR_YELLOW, "You have healed yourself, Abusing this command will result in a kick/ban");
return 1;
}
}
}
if (strcmp("/dmspawn", cmdtext, true, 10) == 0)
{
if (dmspawnon == 0){
SendClientMessage (playerid, COLOR_YELLOW, "An Admin has disabled this feature");
return 1;
}else if (dmspawnon == 1){
if (DM[playerid] == 0){
SendClientMessage (playerid, COLOR_YELLOW, "You are not in a DM");
return 1;
} else if (DM[playerid] > 0)
gDmSpawn[playerid] = 1;
SendClientMessage(playerid, COLOR_YELLOW, "You will now respawn in DM's you die in");
return 1;
}
}
if (strcmp("/exitdm", cmdtext, true, 10) == 0)
{
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid,0);
gDmSpawn[playerid] = 0;
if (DM[playerid] == 0){
SendClientMessage (playerid, COLOR_YELLOW, "You are not in a DM");
return 1;
} else if (DM[playerid] > 0)
SendClientMessage(playerid, COLOR_YELLOW, "You have exited the dm zone");
gDmSpawn[playerid] = 1;
SpawnPlayer(playerid);
return 1;
}
if (strcmp("/dmlock", cmdtext, true, 10) == 0)
{
if (!IsPlayerAdmin(playerid)) {
SendClientMessage(playerid, COLOR_RED, "You are not an Admin.");
return 1;
} else if (IsPlayerAdmin(playerid)) {
gMyVar = 1;
new var2[24];
new var4[256];
GetPlayerName(playerid, var2, 24);
format(var4, 256, "** %s has locked the DM Zones ", var2);
SendClientMessageToAll(COLOR_YELLOW, var4);
return 1;
}
}
if (strcmp("/dmunlock", cmdtext, true, 10) == 0)
{
if (!IsPlayerAdmin(playerid)) {
SendClientMessage(playerid, COLOR_RED, "You are not an Admin.");
return 1;
} else if (IsPlayerAdmin(playerid)) {
gMyVar = 0;
new var2[24];
new var4[256];
GetPlayerName(playerid, var2, 24);
format(var4, 256, "** %s has unlocked the DM Zones. Type /dmlist for availiable dm's ", var2);
SendClientMessageToAll(COLOR_YELLOW, var4);
return 1;
}
}
if (strcmp("/dmkick", cmdtext, true, 10) == 0)
{
if (!IsPlayerAdmin(playerid)) {
SendClientMessage(playerid, COLOR_RED, "You are not an Admin.");
return 1;
} else if (IsPlayerAdmin(playerid)) {
gMyVar = 1;
new var2[24];
new var4[256];
GetPlayerName(playerid, var2, 24);
format(var4, 256, "** %s has kicked everyone out of their DM's ", var2);
SendClientMessageToAll(COLOR_YELLOW, var4);
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SpawnPlayer(i);
}
}
return 1;
}
}
if (strcmp("/deagle", cmdtext, true, 10) == 0)
{
if (gMyVar == 1){
SendClientMessage(playerid, COLOR_RED, "DM's are locked, please ask an Admin to unlock them");}
else if (gMyVar == 0){
new str[180+MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str), "SERVER: {FF33FF}%s (ID: %d) has joined DEagle DM.Type {33FF66}/DEAGLE {FF33FF}to join.", name, playerid);
SendClientMessageToAll(-1, str);
SendClientMessage(playerid, -1, "{FF0000}/exitdm to exit the DM zone safely.");
new c = random(3);
if (c == 0){
SetPlayerPos(playerid, -329.16,1838.60,42.28);}
else if (c == 1){
SetPlayerPos(playerid, -300.17,1869.56,42.28);}
else if (c == 2){
SetPlayerPos(playerid, -341.66,1891.66,42.28);}
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 1337);
PlayerPlaySound(playerid, 1039, 0, 0, 0);}
SetPlayerVirtualWorld (playerid, DMWORLD_MIN);
DM[playerid] = 9;
return 1;
}
if (strcmp("/spaz", cmdtext, true, 10) == 0)
{
if (gMyVar == 1){
SendClientMessage(playerid, COLOR_RED, "DM's are locked, please ask an Admin to unlock them");}
else if (gMyVar == 0){
new str[180+MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str), "SERVER: {FF33FF}%s (ID: %d) has joined Combat Shotgun DM.Type {33FF66}/SPAZ {FF33FF}to join.", name, playerid);
SendClientMessageToAll(-1, str);
SendClientMessage(playerid, -1, "{FF0000}/exitdm to exit the DM zone safely.");
new c = random(3);
if (c == 0){
SetPlayerPos(playerid, -307.35,1519.06,75.35);}
else if (c == 1){
SetPlayerPos(playerid, -324.45,1530.09,75.35);}
else if (c == 2){
SetPlayerPos(playerid, -343.15,1516.61,75.35);}
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 27, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);}
DM[playerid] = 10;
return 1;
}
if (strcmp("/m4", cmdtext, true, 10) == 0)
{
if (gMyVar == 1){
SendClientMessage(playerid, COLOR_RED, "DM's are locked, please ask an Admin to unlock them");}
else if (gMyVar == 0){
new str[180+MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str), "SERVER: {FF33FF}%s (ID: %d) has joined M4 DM.Type {33FF66}/M4 {FF33FF}to join.", name, playerid);
SendClientMessageToAll(-1, str);
SendClientMessage(playerid, -1, "{FF0000}/exitdm to exit the DM zone safely.");
new c = random(3);
if (c == 0){
SetPlayerPos(playerid, 1139.95, -2037.20, 69.00);}
else if (c == 1){
SetPlayerPos(playerid, 1176.15, -2063.23, 69.00);}
else if (c == 2){
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
SetPlayerPos(playerid, 1218.33, -2036.96, 66.30);}
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 31, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);}
DM[playerid] = 11;
return 1;
}
if (strcmp("/sniper", cmdtext, true, 10) == 0)
{
if (gMyVar == 1){
SendClientMessage(playerid, COLOR_RED, "DM's are locked, please ask an Admin to unlock them");}
else if (gMyVar == 0){
new str[180+MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str), "SERVER: {FF33FF}%s (ID: %d) has joined Sniper DM.Type {33FF66}/SNIPER {FF33FF}to join.", name, playerid);
SendClientMessageToAll(-1, str);
SendClientMessage(playerid, -1, "{FF0000}/exitdm to exit the DM zone safely.");
new c = random(3);
if (c == 0){
SetPlayerPos(playerid, 2512.22, 2774.92, 10.82);}
else if (c == 1){
SetPlayerPos(playerid, 2611.66, 2730.53, 36.53);}
else if (c == 2){
SetPlayerPos(playerid, 2652.78, 2779.73, 19.32);}
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 34, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);}
DM[playerid] = 12;
return 1;
}
if (strcmp("/minigun", cmdtext, true, 10) == 0)
{
if (gMyVar == 1){
SendClientMessage(playerid, COLOR_RED, "DM's are locked, please ask an Admin to unlock them");}
else if (gMyVar == 0){
new str[180+MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str), "SERVER: {FF33FF}%s (ID: %d) has joined Minigun DM.Type {33FF66}/minigun {FF33FF}to join.", name, playerid);
SendClientMessageToAll(-1, str);
SendClientMessage(playerid, -1, "{FF0000}/exitdm to exit the DM zone safely.");
new c = random(9);
if (c == 0){
SetPlayerPos(playerid, -2148.8384, -130.4971, 36.5156);}
else if (c == 1){
SetPlayerPos(playerid, -2155.0598, -94.5671, 35.3203);}
else if (c == 2){
SetPlayerPos(playerid, -2098.2512, -93.5136, 35.3273);}
else if (c == 3){
SetPlayerPos(playerid, -2099.0410, -113.2365, 35.3203);}
else if (c == 4){
SetPlayerPos(playerid, -2185.3118, -250.3585, 40.7195);}
else if (c == 5){
SetPlayerPos(playerid, -2185.1899, -243.9012, 40.7195);}
else if (c == 6){
SetPlayerPos(playerid, -2175.2449, -256.8815, 36.5156);}
else if (c == 7){
SetPlayerPos(playerid, -2155.4763, -194.6579, 35.3203);}
else if (c == 8){
SetPlayerPos(playerid, -2101.9746, -200.0987, 35.3203);}
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 38, 99999);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);}
DM[playerid] = 16;
return 1;
}
if (strcmp("/dm1", cmdtext, true, 10) == 0)
{
if (gMyVar == 1){
SendClientMessage(playerid, COLOR_RED, "DM's are locked, please ask an Admin to unlock them");}
else if (gMyVar == 0){
new str[180+MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str), "SERVER: {FF33FF}%s (ID: %d) has joined DM1 (Deagle and Spaz).Type {33FF66}/DM1 {FF33FF}to join.", name, playerid);
SendClientMessageToAll(-1, str);
SendClientMessage(playerid, -1, "{FF0000}/exitdm to exit the DM zone safely.");
new c = random(3);
if (c == 0){
SetPlayerPos(playerid, -2640.55, 1375.65, 7.14);}
else if (c == 1){
SetPlayerPos(playerid, -2621.14, 1367.67, 7.06);}
else if (c == 2){
SetPlayerPos(playerid, -2636.70, 1347.01, 7.12);}
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 1337);
GivePlayerWeapon(playerid, 27, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);}
DM[playerid] = 1;
return 1;
}
if (strcmp("/dm2", cmdtext, true, 10) == 0)
{
if (gMyVar == 1){
SendClientMessage(playerid, COLOR_RED, "DM's are locked, please ask an Admin to unlock them");}
else if (gMyVar == 0){
new str[180+MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str), "SERVER: {FF33FF}%s (ID: %d) has joined DM2 (Deagle and Pump).Type {33FF66}/DM2 {FF33FF}to join.", name, playerid);
SendClientMessageToAll(-1, str);
SendClientMessage(playerid, -1, "{FF0000}/exitdm to exit the DM zone safely.");
new c = random(3);
if (c == 0){
SetPlayerPos(playerid, -2062.65, -163.84, 35.32);}
else if (c == 1){
SetPlayerPos(playerid, -2081.65, -196.56, 35.32);}
else if (c == 2){
SetPlayerPos(playerid, -2040.28, -205.52, 35.32);}
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 1337);
GivePlayerWeapon(playerid, 25, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);}
DM[playerid] = 2;
return 1;
}
if (strcmp("/dm3", cmdtext, true, 10) == 0)
{
if (gMyVar == 1){
SendClientMessage(playerid, COLOR_RED, "DM's are locked, please ask an Admin to unlock them");}
else if (gMyVar == 0){
new str[180+MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str), "SERVER: {FF33FF}%s (ID: %d) has joined DM3 (Deagle and M4).Type {33FF66}/DM3 {FF33FF}to join.", name, playerid);
SendClientMessageToAll(-1, str);
SendClientMessage(playerid, -1, "{FF0000}/exitdm to exit the DM zone safely.");
new c = random(3);
if (c == 0){
SetPlayerPos(playerid, -2099.34, 190.75, 35.22);}
else if (c == 1){
SetPlayerPos(playerid, -2062.09, 216.15, 35.56);}
else if (c == 2){
SetPlayerPos(playerid, -2084.27, 280.77, 35.26);}
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 1337);
GivePlayerWeapon(playerid, 31, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);}
DM[playerid] = 3;
return 1;
}
if (strcmp("/dm4", cmdtext, true, 10) == 0)
{
if (gMyVar == 1){
SendClientMessage(playerid, COLOR_RED, "DM's are locked, please ask an Admin to unlock them");}
else if (gMyVar == 0){
new str[180+MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str), "SERVER: {FF33FF}%s (ID: %d) has joined DM4 (Sniper,AK-47 and Pump).Type {33FF66}/DM4 {FF33FF}to join.", name, playerid);
SendClientMessageToAll(-1, str);
SendClientMessage(playerid, -1, "{FF0000}/exitdm to exit the DM zone safely.");
new c = random(3);
if (c == 0){
SetPlayerPos(playerid, -1128.71, 1057.77, 1346.41);}
else if (c == 1){
SetPlayerPos(playerid, -1038.03, 1036.85, 1341.35);}
else if (c == 2){
SetPlayerPos(playerid, -971.10, 1061.41, 1345.02);}
SetPlayerInterior(playerid, 10);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 34, 1337);
GivePlayerWeapon(playerid, 25, 1337);
GivePlayerWeapon(playerid, 30, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);}
DM[playerid] = 4;
return 1;
}
if (strcmp("/dm5", cmdtext, true, 10) == 0)
{
if (gMyVar == 1){
SendClientMessage(playerid, COLOR_RED, "DM's are locked, please ask an Admin to unlock them");}
else if (gMyVar == 0){
new str[180+MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str), "SERVER: {FF33FF}%s (ID: %d) has joined DM5 (M4 and Pump).Type {33FF66}/DM5 {FF33FF}to join.", name, playerid);
SendClientMessageToAll(-1, str);
SendClientMessage(playerid, -1, "{FF0000}/exitdm to exit the DM zone safely.");
new c = random(3);
if (c == 0){
SetPlayerPos(playerid, 213.11, 1912.87, 17.64);}
else if (c == 1){
SetPlayerPos(playerid, 278.95, 1868.67, 17.64);}
else if (c == 2){
SetPlayerPos(playerid, 229.91, 1937.03, 30.05);}
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 25, 1337);
GivePlayerWeapon(playerid, 31, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);}
DM[playerid] = 5;
return 1;
}
if (strcmp("/dm6", cmdtext, true, 10) == 0)
{
if (gMyVar == 1){
SendClientMessage(playerid, COLOR_RED, "DM's are locked, please ask an Admin to unlock them");}
else if (gMyVar == 0){
new str[180+MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str), "SERVER: {FF33FF}%s (ID: %d) has joined DM6 (SP and Shotgun).Type {33FF66}/DM6 {FF33FF}to join.", name, playerid);
SendClientMessageToAll(-1, str);
SendClientMessage(playerid, -1, "{FF0000}/exitdm to exit the DM zone safely.");
new c = random(3);
if (c == 0){
SetPlayerPos(playerid, -1609.24, 751.26, -5.24);}
else if (c == 1){
SetPlayerPos(playerid, -1582.47, 715.96, -5.24);}
else if (c == 2){
SetPlayerPos(playerid, -1623.21, 670.24, -4.90);}
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 23, 1337);
GivePlayerWeapon(playerid, 33, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);}
DM[playerid] = 6;
return 1;
}
if (strcmp("/ww", cmdtext, true, 10) == 0)
{
if (gMyVar == 1){
SendClientMessage(playerid, COLOR_RED, "DM's are locked, please ask an Admin to unlock them");}
else if (gMyVar == 0){
new str[180+MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str), "SERVER: {FF33FF}%s (ID: %d) has joined Walking Weapons DM.Type {33FF66}/WW {FF33FF}to join.", name, playerid);
SendClientMessageToAll(-1, str);
SendClientMessage(playerid, -1, "{FF0000}/exitdm to exit the DM zone safely.");
new c = random(3);
if (c == 0){
SetPlayerPos(playerid, -2125.28, -214.07, 35.32);}
else if (c == 1){
SetPlayerPos(playerid, -2113.87, -251.21, 35.32);}
else if (c == 2){
SetPlayerPos(playerid, -2136.53, -187.53, 35.32);}
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 1337);
GivePlayerWeapon(playerid, 27, 1337);
GivePlayerWeapon(playerid, 31, 1337);
GivePlayerWeapon(playerid, 34, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);}
DM[playerid] = 13;
return 1;
}
if (strcmp("/ww1", cmdtext, true, 10) == 0)
{
if (gMyVar == 1){
SendClientMessage(playerid, COLOR_RED, "DM's are locked, please ask an Admin to unlock them");}
else if (gMyVar == 0){
new str[180+MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str), "SERVER: {FF33FF}%s (ID: %d) has joined Walking Weapons 1 DM.Type {33FF66}/WW1 {FF33FF}to join.", name, playerid);
SendClientMessageToAll(-1, str);
SendClientMessage(playerid, -1, "{FF0000}/exitdm to exit the DM zone safely.");
new c = random(3);
if (c == 0){
SetPlayerPos(playerid, 390.82, 2504.40, 16.48);}
else if (c == 1){
SetPlayerPos(playerid, 349.00, 2474.35, 16.48);}
else if (c == 2){
SetPlayerPos(playerid, 323.56, 2509.47, 16.52);}
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 1337);
GivePlayerWeapon(playerid, 25, 1337);
GivePlayerWeapon(playerid, 31, 1337);
GivePlayerWeapon(playerid, 34, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);}
DM[playerid] = 14;
return 1;
}
if (strcmp("/rw", cmdtext, true, 10) == 0)
{
if (gMyVar == 1){
SendClientMessage(playerid, COLOR_RED, "DM's are locked, please ask an Admin to unlock them");}
else if (gMyVar == 0){
new str[180+MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str), "SERVER: {FF33FF}%s (ID: %d) has joined Running Weapons DM.Type {33FF66}/rw1 {FF33FF}to join.", name, playerid);
SendClientMessageToAll(-1, str);
SendClientMessage(playerid, -1, "{FF0000}/exitdm to exit the DM zone safely.");
new c = random(3);
if (c == 0){
SetPlayerPos(playerid, -1396.54, 1276.64, 1039.86);}
else if (c == 1){
SetPlayerPos(playerid, -1418.19, 1254.42, 1039.86);}
else if (c == 2){
SetPlayerPos(playerid, -1385.22, 1225.53, 1039.86);}
SetPlayerInterior(playerid, 16);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 22, 1337);
GivePlayerWeapon(playerid, 26, 1337);
GivePlayerWeapon(playerid, 28, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);}
DM[playerid] = 15;
return 1;
}
if (strcmp("/dm7", cmdtext, true, 10) == 0)
{
if (gMyVar == 1){
SendClientMessage(playerid, COLOR_RED, "DM's are locked, please ask an Admin to unlock them");}
else if (gMyVar == 0){
new str[180+MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str), "SERVER: {FF33FF}%s (ID: %d) has joined DM7 (DEagle,Spaz and Sniper).Type {33FF66}/DM7 {FF33FF}to join.", name, playerid);
SendClientMessageToAll(-1, str);
SendClientMessage(playerid, -1, "{FF0000}/exitdm to exit the DM zone safely.");
new c = random(3);
if (c == 0){
SetPlayerPos(playerid, 290.93, 174.81, 1007.17);}
else if (c == 1){
SetPlayerPos(playerid, 242.60, 145.83, 1003.02);}
else if (c == 2){
SetPlayerPos(playerid, 214.07, 167.32, 1003.02);}
SetPlayerInterior(playerid, 3);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 1337);
GivePlayerWeapon(playerid, 27, 1337);
GivePlayerWeapon(playerid, 34, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);}
DM[playerid] = 7;
return 1;
}
if (strcmp("/dm8", cmdtext, true, 10) == 0)
{
if (gMyVar == 1){
SendClientMessage(playerid, COLOR_RED, "DM's are locked, please ask an Admin to unlock them");}
else if (gMyVar == 0){
new str[180+MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str), "SERVER: {FF33FF}%s (ID: %d) has joined DM8 (Chainsaw and Colt).Type {33FF66}/DM8 {FF33FF}to join.", name, playerid);
SendClientMessageToAll(-1, str);
SendClientMessage(playerid, -1, "{FF0000}/exitdm to exit the DM zone safely.");
new c = random(3);
if (c == 0){
SetPlayerPos(playerid, 286.41, -38.76, 1001.51);}
else if (c == 1){
SetPlayerPos(playerid, 292.32, -32.84, 1001.51);}
else if (c == 2){
SetPlayerPos(playerid, 296.16, -40.94, 1001.51);}
SetPlayerInterior(playerid, 1);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 22, 1337);
GivePlayerWeapon(playerid, 9, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);}
DM[playerid] = 8;
return 1;
}
return 0;
}
forward spawnplayer(playerid);
public spawnplayer(playerid)
{
if (gMyVar == 1)
return 1;
if (dmspawnon == 0)
return 1;
if (gDmSpawn[playerid] == 0)
PlayerPlaySound(playerid, 1039, 0, 0, 0);
else if (gDmSpawn[playerid] == 1){
if (DM[playerid] == 9){
SetPlayerPos(playerid, -341.66,1891.66,42.28);
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 1337);
PlayerPlaySound(playerid, 1039, 0, 0, 0);
return 1;
} else if (DM[playerid] == 10){
SetPlayerPos(playerid, -343.15,1516.61,75.35);
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 27, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);
return 1;
} else if (DM[playerid] == 16){
SetPlayerPos(playerid, -2098.2512,-93.5136,35.3273);
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 27, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);
return 1;
} else if (DM[playerid] == 11){
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
SetPlayerPos(playerid, 1218.33, -2036.96, 66.30);
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 31, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);
return 1;
} else if (DM[playerid] == 12){
SetPlayerPos(playerid, 2652.78, 2779.73, 19.32);
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 34, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);
return 1;
} else if (DM[playerid] == 1){
SetPlayerPos(playerid, -2636.70, 1347.01, 7.12);
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 1337);
GivePlayerWeapon(playerid, 27, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);
return 1;
} else if (DM[playerid] == 2){
SetPlayerPos(playerid, -2040.28, -205.52, 35.32);
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 1337);
GivePlayerWeapon(playerid, 25, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);
return 1;
} else if (DM[playerid] == 3){
SetPlayerPos(playerid, -2084.27, 280.77, 35.26);
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 1337);
GivePlayerWeapon(playerid, 31, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);
return 1;
} else if (DM[playerid] == 4){
SetPlayerPos(playerid, -971.10, 1061.41, 1345.02);
SetPlayerInterior(playerid, 10);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 34, 1337);
GivePlayerWeapon(playerid, 25, 1337);
GivePlayerWeapon(playerid, 30, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);
return 1;
} else if (DM[playerid] == 5){
SetPlayerPos(playerid, 229.91, 1937.03, 30.05);
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 25, 1337);
GivePlayerWeapon(playerid, 31, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);
return 1;
} else if (DM[playerid] == 6){
SetPlayerPos(playerid, -1623.21, 670.24, -4.90);
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 23, 1337);
GivePlayerWeapon(playerid, 33, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);
return 1;
} else if (DM[playerid] == 13){
SetPlayerPos(playerid, -2136.53, -187.53, 35.32);
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 1337);
GivePlayerWeapon(playerid, 27, 1337);
GivePlayerWeapon(playerid, 31, 1337);
GivePlayerWeapon(playerid, 34, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);
return 1;
} else if (DM[playerid] == 14){
SetPlayerPos(playerid, 323.56, 2509.47, 16.52);
SetPlayerInterior(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 1337);
GivePlayerWeapon(playerid, 25, 1337);
GivePlayerWeapon(playerid, 31, 1337);
GivePlayerWeapon(playerid, 34, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);
return 1;
} else if (DM[playerid] == 15){
SetPlayerPos(playerid, -1385.22, 1225.53, 1039.86);
SetPlayerInterior(playerid, 16);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 22, 1337);
GivePlayerWeapon(playerid, 26, 1337);
GivePlayerWeapon(playerid, 28, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);
return 1;
} else if (DM[playerid] == 7){
SetPlayerPos(playerid, 214.07, 167.32, 1003.02);
SetPlayerInterior(playerid, 3);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 1337);
GivePlayerWeapon(playerid, 27, 1337);
GivePlayerWeapon(playerid, 34, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);
return 1;
} else if (DM[playerid] == 8)
SetPlayerPos(playerid, 296.16, -40.94, 1001.51);
SetPlayerInterior(playerid, 1);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 22, 1337);
GivePlayerWeapon(playerid, 9, 1337);
SetPlayerVirtualWorld(playerid, DMWORLD_MIN);
PlayerPlaySound(playerid, 1039, 0, 0, 0);
}
return 1;
}