I'm trying to give created projectiles from custom weapons in tf2 velocity. however, I'm getting errors when trying to compile the code. Could someone help me? My code is here (starts at line 11)
Code:
public void OnPluginStart()
{
HookEvent("player_shoot", Event_PlayerShoot);
}
public void Event_PlayerShoot(Event event, const char[] name, bool dontBroadcast)
{
int victim_id = event.GetInt("userid");
int weapon_id = event.GetInt("weaponid");
int mode_id = event.GetInt("mode");
/* CODE */
if (weapon_id == 230)
{
public OnEntityCreated(entity, const String:classname[])
{
if (StrEqual(classname, "tf_projectile_healing_bolt", false))
SDKHook(entity, SDKHook_Spawn, Hook_SyringeSpawned);
}
public Hook_SyringeSpawned(syringe)
{
if (IsValidEntity(syringe))
void TeleportEntity(int entity, const float origin[NULL_VECTOR], const float angles[NULL_VECTOR], const float velocity[3])
}
}
}
}
The errors I got was
(27)Error 029: invalid expression, assumed zero
(27)error 017: undefined symbol "OnentityCreated"
(27)error 029: invalid expression, assumed zero