Raised This Month: $32 Target: $400
 8% 

[CSGO] VScript


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kxnrl
AlliedModders Donor
Join Date: May 2015
Old 11-18-2021 , 20:22   [CSGO] VScript
Reply With Quote #1

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[] keyvariant_t field);
native  int VScript_GetValueString(int entity, const char[] keychar[] bufferint maxlen);
native bool VScript_GetValueVector(int entity, const char[] keyfloat vVector[3]);

native bool VScript_SetValue      (int entity, const char[] keyvariant_t fieldany 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()
DescriptionGet 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()
DescriptionGet SteamID64 for player.

Function:    
CBasePlayer::GetUserID
Signature
:   int CBasePlayer::GetUserID()
DescriptionGet UserId for player.

Function:    
CBasePlayer::IsAdmin
Signature
:   bool CBasePlayer::IsAdmin()
DescriptionCheck player is admin.

Function:    
CBaseEntity::SetDataEntity
Signature
:   void CBaseEntity::SetDataEntity(stringhandle)
DescriptionPeeks 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(stringint)
DescriptionPeeks 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(stringVector)
DescriptionPeeks 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)
DescriptionPeeks 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)
DescriptionPeeks 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()
DescriptionGet entity hammer id
state: W.I.P, Very unstable

GitHub
__________________
Kxnrl is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:52.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode