AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [tf2] attempting to override default projectile speed of syringes (https://forums.alliedmods.net/showthread.php?t=340091)

possibly_yaboi_mark 10-23-2022 19:10

[tf2] attempting to override default projectile speed of syringes
 
i am currently attempting to override the default projectile speed of all syringes, and yes, i have tried tf2items, that didn't work.

my current code is entered below, although if anyone could tell me how to put it in those nice looking code boxes that would be nice.

#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
#include <entity>
#pragma newdecls required
#pragma semicolon 1

public void Hook_EntitySpawned(int entity, const char[] ClassName)
{
if (StrEqual(ClassName,"tf_projectile_syringe")) {
float velocity[3];
GetEntPropVector(entity, Prop_Data, "m_vecVelocity", velocity);
velocity[0] *= 4;
velocity[1] *= 4;
velocity[2] *= 4;
TeleportEntity(entity, NULL_VECTOR, NULL_VECTOR, velocity);
}
}

zXCaptainXz 10-24-2022 04:29

Re: [tf2] attempting to override default projectile speed of syringes
 
Hey, you're posting in the wrong subforum, this is for AMX Mod X, this is the subforum for sourcemod https://forums.alliedmods.net/forumdisplay.php?f=107

You can surround your code with [php"][/php] (remove the " quote) in order to put it in a box.

possibly_yaboi_mark 10-24-2022 19:21

Re: [tf2] attempting to override default projectile speed of syringes
 
oh sorry about that. thanks for informing about the text formatting though!


All times are GMT -4. The time now is 20:54.

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