float UTIL_GetPlayerResources( edict_t *player )
{
return player->v.vuser4.z;
}#define RESOURCE_OFFSET 398
void UTIL_SetPlayerResources( edict_t *player, float resources )
{
(float*)((char*)(player->pvPrivateData)
+ 398) = resources;
}edict_t *player; // Assumes this is set to the
player's edict.
char *infobuffer;
char model[32];
infobuffer = (*g_engfuncs.pfnGetInfoKeyBuffer)(player);
strcpy(model, (g_engfuncs.pfnInfoKeyValue(infobuffer, "model")));edict_t *player; // Assumes this is set to the
player's edict.
const char *model;
model = STRING(player->v.model);bool UTIL_IsBuilt(edict_t *pent)
{
if( ! (pent->v.iuser4 & (1<<2)) )
{
return true;
}
else
if(FStrEq(STRING(pent->v.classname),"team_hive") &&
pent->v.fuser1 >= 1000)//Hives are just wierd.
{
pent->v.iuser4 &=
~(1<<2);
return true;
}
return false;
}
float UTIL_GetPlayerEnergy( edict_t *player )
{
return player->v.fuser1 / 10.0; //
This returns the percentage (0%-100%)
}| Event ID |
Effect |
| 1 |
Weapon Animation |
| 2 |
Knife swipe |
| 3 |
LMG round with brass |
| 4 |
Pistol round with brass |
| 5 |
Shotgun round with shell |
| 6 |
HMG round with shell |
| 7 |
GL round |
| 8 |
Gorge spit projectile |
| 9 |
Onos gore |
| 10 |
Fade swipe? |
| 11 |
Spore projectile. No spore
cloud. |
| 12 |
Lerk spike. Impact only. |
| 13 |
Skulk bite |
| 14 |
Health spray |
| 15 |
Gorge web projectile |
| 16 |
Primal scream |
| 17 |
Parasite |
| 18 |
Metabolise |
| 19 |
Umbra projectile. No cloud. |
| 20 |
Blink success |
| 21 |
Xenocide effect |
| 22 |
Bilebomb projectile and splash |
| 23 |
Acid rocket projectile and splash |
| 24 |
Stomp shockwave |
| 25 |
Devour |
| 26 |
Leap |
| 27 |
Charge |
| 28 |
OC spike |
| 29 |
Welder |
| 30 |
WelderConst |
| 31 |
WelderStart |
| 32 |
WelderEnd |
| 33 |
Jetpack effect |
| 34 |
Regeneration noise |
| 35 |
Start cloak |
| 36 |
End cloak |
| 37 |
Spore cloud |
| 38 |
Umbra cloud |
| 39 |
StopScream??? |
| 40 |
IP spawn effect |
| 41 |
Commander item drop effect |
| 42 |
Siege impact |
| 43 |
SiegeViewHit??? |
| 44 |
CommandPoints??? Don't
know. Appears to be
a green light ??? |
| 45 |
Alien flashlight on noise |
| 46 |
Alien flashlight off noise |
| 47 |
Marine empty-ammo noise |
| 48 |
NumericalInfo - those lines of
text that say "x resources recieved" or "ammo recieved". origin - the origin of the text fparam1 - for "resources" event, the number of resources recieved iparam1 - the type of the event (0=resources, 1=health, 2=resources donated, 3=ammo) iparam2 - for "resources" event, the team that gets the resources (1=marines, 2=aliens) |
| 49 |
InvalidAction |
| 50 |
Particle |
| 51 |
Distress beacon light/siren |
| 52 |
MetabolizeSuccess |
(int*)((char*)(player)+OFFSET)
The value of OFFSET depends on the type of reserve ammo you
want. Known values are: LMG = 0xE6, Pistol = 0xE7, Shotgun =
0xE8, HMG = 0xE9, GL = 0xEA. Under Linux, the offsets should be
increased by 5.float UTIL_GetPlayerExperience( edict_t *player )
{
return player->v.vuser4.z;
}#define PLAYER_POINTS_OFFSET 1581(int*)((char*)(player)+PLAYER_POINTS_OFFSET)