Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define SC_TARGETINFO 964
- #define TARGETINFO_X 0
- #define TARGETINFO_Y 1
- #define TARGETINFO_Z 2
- #define TARGETINFO_HEALTH 3
- #define TARGETINFO_ANGLE 4
- #define TARGETINFO_TID 5
- #define TARGETINFO_SETFROZEN 6
- #define TARGETINFO_SETTOTALLYFROZEN 7
- #define TARGETINFO_INV 8
- #define TARGETINFO_PLAYERNUM 9
- #define TARGETINFO_SPAWNHEALTH 10
- #define TARGETINFO_TEAM 11
- #define TARGETINFO_WEAPONCHECK 12
- // ============================================================================
- // Acquire target information. This is encapsulated in a script so
- // as not to interfere with the original script's activator.
- script SC_TARGETINFO (int type, int value) {
- SetActivatorToTarget (0);
- SetResultValue (0);
- switch (type) {
- case TARGETINFO_X:
- SetResultValue (GetActorX (0));
- break;
- case TARGETINFO_Y:
- SetResultValue (GetActorY (0));
- break;
- case TARGETINFO_Z:
- SetResultValue (GetActorZ (0));
- break;
- case TARGETINFO_HEALTH:
- SetResultValue (GetHealth ());
- break;
- case TARGETINFO_ANGLE:
- SetResultValue (GetActorAngle (0));
- break;
- case TARGETINFO_TID:
- SetResultValue (ActivatorTID ());
- break;
- case TARGETINFO_SETFROZEN:
- SetPlayerProperty (0, value, PROP_FROZEN);
- break;
- case TARGETINFO_SETTOTALLYFROZEN:
- SetPlayerProperty (0, value, PROP_TOTALLYFROZEN);
- break;
- case TARGETINFO_INV:
- SetResultValue (CheckInventory (value));
- break;
- case TARGETINFO_PLAYERNUM:
- SetResultValue (PlayerNumber ());
- break;
- case TARGETINFO_SPAWNHEALTH:
- SetResultValue (GetSpawnHealth ());
- break;
- case TARGETINFO_TEAM:
- SetResultValue (PlayerTeam ());
- break;
- case TARGETINFO_WEAPONCHECK:
- SetResultValue (CheckWeapon (value));
- break;
- }
- }
- function int GetTargetInfo (int type, int value) {
- return ACS_ExecuteWithResult (SC_TARGETINFO, type, value);
- }
Advertisement
Add Comment
Please, Sign In to add comment