AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   SOLID entity (https://forums.alliedmods.net/showthread.php?t=314978)

supertimor 03-15-2019 19:57

SOLID entity
 
Hi!
Simple question - how to make solid entity? I mean i can't run into this, but i can shoot it with hooked SDKHook_OnTakeDamage of course?

SetEntProp(ent, Prop_Data, "m_takedamage", 2);
SetEntProp(ent, Prop_Send, "m_usSolidFlags", 4);
SetEntProp(ent, Prop_Data, "m_nSolidType", 5);
SetEntProp(ent, Prop_Send, "m_CollisionGroup", 11);

Help, please :(

supertimor 03-16-2019 07:19

Re: SOLID entity
 
Quote:

dzialo_gracza[client] = CreateEntityByName("hegrenade_projectile");
if(dzialo_gracza[client] != -1)
{
float forigin[3];
GetEntPropVector(client, Prop_Send, "m_vecOrigin", forigin);
forigin[2] += 40.0;

float iangles[3];
GetEntPropVector(client, Prop_Data, "m_angRotation", iangles);

DispatchSpawn(dzialo_gracza[client]);
ActivateEntity(dzialo_gracza[client]);
SetEntityModel(dzialo_gracza[client], "models/weapons/w_mach_m249.mdl");
SetEntityMoveType(dzialo_gracza[client], MOVETYPE_STEP);
TeleportEntity(dzialo_gracza[client], forigin, iangles, NULL_VECTOR);
SetEntProp(dzialo_gracza[client], Prop_Data, "m_takedamage", 2);
DispatchKeyValue(dzialo_gracza[client], "solid", "6");
SetEntProp(dzialo_gracza[client], Prop_Send, "m_usSolidFlags", 1);
SetEntProp(dzialo_gracza[client], Prop_Send, "m_CollisionGroup", 11);
SetEntProp(dzialo_gracza[client], Prop_Data, "m_iHealth", KS_sentry_hp.IntValue);
SetEntPropEnt(dzialo_gracza[client], Prop_Send, "m_hOwnerEntity", client);
SDKHook(dzialo_gracza[client], SDKHook_OnTakeDamage, TakeDamage);


still not working ;/

supertimor 03-16-2019 19:56

Re: SOLID entity
 
SetEntProp(dzialo_gracza[client], Prop_Data, "m_takedamage", 2); -> SetEntPropEnt(dzialo_gracza[client], Prop_Data, "m_takedamage", 2);
fixed, thanks!


All times are GMT -4. The time now is 09:21.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.