[HowTo] Activate Variable W/ PassWord.
#9

Quote:
Originally Posted by samgreen
Here is the documentation if you would like to adapt it. Remember, the parameters with equal signs are OPTIONAL.

strcmp(const string1[], const string2[], bool: ignorecase=false, length=cellmax)

string1 - The first string in the comparison.
string2 - The first string in the comparison.
ignorecase - If logically “true”, case is ignored during the comparison.
length - The maximum number of characters to consider for comparison.

The return value is:
−1 if string1 comes before string2,
1 if string1 comes after string2, or
0 if the strings are equal (for the matched length).
So something along with this?

I removed the AdminPW because you could just use the STRCMP line for both the password and the variable?

pawn Код:
dcmd_auth(playerid, params[])
{
    if (!strlen(params)) return SendClientMessage(playerid, COLOR_MSG ,"Error: No Input.");
    if(strcmp(params, "testpass", true))
    {
        Admin[playerid] = 1;
        SendClientMessage(playerid, COLOR_MSG,"You Have Logged As: Admin.");
        SendClientMessage(playerid, COLOR_MSG,"/Kick(id), /Ban(id), /Slap(id), Launch(id),/Explode(id)");
        SendClientMessage(playerid, COLOR_MSG,"/Goto(id), /Get(id), /Stfu(id),");
    }
    return 1;
}
?
Reply


Messages In This Thread
[HowTo] Activate Variable W/ PassWord. - by shitbird - 05.06.2009, 17:08
Re: [HowTo] Activate Variable W/ PassWord. - by russiany - 06.06.2009, 20:28
Re: [HowTo] Activate Variable W/ PassWord. - by shitbird - 06.06.2009, 21:32
Re: [HowTo] Activate Variable W/ PassWord. - by samgreen - 06.06.2009, 21:41
Re: [HowTo] Activate Variable W/ PassWord. - by Weirdosport - 06.06.2009, 21:44
Re: [HowTo] Activate Variable W/ PassWord. - by shitbird - 06.06.2009, 21:45
Re: [HowTo] Activate Variable W/ PassWord. - by cigo - 06.06.2009, 21:48
Re: [HowTo] Activate Variable W/ PassWord. - by samgreen - 07.06.2009, 05:39
Re: [HowTo] Activate Variable W/ PassWord. - by shitbird - 07.06.2009, 10:20
Re: [HowTo] Activate Variable W/ PassWord. - by samgreen - 07.06.2009, 13:30

Forum Jump:


Users browsing this thread: 1 Guest(s)