PAWN-knowledge needed: Is there a way to "forward" variables?
#3

You know that CallRemoteFunction returns the return value of the function. You can make a use of that to call some variables. Example:
pawn Код:
forward myVar(index); public myVar(index)
{
    switch(index)
    {
        case 0: return variable1;
        case 1: return variable2;
    }
    return -1;
}
pawn Код:
CallRemoteFunction("myVar", "i", index);
You can maybe change it to a string and than use strcmp instead of index to make it not confusing.

Other option is to use GVar Plugin which is very fast when it comes on performance.
Reply


Messages In This Thread
PAWN-knowledge needed: Is there a way to "forward" variables? - by Mauzen - 12.07.2011, 20:19
Re: PAWN-knowledge needed: Is there a way to "forward" variables? - by [HiC]TheKiller - 12.07.2011, 20:32
Re: PAWN-knowledge needed: Is there a way to "forward" variables? - by RyDeR` - 12.07.2011, 20:37
Re: PAWN-knowledge needed: Is there a way to "forward" variables? - by Mauzen - 12.07.2011, 20:55

Forum Jump:


Users browsing this thread: 1 Guest(s)