Raised This Month: $169 Target: $400

Solved [CSGO] Turning Thrown Grenades Into Footballs

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Junior Member
Join Date: Nov 2018
Location: Las Vegas, Nevada
Old 10-12-2020 , 19:32   [CSGO] Turning Thrown Grenades Into Footballs
Reply With Quote #1

I am creating a CSGO plugin and attempting to turn grenades into a ball; have the ability to be caught and picked up on the ground by all players. I already have some of the projectile logic working but can't seem to allow players the ability to touch the ball at all. Can anyone point me in the right direction? So far I have the following:

PHP Code:
public void OnEntityCreated(int entity, const char[] classname)
StrContains(classname"_projectile") != -1SDKHook(entitySDKHook_SpawnPostGrenade_SpawnPost);
StrContains(classname"_projectile") != -1SDKHook(entitySDKHook_StartTouch, Catch);    

void Grenade_SpawnPost(int entity)
int client GetEntPropEnt(entityProp_Send"m_hOwnerEntity"); 
    if (
client == -1)return; // if the client's index is -1, stop
int iReference EntIndexToEntRef(entity); 

Action Timer_OnGrenadeCreated(Handle timerany ref)
int entity EntRefToEntIndex(ref);
SetEntProp(entityProp_Data"m_nNextThinkTick", -1); // block grenade explosion

void Catch (int clientint entity)
    if (!
PrintToChatAll("the football has hit something");    

At current, when a player throws a grenade/ball off the wall the player cannot catch the grenade; the grenade goes through the player's body. Do I need to set an ent's property or is one of my functions interfering in some way?

Last edited by SweetDickWilly; 10-15-2020 at 15:41.
SweetDickWilly is offline

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 09:57.

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