AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Solved Get Variable Address, Is it possible? (https://forums.alliedmods.net/showthread.php?t=327746)

ABCDEFGH23 10-07-2020 03:36

Get Variable Address, Is it possible?
 
PHP Code:

#include <sourcemod>
#include <sdktools>

Handle hTest;

public 
void OnPluginStart(){

Handle Config LoadGameConfigFile("config");

StartPrepSDKCall(SDKCall_Static);
PrepSDKCall_SetFromConf(ConfigSDKConf_Signature"ABCDEFG");
PrepSDKCall_AddParameter(SDKType_PlainOldDataSDKPass_Plain);
hTest EndPrepSDKCall();

CloseHandle(Config);

RegConsoleCmd("GetAddress"getaddress);

}

public 
Action getaddress(int clientint args){
int var1[3];
SDKCall(hTest, &var1);
PrintToConsole(client"%d"var1[0]+var1[1]+var1[2]);
return 
Plugin_Handled;



asherkin 10-07-2020 05:02

Re: Get Variable Address, Is it possible?
 
Your example is nonsensical and it would be easier to help you with a concrete function you want to call.

The general answer to your title question is no, but obviously SDKCall needs to be able to support that sort of calls - look at the SDKType and SDKPass enums.


All times are GMT -4. The time now is 07:58.

Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.