Quote:
Originally Posted by Alienmario
although a definite breaker would be if synergy lacked the weapon_cubemap entity.
If you want to try you'll need synergy's linux server file to get the offsets, convert either with this dumper or manually
|
Thanks man
ill look into this
Quote:
Originally Posted by Alienmario
Btw does synergy have any built-in support for custom weapons?
|
Well the models materials and script files can be sent to and downloaded by clients
but i tried giving myself the weapon_hands that was used in this plugin and even though i have the weapon_hands.txt in the server's scripts folder (where there are already stock weapons like weapon_slam) it didnt turn up as a vaild entity
so perhaps theres a step i dont know of where you actually register that weapon_hands.txt as an entity
if so id love to find out how to do that!
also as a side note id love to find out how to create new npcs because i
have custom models and sounds for some of the default entities and so i've been working on a plugin that onEntitySpawned if its a certain npc class it's model gets replaced however in game the only class that seems to be getting its model updated is npc_combine_s and i have no idea what im missing or doing wrong, i think perhaps the hook gets called before the npc actually gets its model (even though npc_combine_s gets his damn model) idk for sure heres the code
PHP Code:
public OnEntityCreated(entity, const String:classname[])
{
//PrintToServer("[SM] v%s: %d entity spawned.", PLUGIN_VERSION, classname);
// decl String:playerSlotName[64];
// GetEntityClassname( entity, playerSlotName, sizeof( playerSlotName ));
// if ( StrEqual( playerSlotName, "npc_metropolice", false ))
// {
// PrintToServer("[SM] Metropolice found at %s", classname);
// }
SDKHook(entity, SDKHook_Spawn, OnEntitySpawned);
}
public OnEntitySpawned(entity)
{
decl String:cheese[128];
GetEntityClassname( entity, cheese, sizeof( cheese ));
if ( StrEqual( cheese, "npc_barney", false ))
{
PrintToServer("[SM] Barney found at %s", cheese);
decl String:ModelName[256];
GetEntPropString(entity, Prop_Data, "m_ModelName", ModelName, sizeof(ModelName));
if (StrEqual(ModelName, "models/barney.mdl"))
{
PrecacheModel("models/ChoclatePancake/barneyhelmet_faceplate.mdl");
PrecacheModel("models/ChoclatePancake/barneyhelmet.mdl");
PrecacheModel("models/ChoclatePancake/barney.mdl");
SetEntityModel(entity, "models/ChoclatePancake/barney.mdl");
}
}
if ( StrEqual( cheese, "npc_combine_s", false ))
{
PrintToServer("[SM] %s Given New Model", cheese);
// PrecacheModel("models/alyx.mdl");
// SetEntityModel(entity, "models/alyx.mdl");
decl String:ModelName[256];
GetEntPropString(entity, Prop_Data, "m_ModelName", ModelName, sizeof(ModelName));
if (StrEqual(ModelName, "models/combine_soldier.mdl"))
{
PrecacheModel("models/ChoclatePancake/combine_soldier.mdl");
SetEntityModel(entity, "models/ChoclatePancake/combine_soldier.mdl");
}
if (StrEqual(ModelName, "models/combine_soldier_prisonguard.mdl"))
{
PrecacheModel("models/ChoclatePancake/combine_soldier_prisonguard.mdl");
SetEntityModel(entity, "models/ChoclatePancake/combine_soldier_prisonguard.mdl");
}
if (StrEqual(ModelName, "models/combine_super_soldier.mdl"))
{
PrecacheModel("models/ChoclatePancake/combine_super_soldier.mdl");
SetEntityModel(entity, "models/ChoclatePancake/combine_super_soldier.mdl");
}
}
if ( StrEqual( cheese, "npc_metropolice", false ))
{
decl String:MpodelName[256];
GetEntPropString(entity, Prop_Data, "m_ModelName", MpodelName, sizeof(MpodelName));
if (StrEqual(MpodelName, "models/police.mdl"))
{
PrecacheModel("models/ChoclatePancake/police.mdl");
SetEntityModel(entity, "models/ChoclatePancake/police.mdl");
}
PrintToServer("[SM] Metropolice found at %s", cheese);
}
if ( StrEqual( cheese, "npc_manhack", false ))
{
PrintToServer("[SM] Manhack found at %s", cheese);
PrecacheModel("models/manhacker.mdl");
PrecacheSound("sound/npc/manhacker/gib.wav");
PrecacheSound("sound/npc/manhacker/mh_engine_loop1.wav");
PrecacheSound("sound/npc/manhacker/mh_engine_loop2.wav");
SetEntityModel(entity, "models/manhacker.mdl");
}
// Just incase those pesky metrocops slip past classname identification!
new String:lamaname[128];
GetEntPropString(entity, Prop_Data, "m_ModelName", lamaname, 128);
if (StrEqual(lamaname, "models/police.mdl"))
{
PrecacheModel("models/ChoclatePancake/police.mdl");
SetEntityModel(entity, "models/ChoclatePancake/police.mdl");
}
else if (StrEqual(lamaname, "models/police_ss.mdl"))
{
PrecacheModel("models/ChoclatePancake/police.mdl");
SetEntityModel(entity, "models/ChoclatePancake/police.mdl");
}
}
so if that is the case than im thinking maybe id have to create a new entity like npc_manhacker instead of npc_manhack that gets spawned inplace of that npc_manhack but that might be too complicated for something that i feel like could be done simply