Raised This Month: $81 Target: $400
 20% 

[INC] NMRiH VScript Proxy


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
MsDysphie
AlliedModders Donor
Join Date: Dec 2017
Old 06-02-2022 , 15:21   [INC] NMRiH VScript Proxy
Reply With Quote #1

This is an include for No More Room in Hell that allows you to call VScript functions from Sourcemod.

Source: https://github.com/dysphie/nmrih-vsc...ript_proxy.inc

Usage:
  • Drag and drop `vscript_proxy.inc` into spcomp's `include` directory
  • #include <vscript_proxy> in your script

Natives List:
All natives are documented in the .inc
  • RunEntVScript
  • RunEntVScriptEnt
  • RunEntVScriptBool
  • RunEntVScriptFloat
  • RunEntVScriptVector
  • RunEntVScriptString

Example script:

PHP Code:
#include <sdktools>
#include <vscript_proxy>

public void OnPluginStart()
{
    
RegConsoleCmd("test_proxy"test_proxy);
}

Action test_proxy(int clientint args)
{
    
PrintToServer("GetOwner(): %d"RunEntVScriptEnt(client"GetOwner()"));

    
RunEntVScript(client"ViewPunch(Vector(10, 0, 0))");

    
PrintToServer("IsAlive(): %d"RunEntVScriptBool(client"IsAlive()"));
    
PrintToServer("GetJumpStaminaCost(): %f"RunEntVScriptFloat(client"GetJumpStaminaCost()"));

    
float vec[3];
    
RunEntVScriptVector(client"GetAngles()"vec);
    
PrintToServer("GetAngles(): %f %f %f"vec[0], vec[1], vec[2]);

    
char str[32];
    
RunEntVScriptString(client"GetClassname()"strsizeof(str));
    
PrintToServer("GetClassname(): %s"str);

    return 
Plugin_Handled;

Special Thanks:
__________________
Discord: @dysphie
Donations: ko-fi.com/dysphie

Last edited by MsDysphie; 06-02-2022 at 15:22.
MsDysphie is offline
 


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:15.


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