Well I've spent some time and collected data from Dino D-Day and have come up with a ddd_stocks.inc file similar to tf2_stocks.inc
Here it is. There might be a few weapon id's I've missed, but these were all I could aquire. So all the unknown's in the list might be unused.
PHP Code:
#if defined _ddd_stocks_included
#endinput
#endif
#define _ddd_stocks_included
// Weapon codes as used in events, such as player_death
enum {
DDD_WEAPON_MP40 = 1,
DDD_WEAPON_THOMPSON,
DDD_WEAPON_SHOTGUN,
DDD_WEAPON_UNKNOWN1,
DDD_WEAPON_COLT45,
DDD_WEAPON_UNKNOWN2,
DDD_WEAPON_TRENCHKNIFE,
DDD_WEAPON_GARAND,
DDD_WEAPON_BAR,
DDD_WEAPON_LUGER,
DDD_WEAPON_UNKNOWN3,
DDD_WEAPON_UNKNOWN4,
DDD_WEAPON_UNKNOWN5,
DDD_WEAPON_MOSIN,
DDD_WEAPON_K98, //Streicher's unscoped k98
DDD_WEAPON_VELOCIRAPTORCLAW,
DDD_WEAPON_UNKNOWN6,
DDD_WEAPON_UNKNOWN7,
DDD_WEAPON_UNKNOWN8,
DDD_WEAPON_K98SNIPER,
DDD_WEAPON_DESMATOSUCHUS, //both the flak and melee kill*
DDD_WEAPON_UNKNOWN9,
DDD_WEAPON_UNKNOWN10,
DDD_WEAPON_FLECHETTE,
DDD_WEAPON_BERSERK,
DDD_WEAPON_UNKNOWN11,
DDD_WEAPON_UNKNOWN12,
DDD_WEAPON_UNKNOWN13,
DDD_WEAPON_MP44,
DDD_WEAPON_DILOPHOSAURUS,
DDD_WEAPON_UNKNOWN14,
DDD_WEAPON_STENGUN,
DDD_WEAPON_P38,
DDD_WEAPON_NAGANT,
DDD_WEAPON_FISTSREGULAR,
DDD_WEAPON_UNKNOWN15,
DDD_WEAPON_TREX, //This is the MG kill if the player controlling the trex eats a player the weaponid will be DDD_WEAPON_TREX and DDD_CUSTOM_DINNER
DDD_WEAPON_UNKNOWN16,
DDD_WEAPON_UNKNOWN17,
DDD_WEAPON_TRIGGER, //both MG and melee*
DDD_WEAPON_STYGIMOLOCH //both MG and melee*
};
// Custom kill identifiers for the customkill property on the player_death event
// * = Get the weapon string on the player_death event to differentiate between melee and primary gun
enum {
DDD_CUSTOM_SUICIDE = 1,
DDD_CUSTOM_HEADSHOT,
DDD_CUSTOM_DINNER = 37 //between DDD_CUSTOM_HEADSHOT and DDD_CUSTOM_DINNER there have been no custom id's identified
};
enum DDDClassType
{
DDDClass_Spectate = 0,
DDDClass_Desmatosuchus,
DDDClass_Velociraptor,
DDDClass_Dilophosaurus,
DDDClass_Streicher,
DDDClass_Hissman,
DDDClass_Graff,
DDDClass_Hardgrave,
DDDClass_Spencer,
DDDClass_Nigel,
DDDClass_Ilona,
DDDClass_Camille,
DDDClass_Jakob,
DDDClass_Styracosaurus,
DDDClass_Trex,
DDDClass_Trigger,
DDDClass_Stygimoloch
};
enum DDDTeam
{
DDDTeam_Unassigned = 0,
DDDTeam_Spectator = 1,
DDDTeam_Allies = 2,
DDDTeam_Axis = 3
};
enum DDDResourceType
{
DDDResource_Ping,
DDDResource_Score,
DDDResource_Deaths,
DDDResource_Health,
DDDResource_PlayerClass
};
static const String:DDDResourceNames[DDDResourceType][] =
{
"m_iPing",
"m_iScore",
"m_iDeaths",
"m_iHealth",
"m_iPlayerClass"
};
/**
* Get's a Clients current class.
*
* @param client Player's index.
* @return Current DDDClassType of player.
* @error Invalid client index.
*/
stock DDDClassType:DDD_GetPlayerClass(client)
{
return DDDClassType:GetEntProp(client, Prop_Send, "m_iSpecialClass");
}
/**
* Set's a Clients class.
*
* Note: If setting player class in a player spawn hook weapons should be set to false.
*
* @param client Player's index.
* @param class DDDClassType class symbol.
* @param weapons This paramater is ignored.
* @param persistant If true changes the players desired class so the change stays after death.
* @noreturn
* @error Invalid client index.
*/
stock DDD_SetPlayerClass(client, DDDClassType:class, bool:weapons=true, bool:persistant=true)
{
SetEntProp(client, Prop_Send, "m_iSpecialClass", _:class);
if (persistant)
{
SetEntProp(client, Prop_Send, "m_iDesiredPlayerClass", _:class);
}
}
/**
* Retrieves client data from the resource entity
*
* @param client Player's index.
* @param type ResourceType constant
* @return Value or -1 on failure.
* @error Invalid client index, client not in game or failed to find resource entity.
*/
stock DDD_GetPlayerResourceData(client, DDDResourceType:type)
{
if (!IsClientConnected(client))
{
return -1;
}
new offset = FindSendPropInfo("CDDDPlayerResource", DDDResourceNames[type]);
if (offset < 1)
{
return -1;
}
new entity = DDD_GetResourceEntity();
if (entity == -1)
{
return -1;
}
return GetEntData(entity, offset + (client*4));
}
/**
* Sets client data in the resource entity
*
* Note: The game overwrites these values every frame, so changing them will have very little effect.
*
* @param client Player's index.
* @param type ResourceType constant
* @param value Value to set.
* @return Value or -1 on failure.
* @error Invalid client index, client not in game or failed to find resource entity.
*/
stock bool:DDD_SetPlayerResourceData(client, DDDResourceType:type, any:value)
{
if (!IsClientConnected(client))
{
return false;
}
new offset = FindSendPropInfo("CDDDPlayerResource", DDDResourceNames[type]);
if (offset < 1)
{
return false;
}
new entity = DDD_GetResourceEntity();
if (entity == -1)
{
return false;
}
SetEntData(entity, offset + (client*4), value);
return true;
}
/**
* Removes all weapons from a client's weapon slot
*
* @param client Player's index.
* @param slot Slot index (0-5)
* @noreturn
* @error Invalid client, invalid slot or lack of mod support
*/
stock DDD_RemoveWeaponSlot(client, slot)
{
new weaponIndex;
while ((weaponIndex = GetPlayerWeaponSlot(client, slot)) != -1)
{
RemovePlayerItem(client, weaponIndex);
RemoveEdict(weaponIndex);
}
}
/**
* Removes all weapons from a client
*
* @param client Player's index.
* @noreturn
*/
stock DDD_RemoveAllWeapons(client)
{
for (new i = 0; i <= 5; i++)
{
DDD_RemoveWeaponSlot(client, i);
}
}
/**
* Retrieves the entity index of the CDDDPlayerResource entity
*
* @return The current resource entity index.
*/
stock DDD_GetResourceEntity()
{
return FindEntityByClassname(-1, "ddd_player_manager");
}
Hope someone finds this information useful.
Please redownload this stock there is a small error that will stop compiling.