msi morkva
Участник
- Сообщения
- 319
- Реакции
- 36
есть плагин я его декомпилировал так как разработчик потерял исходник но не могу скомпилировать. Помогите удалить не нужные строчки чтобы он заработал я его хочу использовать для зомби мода чтобы у зомби бошки отваливались
Добавлено через 11 минут
начал сам удалят всего при компиляции было 8 ошибок удалил тама немного стало 4
Добавлено через 2 часа 24 минуты
вот что получилось осталось 4 ошибки уже все перепробывал(((
PHP:
new PlVers:__version = 5;
new Float:NULL_VECTOR[3];
new String:NULL_STRING[1];
new Extension:__ext_core = 64;
new MaxClients;
new Extension:__ext_sdktools = 276;
new Extension:__ext_cstrike = 320;
new Handle:droponhurt;
new Handle:drophealth;
new g_heads[65];
public Plugin:myinfo =
{
name = "Drophead",
description = "Fall of head",
author = "Zhelnov Vladimir | vlzhelnov@yandex.ru",
version = "1.0.0",
url = "http://www.hlmod.ru"
};
public __ext_core_SetNTVOptional()
{
MarkNativeAsOptional("GetFeatureStatus");
MarkNativeAsOptional("RequireFeature");
MarkNativeAsOptional("AddCommandListener");
MarkNativeAsOptional("RemoveCommandListener");
VerifyCoreVersion();
return 0;
}
Float:operator+(Float:,_:)(Float:oper1, oper2)
{
return FloatAdd(oper1, float(oper2));
}
bool:StrEqual(String:str1[], String:str2[], bool:caseSensitive)
{
return strcmp(str1, str2, caseSensitive) == 0;
}
SetEntityMoveType(entity, MoveType:mt)
{
static bool:gotconfig;
static String:datamap[8];
if (!gotconfig)
{
new Handle:gc = LoadGameConfigFile("core.games");
new bool:exists = GameConfGetKeyValue(gc, "m_MoveType", "", 32);
CloseHandle(gc);
if (!exists)
{
strcopy("", 32, "m_MoveType");
}
__unk = 1;
}
SetEntProp(entity, PropType:1, "", mt, 4);
return 0;
}
AddFileToDownloadsTable(String:filename[])
{
static table = -1;
if (table == -1)
{
table = FindStringTable("downloadables");
}
new bool:save = LockStringTables(false);
AddToStringTable(table, filename, "", -1);
LockStringTables(save);
return 0;
}
public OnPluginStart()
{
HookEvent("player_hurt", EventHook:9, EventHookMode:1);
droponhurt = CreateConVar("sm_dhhurtfall", "1", "Default: 1", 0, false, 0, false, 0);
drophealth = CreateConVar("sm_dhealth", "40", "Default: 40", 0, false, 0, false, 0);
return 0;
}
public OnMapStart()
{
AddFileToDownloadsTable("models/player/ct_gign1_dc.mdl");
AddFileToDownloadsTable("models/player/ct_gign1_dc.sw.vtx");
AddFileToDownloadsTable("models/player/ct_gign1_dc.dx80.vtx");
AddFileToDownloadsTable("models/player/ct_gign1_dc.dx90.vtx");
AddFileToDownloadsTable("models/player/ct_gign1_dc.phy");
AddFileToDownloadsTable("models/player/ct_gign1_dc.vvd");
AddFileToDownloadsTable("models/player/ct_gign1_dc.mdl");
AddFileToDownloadsTable("models/player/ct_gign_head.sw.vtx");
AddFileToDownloadsTable("models/player/ct_gign_head.dx80.vtx");
AddFileToDownloadsTable("models/player/ct_gign_head.dx90.vtx");
AddFileToDownloadsTable("models/player/ct_gign_head.phy");
AddFileToDownloadsTable("models/player/ct_gign_head.vvd");
AddFileToDownloadsTable("models/player/ct_gign_head.mdl");
AddFileToDownloadsTable("models/player/ct_gsg91_dc.sw.vtx");
AddFileToDownloadsTable("models/player/ct_gsg91_dc.dx80.vtx");
AddFileToDownloadsTable("models/player/ct_gsg91_dc.dx90.vtx");
AddFileToDownloadsTable("models/player/ct_gsg91_dc.phy");
AddFileToDownloadsTable("models/player/ct_gsg91_dc.vvd");
AddFileToDownloadsTable("models/player/ct_gsg91_dc.mdl");
AddFileToDownloadsTable("models/player/ct_gsg9_head.sw.vtx");
AddFileToDownloadsTable("models/player/ct_gsg9_head.dx80.vtx");
AddFileToDownloadsTable("models/player/ct_gsg9_head.dx90.vtx");
AddFileToDownloadsTable("models/player/ct_gsg9_head.phy");
AddFileToDownloadsTable("models/player/ct_gsg9_head.vvd");
AddFileToDownloadsTable("models/player/ct_gsg9_head.mdl");
AddFileToDownloadsTable("models/player/ct_sas1_dc.sw.vtx");
AddFileToDownloadsTable("models/player/ct_sas1_dc.dx80.vtx");
AddFileToDownloadsTable("models/player/ct_sas1_dc.dx90.vtx");
AddFileToDownloadsTable("models/player/ct_sas1_dc.phy");
AddFileToDownloadsTable("models/player/ct_sas1_dc.vvd");
AddFileToDownloadsTable("models/player/ct_sas1_dc.mdl");
AddFileToDownloadsTable("models/player/ct_sas_head.sw.vtx");
AddFileToDownloadsTable("models/player/ct_sas_head.dx80.vtx");
AddFileToDownloadsTable("models/player/ct_sas_head.dx90.vtx");
AddFileToDownloadsTable("models/player/ct_sas_head.phy");
AddFileToDownloadsTable("models/player/ct_sas_head.vvd");
AddFileToDownloadsTable("models/player/ct_sas_head.mdl");
AddFileToDownloadsTable("models/player/ct_urban1_dc.sw.vtx");
AddFileToDownloadsTable("models/player/ct_urban1_dc.dx80.vtx");
AddFileToDownloadsTable("models/player/ct_urban1_dc.dx90.vtx");
AddFileToDownloadsTable("models/player/ct_urban1_dc.phy");
AddFileToDownloadsTable("models/player/ct_urban1_dc.vvd");
AddFileToDownloadsTable("models/player/ct_urban1_dc.mdl");
AddFileToDownloadsTable("models/player/ct_urban_head.sw.vtx");
AddFileToDownloadsTable("models/player/ct_urban_head.dx80.vtx");
AddFileToDownloadsTable("models/player/ct_urban_head.dx90.vtx");
AddFileToDownloadsTable("models/player/ct_urban_head.phy");
AddFileToDownloadsTable("models/player/ct_urban_head.vvd");
AddFileToDownloadsTable("models/player/ct_urban_head.mdl");
AddFileToDownloadsTable("models/player/t_arctic1_dc.sw.vtx");
AddFileToDownloadsTable("models/player/t_arctic1_dc.dx80.vtx");
AddFileToDownloadsTable("models/player/t_arctic1_dc.dx90.vtx");
AddFileToDownloadsTable("models/player/t_arctic1_dc.phy");
AddFileToDownloadsTable("models/player/t_arctic1_dc.vvd");
AddFileToDownloadsTable("models/player/t_arctic1_dc.mdl");
AddFileToDownloadsTable("models/player/t_arctic_head.sw.vtx");
AddFileToDownloadsTable("models/player/t_arctic_head.dx80.vtx");
AddFileToDownloadsTable("models/player/t_arctic_head.dx90.vtx");
AddFileToDownloadsTable("models/player/t_arctic_head.phy");
AddFileToDownloadsTable("models/player/t_arctic_head.vvd");
AddFileToDownloadsTable("models/player/t_arctic_head.mdl");
AddFileToDownloadsTable("models/player/t_guerilla1_dc.sw.vtx");
AddFileToDownloadsTable("models/player/t_guerilla1_dc.dx80.vtx");
AddFileToDownloadsTable("models/player/t_guerilla1_dc.dx90.vtx");
AddFileToDownloadsTable("models/player/t_guerilla1_dc.phy");
AddFileToDownloadsTable("models/player/t_guerilla1_dc.vvd");
AddFileToDownloadsTable("models/player/t_guerilla1_dc.mdl");
AddFileToDownloadsTable("models/player/t_guerilla_head.sw.vtx");
AddFileToDownloadsTable("models/player/t_guerilla_head.dx80.vtx");
AddFileToDownloadsTable("models/player/t_guerilla_head.dx90.vtx");
AddFileToDownloadsTable("models/player/t_guerilla_head.phy");
AddFileToDownloadsTable("models/player/t_guerilla_head.vvd");
AddFileToDownloadsTable("models/player/t_guerilla_head.mdl");
AddFileToDownloadsTable("models/player/t_leet1_dc.sw.vtx");
AddFileToDownloadsTable("models/player/t_leet1_dc.dx80.vtx");
AddFileToDownloadsTable("models/player/t_leet1_dc.dx90.vtx");
AddFileToDownloadsTable("models/player/t_leet1_dc.phy");
AddFileToDownloadsTable("models/player/t_leet1_dc.vvd");
AddFileToDownloadsTable("models/player/t_leet1_dc.mdl");
AddFileToDownloadsTable("models/player/t_leet_head.sw.vtx");
AddFileToDownloadsTable("models/player/t_leet_head.dx80.vtx");
AddFileToDownloadsTable("models/player/t_leet_head.dx90.vtx");
AddFileToDownloadsTable("models/player/t_leet_head.phy");
AddFileToDownloadsTable("models/player/t_leet_head.vvd");
AddFileToDownloadsTable("models/player/t_leet_head.mdl");
AddFileToDownloadsTable("models/player/t_phoenix1_dc.sw.vtx");
AddFileToDownloadsTable("models/player/t_phoenix1_dc.dx80.vtx");
AddFileToDownloadsTable("models/player/t_phoenix1_dc.dx90.vtx");
AddFileToDownloadsTable("models/player/t_phoenix1_dc.phy");
AddFileToDownloadsTable("models/player/t_phoenix1_dc.vvd");
AddFileToDownloadsTable("models/player/t_phoenix1_dc.mdl");
AddFileToDownloadsTable("models/player/t_phoenix_head.sw.vtx");
AddFileToDownloadsTable("models/player/t_phoenix_head.dx80.vtx");
AddFileToDownloadsTable("models/player/t_phoenix_head.dx90.vtx");
AddFileToDownloadsTable("models/player/t_phoenix_head.phy");
AddFileToDownloadsTable("models/player/t_phoenix_head.vvd");
AddFileToDownloadsTable("models/player/t_phoenix_head.mdl");
AddFileToDownloadsTable("models/decapination/dc_chippy.dx80.vtx");
AddFileToDownloadsTable("models/decapination/dc_chippy.dx90.vtx");
AddFileToDownloadsTable("models/decapination/dc_chippy.mdl");
AddFileToDownloadsTable("models/decapination/dc_chippy.phy");
AddFileToDownloadsTable("models/decapination/dc_chippy.sw.vtx");
AddFileToDownloadsTable("models/decapination/dc_chippy.vvd");
PrecacheModel("models/player/ct_gign1_dc.mdl", true);
PrecacheModel("models/player/ct_gsg91_dc.mdl", true);
PrecacheModel("models/player/ct_sas1_dc.mdl", true);
PrecacheModel("models/player/ct_urban1_dc.mdl", true);
PrecacheModel("models/player/t_arctic1_dc.mdl", true);
PrecacheModel("models/player/t_guerilla1_dc.mdl", true);
PrecacheModel("models/player/t_leet1_dc.mdl", true);
PrecacheModel("models/player/t_phoenix1_dc.mdl", true);
PrecacheModel("models/player/ct_gign_head.mdl", true);
PrecacheModel("models/player/ct_gsg9_head.mdl", true);
PrecacheModel("models/player/ct_sas_head.mdl", true);
PrecacheModel("models/player/ct_urban_head.mdl", true);
PrecacheModel("models/player/t_arctic_head.mdl", true);
PrecacheModel("models/player/t_guerilla_head.mdl", true);
PrecacheModel("models/player/t_leet_head.mdl", true);
PrecacheModel("models/player/t_phoenix_head.mdl", true);
return 0;
}
/* ERROR! unknown operator (+) */
function "Detachment" (number 7)
public Action:plhurt(Handle:event, String:name[], bool:dontBroadcast)
{
new hitgroup = GetEventInt(event, "hitgroup");
if (hitgroup == 1)
{
decl String:mold[256];
decl String:mbody[256];
decl String:mhead[256];
new client = GetClientOfUserId(GetEventInt(event, "userid"));
new onhurt = GetConVarInt(droponhurt);
GetClientModel(client, mold, 256);
if (!(StrEqual(mold, "models/player/ct_gign.mdl", false)))
{
if (StrEqual(mold, "models/player/ct_gsg9.mdl", false))
{
}
else
{
if (StrEqual(mold, "models/player/ct_sas.mdl", false))
{
}
else
{
if (StrEqual(mold, "models/player/ct_urban.mdl", false))
{
}
else
{
if (StrEqual(mold, "models/player/t_arctic.mdl", false))
{
}
else
{
if (StrEqual(mold, "models/player/t_guerilla.mdl", false))
{
}
else
{
if (StrEqual(mold, "models/player/t_leet.mdl", false))
{
}
else
{
if (StrEqual(mold, "models/player/t_phoenix.mdl", false))
{
}
}
}
}
}
}
}
}
if (onhurt == 1)
{
Detachment(client, mbody, mhead);
}
else
{
new dhealth = GetConVarInt(drophealth);
if (GetClientHealth(client) < dhealth)
{
Detachment(client, mbody, mhead);
}
}
}
return Action:0;
}
Добавлено через 11 минут
начал сам удалят всего при компиляции было 8 ошибок удалил тама немного стало 4
Добавлено через 2 часа 24 минуты
вот что получилось осталось 4 ошибки уже все перепробывал(((
PHP:
new PlVers:version = 5;
new Extension:ext_core = 64;
new Extension:ext_sdktools = 276;
new Extension:ext_cstrike = 320;
new Handle:droponhurt;
new Handle:drophealth;
new g_heads[65];
public Plugin:myinfo =
{
name = "Drophead",
description = "Fall of head",
author = "Zhelnov Vladimir | vlzhelnov@yandex.ru",
version = "1.0.0",
url = "http://www.hlmod.ru"
};
public ext_core_SetNTVOptional()
{
MarkNativeAsOptional("GetFeatureStatus");
MarkNativeAsOptional("RequireFeature");
MarkNativeAsOptional("AddCommandListener");
MarkNativeAsOptional("RemoveCommandListener");
VerifyCoreVersion();
return 0;
}
Float:operator+(Float:,_:)(Float:oper1, oper2)
{
return FloatAdd(oper1, float(oper2));
}
bool:StrEqual(String:str1[], String:str2[], bool:caseSensitive)
{
return strcmp(str1, str2, caseSensitive) == 0;
}
SetEntityMoveType(entity, MoveType:mt)
{
static bool:gotconfig;
static String:datamap[8];
if (!gotconfig)
{
new Handle:gc = LoadGameConfigFile("core.games");
new bool:exists = GameConfGetKeyValue(gc, "m_MoveType", "", 32);
CloseHandle(gc);
if (!exists)
{
strcopy("", 32, "m_MoveType");
}
unk = 1;
}
SetEntProp(entity, PropType:1, "", mt, 4);
return 0;
}
AddFileToDownloadsTable(String:filename[])
{
static table = -1;
if (table == -1)
{
table = FindStringTable("downloadables");
}
new bool:save = LockStringTables(false);
AddToStringTable(table, filename, "", -1);
LockStringTables(save);
return 0;
}
public OnPluginStart()
{
HookEvent("player_hurt", EventHook:9, EventHookMode:1);
droponhurt = CreateConVar("sm_dhhurtfall", "1", "Default: 1", 0, false, 0, false, 0);
drophealth = CreateConVar("sm_dhealth", "40", "Default: 40", 0, false, 0, false, 0);
return 0;
}
public OnMapStart()
{
AddFileToDownloadsTable("models/player/zh/zh_charple001_hs.mdl");
AddFileToDownloadsTable("models/player/zh/zh_charple001_hs.sw.vtx");
AddFileToDownloadsTable("models/player/zh/zh_charple001_hs.dx80.vtx");
AddFileToDownloadsTable("models/player/zh/zh_charple001_hs.dx90.vtx");
AddFileToDownloadsTable("models/player/zh/zh_charple001_hs.phy");
AddFileToDownloadsTable("models/player/zh/zh_charple001_hs.vvd");
AddFileToDownloadsTable("models/player/zh/zh_charple001_hs.mdl");
AddFileToDownloadsTable("models/player/zh/zh_charple001_head.sw.vtx");
AddFileToDownloadsTable("models/player/zh/zh_charple001_head.dx80.vtx");
AddFileToDownloadsTable("models/player/zh/zh_charple001_head.dx90.vtx");
AddFileToDownloadsTable("models/player/zh/zh_charple001_head.phy");
AddFileToDownloadsTable("models/player/zh/zh_charple001_head.vvd");
AddFileToDownloadsTable("models/player/zh/zh_charple001_head.mdl");
AddFileToDownloadsTable("models/player/zh/zh_corpse002_hs.sw.vtx");
AddFileToDownloadsTable("models/player/zh/zh_corpse002_hs.dx80.vtx");
AddFileToDownloadsTable("models/player/zh/zh_corpse002_hs.dx90.vtx");
AddFileToDownloadsTable("models/player/zh/zh_corpse002_hs.phy");
AddFileToDownloadsTable("models/player/zh/zh_corpse002_hs.vvd");
AddFileToDownloadsTable("models/player/zh/zh_corpse002_hs.mdl");
AddFileToDownloadsTable("models/player/zh/zh_corpse002_head.sw.vtx");
AddFileToDownloadsTable("models/player/zh/zh_corpse002_head.dx80.vtx");
AddFileToDownloadsTable("models/player/zh/zh_corpse002_head.dx90.vtx");
AddFileToDownloadsTable("models/player/zh/zh_corpse002_head.phy");
AddFileToDownloadsTable("models/player/zh/zh_corpse002_head.vvd");
AddFileToDownloadsTable("models/player/zh/zh_corpse002_head.mdl");
AddFileToDownloadsTable("models/player/zh/zh_zombie003_hs.sw.vtx");
AddFileToDownloadsTable("models/player/zh/zh_zombie003_hs.dx80.vtx");
AddFileToDownloadsTable("models/player/zh/zh_zombie003_hs.dx90.vtx");
AddFileToDownloadsTable("models/player/zh/zh_zombie003_hs.phy");
AddFileToDownloadsTable("models/player/zh/zh_zombie003_hs.vvd");
AddFileToDownloadsTable("models/player/zh/zh_zombie003_hs.mdl");
AddFileToDownloadsTable("models/player/zh/zh_zombie003_head.sw.vtx");
AddFileToDownloadsTable("models/player/zh/zh_zombie003_head.dx80.vtx");
AddFileToDownloadsTable("models/player/zh/zh_zombie003_head.dx90.vtx");
AddFileToDownloadsTable("models/player/zh/zh_zombie003_head.phy");
AddFileToDownloadsTable("models/player/zh/zh_zombie003_head.vvd");
AddFileToDownloadsTable("models/player/zh/zh_zombie003_head.mdl");
PrecacheModel("models/player/zh/zh_charple001_hs.mdl", true);
PrecacheModel("models/player/zh/zh_corpse002_hs.mdl", true);
PrecacheModel("models/player/zh/zh_zombie003_hs.mdl", true);
PrecacheModel("models/player/zh/zh_charple001_head.mdl", true);
PrecacheModel("models/player/zh/zh_corpse002_head.mdl", true);
PrecacheModel("models/player/zh/zh_zombie003_head.mdl", true);
return 0;
}
/* ERROR! unknown operator (+) */
function "Detachment" (number 7)
public Action:plhurt(Handle:event, String:name[], bool:dontBroadcast)
{
new hitgroup = GetEventInt(event, "hitgroup");
if (hitgroup == 1)
{
decl String:mold[256];
decl String:mbody[256];
decl String:mhead[256];
new client = GetClientOfUserId(GetEventInt(event, "userid"));
new onhurt = GetConVarInt(droponhurt);
GetClientModel(client, mold, 256);
if (!(StrEqual(mold, "models/player/zh/zh_charple001.mdl", false)))
{
if (StrEqual(mold, "models/player/zh/zh_corpse002.mdl", false))
{
}
else
{
if (StrEqual(mold, "models/player/zh/zh_zombie003.mdl", false))
{
}
}
}
if (onhurt == 1)
{
Detachment(client, mbody, mhead);
}
else
{
new dhealth = GetConVarInt(drophealth);
if (GetClientHealth(client) < dhealth)
{
Detachment(client, mbody, mhead);
}
}
}
return Action:0;
}
Последнее редактирование: