Quote:
Originally Posted by Maxximou5
Like Psyk0tik mentioned, you only need to open one file not files, pak01_dir.vpk,
|
So you have to open the dir vpk file!
Thank you (both) for making that perfectly clear!
Back to the original question.
Now that I have the modevents.res file for csgo I still don't see how I would know the function prototype for any given event.
All this res file is a text version of what is shown on the SourceMod site.
So for example player_hurt event shows
Code:
"player_hurt"
{
"userid" "short" // player index who was hurt
"attacker" "short" // player index who attacked
"health" "byte" // remaining health points
"armor" "byte" // remaining armor points
"weapon" "string" // weapon name attacker used, if not the world
"dmg_health" "short" // damage done to health
"dmg_armor" "byte" // damage done to armor
"hitgroup" "byte" // hitgroup that was damaged
}
To hook this event you need a function with this return type and these parameters.
public Action:Event_player_hurt(Handle:event, const String:name[], bool:dontBroadcast)
I can't know this from looking at this event in the res file or from the Sourcemodd site that lists the csgo events.
What I have been doing is looking for a plugin that uses the praticular event I need and then copying the prototype from there.
It looks like most or a lot of events have that return type and those three parms but others do not.
This one has two int parms.
public Action WeaponEquip_Hook(int client, int weapon)
Again, when I hook an event how do I know what the parms and return type I need for the hook function I need to to create?