Module: Ham Sandwich

Adding Modules to help with scripting/coding plugins.
User avatar
Archive-Poster
Posts: 1090
Gender:
United States of America

Module: Ham Sandwich

Post by Archive-Poster »

This module allows you to call 2 private functions for entities, with some cross-mod compatibility.

There are just two natives currently; I may add more if I see some that could be useful.

hs_takedamage(idVictim,idInflictor,idAttacker , Float:damage, type);
hs_use(id,idActivator,idCaller, use_type, Float:use_value);

I have comments for the natives in the include file.

The mods supported:
cstrike
czero
dod
tfc
ns - 3.2 beta 2
ts - only tested on the ts_i386 binary (the default one) should work on the i686 one
sven

Note: these are all most recent version, and all are from legitimate versions eg: no steam is not and will never be supported, although it probably will still work


Note: czero support is assumed, I have not tested it.

Note: I only tested hs_takedamage, don't have time to test hs_use just yet.

Note: Most windows offsets are untested but should in theory be correct.

Note: Linux takedamages have all been tested.

Note: No 64 bit support. 64 bit can go to hell.

Read the include file for some more in depth explanations.

Attached is "test.sma", the plugin I used to test takedamage. It may help show it's usage, it may not! It's not meant for general servers, just an example.

edit: I should have a fixed release quality linux binary now; I will test more thoroughly when I get home later tonight. I also fixed it calling takedamage on NS.

Fixed sven coop directory too :o
Attachments
source.zip
(69.32 KiB) Downloaded 3 times
binaries.zip
(50.19 KiB) Downloaded 5 times
test.sma.zip
(388 Bytes) Downloaded 4 times
hamsandwich.inc.zip
(1.49 KiB) Downloaded 3 times

Who is online

Users browsing this forum: No registered users and 0 guests