View Single Post
comp_noob
Senior Member
Join Date: Nov 2010
Old 11-29-2010 , 10:56   Re: [Alien Swarm] Finding current equipped weapon name
Reply With Quote #9

Quote:
Originally Posted by psychonic View Post
More followup...

Since I'm nice (sometimes) and this will eventually be needed anyway, here is a plugin library to provide natives for these. Just do "#include <swarmtools>". I can/will also add natives to replicate any sdktools_functions natives that require a client index but need to be executed on a marine. Just let me know what doesn't work directly with a marine index.

This is completely untested as I don't have the desire or time to do so right now, but if you can confirm that it works, I'll post it in the New Plugins section (or fix it first).

Code:
/**
* Gets the marine entity controlled by the given player
*
* @param client Client index
* @return Marine entity index or -1 for none or not found
* @error Invalid client index
*/
native Swarm_GetMarine(client);

/**
* Gets the client index controlling given marine
*
* @param marine Marine entity index
* @return Client index of controller or -1 for none or not found
* @error Invalid marine index
*/
native Swarm_GetClientOfMarine(marine);



This requires SDK Tools and SDK Hooks. I will post a temporary build of SDK Hooks 1.3 shortly that will work on Alien Swarm.
Thanks! i will gladly try it out for you... but about sdk hooks...
comp_noob is offline