Provide vscript variables api to sourcemod, Provide sourcemod api to vscript.
Natives:
PHP Code:
enum variant_t
{
FIELD_VOID,
FIELD_FLOAT,
FIELD_STRING,
FIELD_VECTOR,
FIELD_INTEGER = 5,
FIELD_BOOLEAN,
FIELD_CHARACTER = 8,
FIELD_HSCRIPT = 33 // always use for CBaseEntity
}
// use entity -1 for global scope
native any VScript_GetValue (int entity, const char[] key, variant_t field);
native int VScript_GetValueString(int entity, const char[] key, char[] buffer, int maxlen);
native bool VScript_GetValueVector(int entity, const char[] key, float vVector[3]);
native bool VScript_SetValue (int entity, const char[] key, variant_t field, any value);
native bool VScript_SetValueString(int entity, const char[] key, const char[] value);
native bool VScript_SetValueVector(int entity, const char[] key, const float vVector[3]);
native bool VScript_ClearValue(int entity, const char[] key);
VScript Functions:
PHP Code:
Function: VScriptGetAdminPlayer
Signature: handle VScriptGetAdminPlayer()
Description: Get Admin Player as Entity.
Function: CBasePlayer::PrintToChat
Signature: void CBasePlayer::PrintToChat(string)
Description: Print to Chat.
Function: CBasePlayer::PrintToHint
Signature: void CBasePlayer::PrintToHint(string)
Function: CBasePlayer::GetSteamID
Signature: string CBasePlayer::GetSteamID()
Description: Get SteamID64 for player.
Function: CBasePlayer::GetUserID
Signature: int CBasePlayer::GetUserID()
Description: Get UserId for player.
Function: CBasePlayer::IsAdmin
Signature: bool CBasePlayer::IsAdmin()
Description: Check player is admin.
Function: CBaseEntity::SetDataEntity
Signature: void CBaseEntity::SetDataEntity(string, handle)
Description: Peeks into an entity's object data and sets the entity value at the given key.
Function: CBaseEntity::SetDataFloat
Signature: void CBaseEntity::SetDataFloat(string, float)
Description: Peeks into an entity's object data and sets the float value at the given key.
Function: CBaseEntity::SetDataInt
Signature: void CBaseEntity::SetDataInt(string, int)
Description: Peeks into an entity's object data and sets the integer value at the given key.
Function: CBaseEntity::SetDataString
Signature: void CBaseEntity::SetDataString(string, string)
Description: Peeks into an entity's object data and sets the string value at the given key.
Function: CBaseEntity::SetDataVector
Signature: void CBaseEntity::SetDataVector(string, Vector)
Description: Peeks into an entity's object data and sets the vector value at the given key.
Function: CBaseEntity::SetEdictStateChanged
Signature: void CBaseEntity::SetEdictStateChanged()
Description: Marks an entity as state changed.
Function: CBaseEntity::GetDataEntity
Signature: handle CBaseEntity::GetDataEntity(string)
Description: Peeks into an entity's object data and retrieves the entity value at the given key.
Function: CBaseEntity::GetDataFloat
Signature: float CBaseEntity::GetDataFloat(string)
Description: Peeks into an entity's object data and retrieves the float value at the given key.
Function: CBaseEntity::GetDataInt
Signature: int CBaseEntity::GetDataInt(string)
Description: Peeks into an entity's object data and retrieves the integer value at the given key.
Function: CBaseEntity::GetDataString
Signature: string CBaseEntity::GetDataString(string)
Description: Peeks into an entity's object data and retrieves the string value at the given key.
Function: CBaseEntity::GetDataVector
Signature: Vector CBaseEntity::GetDataVector(string)
Description: Peeks into an entity's object data and retrieves the vector value at the given key.
Function: CBaseEntity::GetHammerID
Signature: int CBaseEntity::GetHammerID()
Description: Get entity hammer id.
state: W.I.P, Very unstable
GitHub
__________________