A very Tough Question
#7

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
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  
    }
    }
   
}
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..
Reply


Messages In This Thread
A very Tough Question - by [MM]RoXoR[FS] - 20.07.2012, 12:08
Re: A very Tough Question - by Andi_Evandy - 20.07.2012, 12:10
Re: A very Tough Question - by Babul - 20.07.2012, 12:14
Re: A very Tough Question - by [MM]RoXoR[FS] - 20.07.2012, 14:37
Re: A very Tough Question - by [MM]RoXoR[FS] - 20.07.2012, 14:48
Re: A very Tough Question - by [MM]RoXoR[FS] - 20.07.2012, 15:25
Re: A very Tough Question - by [MM]RoXoR[FS] - 20.07.2012, 15:58

Forum Jump:


Users browsing this thread: 1 Guest(s)