Home
Note
This site is a Work in Progress! Many functions are still not covered yet, or those that are already covered, their documentation are subject to change!
AngelScript is still a work in progress, there might be more functions or changes to come!
Last Update: 23.04.2024 (Changelog)
AngelScript
Tutorials
- Delaying
- Creating Contexts
- Repeating
- Calling AngelScript in Postal3Script
- Cache
- Getting Script Classes
Code Examples
Enums
Datatypes
Objects
- Ammo_t@
- CAmmoDef@
- CBaseEntity@
- CGameEvent@
- ConVar@
- CP3SObj@
- CP3Weapon@
- CParticleSystem@
- CPhysObj@
- CSoundPatch@
- CTakeDamageInfo@
- CWPNData@
- EHANDLE
- HintNodeData@
- KeyValues@
Global Variables
- engine
- gameeventmanager
- gpGlobals
vec3_origin
vec3_angle
Interfaces
Global Functions
Note
As of writing none of these global functions have any page, so here's all of them in one place.
string formatInt(int64 val, const string&in options = "", uint width = 0)
string formatUInt(uint64 val, const string&in options = "", uint width = 0)
string formatFloat(double val, const string&in options = "", uint width = 0, uint precision = 0)
int64 parseInt(const string&in, uint base = 10, uint&out byteCount = 0)
uint64 parseUInt(const string&in, uint base = 10, uint&out byteCount = 0)
double parseFloat(const string&in, uint&out byteCount = 0)
void Wait(double flTime, int iHandle = 0)
CP3SObj@ GetContextOwner()
CP3SObj@ GetContextCaller()
void CreateContext(string&in func, ?&in var = null, ?&in var2 = null, ?&in var3 = null, ?&in var4 = null, ?&in var5 = null, ?&in var6 = null, ?&in var7 = null, ?&in var8 = null, ?&in var9 = null, ?&in var10 = null, ?&in var11 = null, ?&in var12 = null, ?&in var13 = null, ?&in var14 = null, ?&in var15 = null)
void CreateContextClass(string&in sclass, string&in func, ?&in var2 = null, ?&in var3 = null, ?&in var4 = null, ?&in var5 = null, ?&in var6 = null, ?&in var7 = null, ?&in var8 = null, ?&in var9 = null, ?&in var10 = null, ?&in var11 = null, ?&in var12 = null, ?&in var13 = null, ?&in var14 = null, ?&in var15 = null)
CP3SObj@ GetPlayer()
CBaseEntity@[]& FindEntsByName(string&in name)
CBaseEntity@ FindEntByName(string&in name)
CP3SObj@ GetEntById(int id)
CAmmoDef@ GetAmmoDef()
CP3SObj@ GetCrosshair(CP3SObj@ pPlayer, Vector&inout endpos)
int GetAmmoIndex(string&in name)
IPostal3Script@ GetScriptObj(string&in className, CP3SObj@ pOwner)
int GetAmmoMaxCarry(int ammoIndex)
CBaseEntity@ CreateEnt(string&in name)
void Spawn(CBaseEntity@ ent)
int RandomInt(int min, int max)
CTakeDamageInfo@ CreateTakeDamageInfo()
double RandomFloat(double min, double max)
CSoundPatch@ CreateSound(CBaseEntity@ owner, string&in name)
void DestroySound(CSoundPatch@ sound)
bool IsSoundPlaying(CSoundPatch@ sound)
void PlaySound(CSoundPatch@ sound)
void FadeOutSound(CSoundPatch@ sound, double flTime)
void StopSound(CSoundPatch@ sound)
void FadeInSound(CSoundPatch@ sound, double flTime)
void ChangeSoundVolume(CSoundPatch@ sound, double flVolume, double flTime)
CParticleSystem@ CreateEffect(CBaseEntity@ owner, string&in effect, Vector&inout pos, QAngle&inout ang, double flTime)
void SetSoundVolume(CSoundPatch@ sound, double flVolume)
CParticleSystem@ CreateEffectAttachment(CBaseEntity@ owner, string&in effect, int attachment, double flTime)
void PrecacheModel(string&in model)
void PrecacheSound(string&in sound)
void PrecacheScriptSound(string&in scriptsound)
void PrecacheClass(string&in sclass)
void PrecacheParticleSystem(string&in particle)
void PrecacheMaterial(string&in material)
void PrecacheDecal(string&in decal)
void ListenForGameEvent(const string&in event)
void PrecacheClassModel(string&in sclass, string&in model)
void StopListeningForGameEvents()
ConVar@ CreateCVar(const string&in name, const string&in defValue = "", int flags = 0, const string&in help = "", bool callback = false, bool reset = false)
double GetCVarFloat(const string&in cvar)
ConVar@ FindCVar(const string&in name)
bool GetCVarBool(const string&in cvar)
int GetCVarInt(const string&in cvar)
string GetCVarString(const string&in cvar)
void Remove(CBaseEntity@ ent)
void InstallCVarCallback(const string&in name)
void RemoveEnt(CBaseEntity@ ent)
void AddToSensible(CBaseEntity@ ent)
bool CanSeeSpot(CP3SObj@ ent, Vector pos, bool bViewCone = false)
void ValidateHints()
void Teleport(CBaseEntity@ ent, Vector pos)
void StringToVector(Vector&inout vec, string&in str)
CBaseEntity@ CreateHint()
int StringToInt(string&in str)
void AddHintToList(CAI_Hint@ hint, bool bDebug = false)
CBaseEntity@ ToCBaseEntity(?&in var)
string[]& GetTemplateData(string&in iszTemplateName)
string GetTemplateDataRandom(string&in iszTemplateName)
CBaseEntity@ ParseEntity(string&in pEntData)
double VectorNormalize(Vector&inout vec)
double DotProduct(Vector vec1, Vector vec2)
void AngleVectors(QAngle ang, Vector&inout forward, Vector&inout right, Vector&inout up)
double GetP3SVar(string&in conststr)
bool HasP3SVar(string&in conststr)
int GetP3SFactionIndex(string&in name)
int GetP3SMannerIndex(string&in name)
void ShowMessage(string&in msg, string&in channel)
int GetP3SItemTypeIndex(string&in name)
int GetLocalTime(int flag)
void FadeScreen(int r, int g, int b, int alpha, double fadeTime, double holdTime, int flags)
int SetState(CP3SObj@ ent, string&in state, string&in pattern)
int DropToFloor(CBaseEntity@ pEntity, uint mask, CBaseEntity@ pIgnore = null)
string UnicodeToANSI(string&in unicode, bool bCleanup = true)
KeyValues@ CreateKeyValues(string&in name)
string InitString(string&in str = "")
bool Bitwise_AND(int org, int check)
void Printf(string&in msg, ?&in var = 0, ?&in var2 = 0, ?&in var3 = 0, ?&in var4 = 0, ?&in var5 = 0, ?&in var6 = 0, ?&in var7 = 0, ?&in var8 = 0, ?&in var9 = 0, ?&in var10 = 0, ?&in var11 = 0, ?&in var12 = 0, ?&in var13 = 0, ?&in var14 = 0, ?&in var15 = 0)
void Warning(string&in msg, ?&in var = 0, ?&in var2 = 0, ?&in var3 = 0, ?&in var4 = 0, ?&in var5 = 0, ?&in var6 = 0, ?&in var7 = 0, ?&in var8 = 0, ?&in var9 = 0, ?&in var10 = 0, ?&in var11 = 0, ?&in var12 = 0, ?&in var13 = 0, ?&in var14 = 0, ?&in var15 = 0)
void DebugOverlay_Box(const Vector&in origin, const Vector&in mins, const Vector&in maxs, int r, int g, int b, int a, double flDuration)
void DebugOverlay_BoxAngles(const Vector&in origin, const Vector&in mins, const Vector&in maxs, const QAngle&in angles, int r, int g, int b, int a, double flDuration)
void ToggleFSMOverlay(CBaseEntity@ ent)