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

Solved [CS:GO] How to send snowball hit effect to client


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 12-29-2018 , 05:46   [CS:GO] How to send snowball hit effect to client
Reply With Quote #1

How to send snowball hit effect to client?
Attached Images
File Type: jpg 56789.jpg (48.4 KB, 830 views)

Last edited by Indarello; 12-29-2018 at 08:32.
Indarello is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 12-29-2018 , 05:58   Re: [CS:GO] How to send snowball hit effect to client
Reply With Quote #2

Hmmm, could this be same as flashbang flash..
Need to peak netprops
Bacardi is offline
backwards
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 12-29-2018 , 06:46   Re: [CS:GO] How to send snowball hit effect to client
Reply With Quote #3

Had to look this one up, it's a game event.

PHP Code:
#include <sourcemod>

public OnPluginStart()
{
    
RegConsoleCmd("sm_snowballme"SnowBallMe_CMD);
}

bool:IsValidClient(clientbool:bAllowBots true)
{
    if(!(
<= client <= MaxClients) || !IsClientConnected(client) || !IsClientInGame(client) || (IsFakeClient(client) && !bAllowBots))
        return 
false;

    return 
true;
}

public 
Action SnowBallMe_CMD(int clientint args)
{
    if(
IsValidClient(client))
        
SnowballEffect(client);
}

void SnowballEffect(int client)
{
    
Event event CreateEvent("snowball_hit_player_face");
    if (
event == null)
        return;

    
event.SetInt("userid"GetClientUserId(client));
    
event.SetInt("attacker"GetClientUserId(client));
    
event.Fire();

I'm unsure what all the arguments are for the event but it seems you only need these two.
__________________
I highly recommend joining the SourceMod Discord Server for real time support.
backwards is offline
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 12-29-2018 , 06:50   Re: [CS:GO] How to send snowball hit effect to client
Reply With Quote #4

Quote:
Originally Posted by 1337norway View Post
PHP Code:
CreateEvent("snowball_hit_player_face"); 
How you found it
Indarello is offline
backwards
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 12-29-2018 , 06:55   Re: [CS:GO] How to send snowball hit effect to client
Reply With Quote #5

I just searched for all the references found for the byte pattern of "snow" in IDA Pro. This was the only one that stuck out so i looked where it was found to be used in the client.dll. (all of the xrefernces) which are when the memory address pops up anywhere from the asm instructions. It was in a function that was comparing a variable to different strings. All the strings compared were game events like "gg_final_weapon_achieved" or "assassination_target_killed" from This event List. So it only made since it was checking to see what the event name was.
__________________
I highly recommend joining the SourceMod Discord Server for real time support.
backwards is offline
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 12-29-2018 , 06:58   Re: [CS:GO] How to send snowball hit effect to client
Reply With Quote #6

resource\modevents.res
I found this file in vpk
from this info https://forums.alliedmods.net/showth...02#post2268802
Indarello is offline
backwards
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 12-29-2018 , 07:01   Re: [CS:GO] How to send snowball hit effect to client
Reply With Quote #7

Awh yeah the resource files should show the info for all the arguments of the events. In case there's more stuff that can be modified like transparency percent or color. I'm too lazy to install GCFScape and extract the VPK file contents right now though. Should be easy to find
__________________
I highly recommend joining the SourceMod Discord Server for real time support.
backwards is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 12-29-2018 , 07:32   Re: [CS:GO] How to send snowball hit effect to client
Reply With Quote #8

sm_cvar net_showevents 2
But there are server side and client side events.
Code:
Server event "snowball_hit_player_face", Tick 90408:
- "userid" = "2"

*edit
Hey, could that be TempEnt ?? https://sm.alliedmods.net/new-api/sdktools_tempents
Need to check.

*edit
"EffectDispatch"
*edit
nah, it prevent snowball effect/particles

Last edited by Bacardi; 12-29-2018 at 09:38.
Bacardi is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 12-29-2018 , 08:03   Re: [CS:GO] How to send snowball hit effect to client
Reply With Quote #9

Quote:
Originally Posted by 1337norway View Post
Awh yeah the resource files should show the info for all the arguments of the events. In case there's more stuff that can be modified like transparency percent or color. I'm too lazy to install GCFScape and extract the VPK file contents right now though. Should be easy to find
Quote:
"snowball_hit_player_face"
{
"userid" "short" // player userid
}
no transparency percent or color i'm afraid

and no "attacker" it looks like

what happens if you set it?
__________________

Last edited by 8guawong; 12-29-2018 at 08:03.
8guawong is offline
backwards
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 12-29-2018 , 08:04   Re: [CS:GO] How to send snowball hit effect to client
Reply With Quote #10

seems nothing different, no errors in server or client console from it.
__________________
I highly recommend joining the SourceMod Discord Server for real time support.
backwards is offline
Reply



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 20:08.


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