Add support for CreateIitemEntityByName for CS:GO
This commit is contained in:
parent
b4d34ef062
commit
3d461ecea1
@ -929,7 +929,16 @@ static cell_t CreateEntityByName(IPluginContext *pContext, const cell_t *params)
|
||||
|
||||
char *classname;
|
||||
pContext->LocalToString(params[1], &classname);
|
||||
#if SOURCE_ENGINE != SE_CSGO
|
||||
CBaseEntity *pEntity = (CBaseEntity *)servertools->CreateEntityByName(classname);
|
||||
#else
|
||||
CBaseEntity *pEntity = (CBaseEntity *)servertools->CreateItemEntityByName(classname);
|
||||
|
||||
if(!pEntity)
|
||||
{
|
||||
pEntity = (CBaseEntity *)servertools->CreateEntityByName(classname);
|
||||
}
|
||||
#endif
|
||||
return gamehelpers->EntityToBCompatRef(pEntity);
|
||||
}
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user