12.07.2011, 20:37
You know that CallRemoteFunction returns the return value of the function. You can make a use of that to call some variables. Example:
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.
pawn Код:
forward myVar(index); public myVar(index)
{
switch(index)
{
case 0: return variable1;
case 1: return variable2;
}
return -1;
}
pawn Код:
CallRemoteFunction("myVar", "i", index);
Other option is to use GVar Plugin which is very fast when it comes on performance.