How to check a value?
#1

So basically i have this script:
Code:
	if(strcmp(cmd, "/givemoney", true) == 0)
    {
        new tmp[30];
        tmp = strtok(cmdtext, idx);
        new otherplayer = strval(tmp);

        if(IsPlayerConnected(otherplayer))
        {
            GivePlayerMoney(otherplayer, 50000);
        }
        return 1;
    }
and this enums:
Code:
enum pInfo
{
	Float:x,
	Float:y,
	Float:z,
	Float:a,
	Wep1,
	Wep2,
	Wep3,
	Wep4,
	Wep5,
	Wep6,
	Wep7,
	Wep8,
	Ammo1,
	Ammo2,
	Ammo3,
	Ammo4,
	Ammo5,
	Ammo6,
	Ammo7,
	Ammo8,
	Hour,
	Min,
	Password[MAX_PASS_SIZE+1],
	Logged,
	FalseLogins,
	Admin,      <------This one
}
I want my admin enum to be checked,and if its set to 1,in the user's dini file,then the command works,if its not then it will not work and it will give a message.
I must mention that my system is dini.(Yes it sucks but for starters like me its gold).

I just need the syntax for checking a value,in a dini user file.

Thanks for helping me
Reply


Messages In This Thread
How to check a value? - by Mikibey - 07.06.2012, 19:48
Re: How to check a value? - by zDevon - 07.06.2012, 19:55
Re: How to check a value? - by JhnzRep - 07.06.2012, 19:57
Re: How to check a value? - by Mikibey - 07.06.2012, 19:57
Re: How to check a value? - by Mikibey - 07.06.2012, 20:07
Re: How to check a value? - by JhnzRep - 07.06.2012, 20:10
Re: How to check a value? - by Mikibey - 07.06.2012, 20:15
Re: How to check a value? - by JhnzRep - 07.06.2012, 20:20
Re: How to check a value? - by Mikibey - 08.06.2012, 06:07
Re: How to check a value? - by Mikibey - 08.06.2012, 06:12

Forum Jump:


Users browsing this thread: 1 Guest(s)