Ok, guys i've been killing myself trying to understand how to do something and i tryed everything, i need help
I downloaded this DM zone and edited everything for my own dm zone like places and all, the only thing i cant do is, when the player is killed it spawns out of the dm zone like to /lv and other random spawns, i edited the spawns on the script to the cordiants of the dm zone but still, spawns to normal places, please help im desperet
Код:
//******************************************************************************
#include "a_samp.inc"
#define FILTERSCRIPT
//******************************************************************************
/*
_____ _ _ _____ __ __
/ ____| | | | | __ \| \/ | English Edition.
| | __| |__ ___ ___| |_| | | | \ / | 2010
| | |_ | '_ \ / _ \/ __| __| | | | |\/| | CryWolf
| |__| | | | | (_) \__ \ |_| |__| | | | |
\_____|_| |_|\___/|___/\__|_____/|_| |_|
*/
//******************************************************************************
#define blue 0x005EECAA
#define red 0xFF0000AA
#define orange 0xFF9900AA
#define yellow 0xFFFF00AA
#define green 0x16EB43FF
#define red 0xFF0000AA
#define white 0xFFFFFFAA
#define aqua 0x00FFFFFF
#define SCM SendClientMessage
#define GPW GivePlayerWeapon
new String[256];
new bool:GDM_Options[MAX_PLAYERS];
new GDM_Var[MAX_PLAYERS];
new Float:GDM_Spawns[10][3] =
{
{2671.7800,-2095.0752,1427.7557},//GDM_Pos_1
{2565.8733,-2068.1265,1425.2694},//GDM_Pos_2
{-2121.1257,1419.0391,274.2393},//GDM_Pos_3
{-2121.1257,1419.0391,274.2393},//GDM_Pos_4
{-2121.1257,1419.0391,274.2393},//GDM_Pos_5
{-2121.1257,1419.0391,274.2393},//GDM_Pos_6
{-2121.1257,1419.0391,274.2393},//GDM_Pos_7
{2671.7800,-2095.0752,1427.7557},//GDM_Pos_8
{2671.7800,-2095.0752,1427.7557},//GDM_Pos_9
{2671.7800,-2095.0752,1427.7557}//GDM_Pos_10
};
//******************************************************************************
public OnFilterScriptInit()
{
print("<==== [FilterScript \"GhostDM\" LOADED] ====>");
//GhostDM - Map
CreateObject(17138, 3722.183350, -1949.690674, 37.010704, 0.000000, 0.000000, 0.000000); //
CreateObject(18225, 3818.573486, -1986.287598, 25.362217, 0.000000, 0.000000, -238.064021173); //
CreateObject(18225, 3786.480713, -2055.215088, 38.494873, 0.000000, 0.000000, -258.690272614); //
CreateObject(18225, 3834.457520, -1921.704834, 8.640879, 0.000000, 0.000000, -243.220412146); //
CreateObject(13635, 3630.596436, -1882.963135, 32.274025, -21.4859173174, 0.000000, -27.5019741663); //
CreateObject(17031, 3850.139893, -1856.216187, 4.262517, 0.000000, 0.000000, -1.71887338539); //
CreateObject(17031, 3828.128418, -1818.004883, 18.236977, 16.3292971612, 0.000000, 47.2690180983); //
CreateObject(17031, 3793.116943, -1801.327637, 14.904282, 0.000000, 0.000000, 74.7710495604); //
CreateObject(17031, 3755.490479, -1813.321899, 6.515030, 0.000000, 0.000000, 128.056124508); //
CreateObject(17031, 3713.593018, -1826.648682, 7.598877, 0.000000, 0.000000, 99.6947136485); //
CreateObject(17031, 3668.513916, -1829.095337, 16.778097, 9.45380361966, -0.859436692696, 94.5380361966); //
CreateObject(17031, 3623.174561, -1831.026245, 19.359104, 9.45380361966, -0.859436692696, 96.256909582); //
CreateObject(17031, 3595.863770, -1857.652222, 35.201725, 9.45380361966, -0.859436692696, 166.730832975); //
CreateObject(17031, 3590.227051, -1901.186768, 42.822655, 9.45380361966, -0.859436692696, 183.060187432); //
CreateObject(17031, 3599.432861, -1945.595825, 49.451180, 9.45380361966, -0.859436692696, 204.546276636); //
CreateObject(17031, 3625.125977, -1980.295532, 53.031021, 9.45380361966, -0.859436692696, 229.46999802); //
CreateObject(17031, 3659.650146, -2008.073364, 55.517746, 9.45380361966, -0.859436692696, 235.486054869); //
CreateObject(17031, 3694.344971, -2035.442627, 59.061722, 9.45380361966, -0.859436692696, 238.064364947); //
CreateObject(17031, 3727.300781, -2060.607422, 64.802544, 9.45380361966, -0.859436692696, 238.064364947); //
CreateObject(17031, 3753.759277, -2080.645996, 60.348228, -14.6104237758, -1.71887338539, 248.377662555); //
CreateObject(18273, 3759.396729, -1965.543091, 53.808594, -14.6104237758, 0.000000, 0.000000); //
CreateObject(790, 3767.482666, -1967.260010, 34.480537, -17.1887338539, 0.000000, 0.000000); //
CreateObject(790, 3688.692871, -1975.299805, 37.457794, -17.1887338539, 0.000000, 0.000000); //
CreateObject(791, 3784.581543, -1899.754639, 17.406921, 0.000000, 0.000000, 0.000000); //
CreateObject(790, 3761.261719, -1827.239502, 10.674025, 0.000000, 0.000000, 0.000000); //
CreateObject(695, 3677.711670, -1875.485962, 16.403095, 0.000000, 0.000000, 0.000000); //
CreateObject(694, 3679.810547, -1917.135498, 15.678654, 0.000000, 0.000000, 0.000000); //
CreateObject(693, 3624.144775, -1910.989380, 38.524796, 0.000000, 0.000000, 0.000000); //
CreateObject(698, 3640.015869, -1949.186768, 39.456089, 0.000000, 0.000000, 0.000000); //
CreateObject(689, 3709.989258, -1965.864746, 24.812750, 0.000000, 0.000000, 0.000000); //
CreateObject(688, 3650.744141, -1859.966431, 21.449898, 0.000000, 0.000000, 0.000000); //
CreateObject(664, 3677.519043, -1950.854248, 21.820835, 0.000000, 0.000000, 0.000000); //
CreateObject(8493, 3769.719238, -1925.538940, 42.413605, 0.000000, 0.000000, 34.3774677078); //
CreateObject(9159, 3769.598389, -1925.651978, 42.250809, 0.000000, 0.000000, 32.6585943225); //
CreateObject(16599, 3678.303467, -1890.022583, 19.781490, -2.57831007809, 5.15662015618, 0.000000); //
CreateObject(1681, 3731.958252, -1966.632446, 31.961922, 30.0802842444, -1.71887338539, -180.481762762); //
CreateObject(2780, 3730.101318, -1964.352295, 28.437033, 0.000000, 0.000000, 0.000000); //
CreateObject(10757, 3651.216797, -1860.526489, 33.929623, 0.000000, 0.000000, 0.000000); //
CreateObject(11459, 3687.128906, -1871.200439, 13.343369, 0.000000, 6.01605684887, 0.000000); //
CreateObject(11458, 3676.632813, -1868.113647, 15.680956, 0.000000, 11.1726770051, 0.000000); //
CreateObject(11457, 3686.575928, -1849.153809, 14.943371, 5.15662015618, 12.0321136977, 0.000000); //
CreateObject(11459, 3673.369141, -1853.496216, 17.306131, 4.29718346348, 6.01605684887, 0.000000); //
return true;
}
//******************************************************************************
public OnFilterScriptExit()
{
print("<==== [FilterScript \"GhostDM\" UN-LOADED] ====>");
return true;
}
//******************************************************************************
public OnPlayerConnect(playerid)
{
format(String,sizeof(String), "щмен \"%s\", бшек дба!.", PlayerName(playerid));
SCM(playerid,blue,String);
GDM_Var[playerid] = 0;
return true;
}
//******************************************************************************
public OnPlayerDisconnect(playerid, reason)
{
GDM_Var[playerid] = 0;
return true;
}
//******************************************************************************
public OnPlayerSpawn(playerid)
{
if(GDM_Var[playerid] == 1)
{
GDM_TeleportPlayer(playerid);
}
for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, true);
SetPlayerWeather(playerid,2);
SetPlayerTime(playerid,7,00);
SetPlayerPos(playerid,-2565.8733,-2068.1265,1425.2694);
return true;
}
//******************************************************************************
public OnPlayerCommandText(playerid, cmdtext[])
{
//-----------------------------------------
if(strcmp("/GDM", cmdtext, true) == 0)
{
if(GDM_Var[playerid] == 1)return SCM(playerid,red, "ERROR: You are already in this zone.");
if(GDM_Options[playerid] == false) return SCM(playerid,red, "ERROR: This zone is locked.");
GDM_Var[playerid] = 1;
SetPlayerVirtualWorld(playerid, 4);
GDM_TeleportPlayer(playerid);
SCM(playerid,aqua,"Welcome to the \"GhostDM\" Zone !");
SCM(playerid,aqua,"You Want To Exit? Type [/QDMZ] !");
return true;
}
//-----------------------------------------
if(strcmp("/QDMZ", cmdtext, true) == 0)
{
if(GDM_Var[playerid] == 0)return SCM(playerid,red, "ERROR: You are not in this zone.");
GDM_Var[playerid] = 0;
SetPlayerVirtualWorld(playerid, 0);
SCM(playerid,green,"You Quit the \"GhostDM\" Zone !");
ResetPlayerWeapons(playerid);
SpawnPlayer(playerid);
return true;
}
//-----------------------------------------
if(strcmp("/GDMHelp", cmdtext, true) == 0)
{
SCM(playerid,orange,"<<~~~~ Ghost DeathMatch - Info ~~~~>>");
SCM(playerid,yellow,"WELCOME TO DM ZONE.");
SCM(playerid,yellow,"/GDM - Telepot to the GDM Zone.");
SCM(playerid,yellow,"/QDMZ - Quit from the GDM Zone.");
{
SCM(playerid,red,"/EnableGDM - Locking The GDM Zone (RCON Admin).");
SCM(playerid,red,"/DisableGDM - Opening The GDM Zone (RCON Admin).");
}
return true;
}
//-----------------------------------------
if(strcmp("/EnableGDM", cmdtext, true) == 0)
{
if(GDM_Options[playerid] == true) return SCM(playerid,red, "ERROR: This zone is already opened.");
GDM_Options[playerid] = true;
SendClientMessageToAll(blue,"# GhostDM Zone is opened by the admin, type [/GDM] to teleport !");
return true;
}
//-----------------------------------------
if(strcmp("/DisableGDM", cmdtext, true) == 0)
{
if(GDM_Options[playerid] == false)return SCM(playerid,red, "ERROR: This zone is already closed.");
GDM_Options[playerid] = false;
for(new i;i<MAX_PLAYERS;i++)
{
GDM_Var[i] = 0;
}
SendClientMessageToAll(blue,"! рсвш тм йгй дагойп \"DM\" айжеш д");
return true;
}
//-----------------------------------------
if(GDM_Var[playerid] == 1)return SCM(playerid,red, "# GhostDM Zone has been closed by the admin !");
//-----------------------------------------
return false;
}
//******************************************************************************
stock GDM_TeleportPlayer(playerid)
{
new GDM_Random = random(sizeof(GDM_Spawns));
SetPlayerPos(playerid,2565.8733,-2068.1265,1425.2694);
SetPlayerFacingAngle(playerid,GDM_Spawns[GDM_Random][1]);
for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, true);
ResetPlayerWeapons(playerid);
GPW(playerid, 37, 10000);
GPW(playerid, 27, 10000);
GPW(playerid, 42, 10000);
GPW(playerid, 44, 1);
GPW(playerid, 30, 10000);
SetPlayerTime(playerid,0,0);
SetPlayerWeather(playerid,2);
SetPlayerHealth(playerid,100.0);
SetPlayerArmour(playerid,100.0);
SetPlayerPos(playerid,2565.8733,-2068.1265,1425.2694);
}
//******************************************************************************
stock PlayerName(playerid)
{
new Name[24];
GetPlayerName(playerid,Name,24);
return Name;
}
//******************************************************************************