[Tutorial] Remote Function calling
#6

Quote:
Originally Posted by Fernado Samuel
View Post
So is it possible to get a variable's address if I add a parameter to it's forwarded function and then return it accordingly?
Yes, you're able to get a variable's value through remote calling in case if you've forwarded a function. I've done an example of kills, deaths and levels which is linked on the main post. It contains such a remote call. However, here's a small example:

my_gamemode.pwn

pawn Code:
new
    myVars[5];
   
forward GetVariableValue(var_id);
public GetVariableValue(var_id)
{
    if(var_id < 0 || var_id > 4) return 0;
    return myVars[var_id];
}
my_FS.pwn

pawn Code:
stock GetVariableValue(var_id)
{
    return CallRemoteFunction("GetVariableValue", "i", var_id);
}
Reply


Messages In This Thread
Remote Function calling - by Lordzy - 01.06.2014, 04:43
Re: Remote Function calling - by Deathlane - 01.06.2014, 12:49
Re: Remote Function calling - by Lordzy - 01.06.2014, 15:19
Re: Remote Function calling - by Sojo12 - 01.06.2014, 15:33
Re: Remote Function calling - by Fernado Samuel - 02.07.2014, 16:09
Re: Remote Function calling - by Lordzy - 05.07.2014, 13:44

Forum Jump:


Users browsing this thread: 1 Guest(s)