View Single Post
Reiko1231
Member
Join Date: Apr 2013
Location: Russia
Old 09-08-2013 , 03:36   Re: [CS:GO] Spawned prop push away player
Reply With Quote #13

Native "SetEntProp" reported: Property "m_usSolidFlags" not safe to access (entity 136/prop_dynamic)

m_nSolidType and spawnflags doesn't help. prop always unsolid and empty.
Current code, which I use to spawn prop:
Code:
SpawnProp(iClient, iPropID, Float:fOrigin[3], Float:fAngles[3])
{
	new iEntity = CreateEntityByName("prop_dynamic");
	
	DispatchKeyValue(iEntity, "model", g_szPropPath[iPropID]);
	DispatchKeyValue(iEntity, "targetname", "prop");
	DispatchKeyValueVector(iEntity, "origin", fOrigin);
	DispatchKeyValueVector(iEntity, "angles", fAngles);
	DispatchSpawn(iEntity);
	
	SetEntProp(iEntity, Prop_Data, "m_nSolidType", 6);
	//SetEntProp(iEntity, Prop_Data, "m_usSolidFlags", 28);
	
	SetEntityMoveType(iEntity, MOVETYPE_NONE);
	AcceptEntityInput(iEntity, "DisableShadow");
	
	SetEntPropEnt(iEntity, Prop_Send, "m_hOwnerEntity", iClient);
	return iEntity;
}
Reiko1231 is offline