20.07.2012, 15:58
I want that player/scripter should be able to pass his variable name to my include stock.
In my include, I would like to use his variable name to do the recquired operation.
This way even if he do like
Scripter should be able to pass any variable name they want, like money, Kills, Deaths etc..
First, I though of recording deaths ,kills, money etc of a player in my include.
But, I though it would be good if user could send any of his variable..
In my include, I would like to use his variable name to do the recquired operation.
This way even if he do like
pawn Код:
MyFunction("pInfo[tid][Kills]");
//In My include
MyFunction(str[])
{
new bool:found;
if(strfind(seq,"tID",true,0) == -1) found = false;
else found = true;
for(new tid = 0;tid<MAX_PLAYERS;++tid){
if(!IsPlayerCOnnected(tid) continue;
else
{
//A function or something so that now str becomes pInfo[tID][Kills].. instead of string or probably
//str stores the value of pInfo[tID][Kills]
//Do operation here
}
}
}
First, I though of recording deaths ,kills, money etc of a player in my include.
But, I though it would be good if user could send any of his variable..