How can I get event when a player touches an
not solid entity?
PHP Code:
// ...
new entity = CreateEntityByName("flashbang_projectile");
if ((entity != -1) && DispatchSpawn(entity))
{
SetEntityModel(entity, "models/bigball.mdl"); // Big model
SetEntProp(entity, Prop_Send, "m_CollisionGroup", 2); // Set no solid
TeleportEntity(entity, fPos, NULL_VECTOR, NULL_VECTOR); // Teleport to player
SDKHook(entity, SDKHook_StartTouch, OnStartTouch); // Hook touch event
}
// ...
public OnStartTouch(entity, client)
{
if (!IsValidEntity(client))
return;
decl String:classname[32];
GetEdictClassname(client, classname, sizeof(classname));
PrintToChatAll("EntityName toched %s", classname);
// We need to get: "EntityName toched Player"
}