"entity" is not a string. It is the ent index of the entity. It's a number, ranging anywhere from MaxClients+1 to 4096 (right?)
PHP Code:
public OnEntityCreated(entity, const String:classname[]) //syringe gun redo
{
if (StrEqual(classname, "tf_projectile_syringe", false))
SDKHook(entity, SDKHook_Spawn, Hook_SyringeSpawned);
}
public Hook_SyringeSpawned(syringe)
{
if (IsValidEntity(syringe)) //this check might not be necessary, but I don't know enough about SDKHooks to say for certain
SetEntityGravity(syringe, 0.1);
}
There is no need to check the entity's validness multiple times. Also, you cannot SetEntityGravity on a string, only on entities.
Also, I don't know how well setting the gravity to 0.1 would work. You might want to replace SetEntityGravity with the movetype suggestion above.
__________________