Raised This Month: $12 Target: $400
 3% 

Giving projectiles forward velocity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
topyke
Junior Member
Join Date: Feb 2021
Old 03-19-2021 , 19:00   Giving projectiles forward velocity
Reply With Quote #1

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
topyke is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:39.


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