if strlen equals AdminPW.
#1

Allright so, some time ago i did this together with Wadabak and WeeDarr, i forgot how the hell we do it, so i came here for some help.

This is my Code:

pawn Код:
dcmd_auth(playerid, params[])
{
    if (!strlen(params)) return SendClientMessage(playerid, COLOR_WHITE ,"Error: No Input.");
    new AuthMsg[128], pName[MAX_PLAYER_NAME];
    {
      SendClientMessage(playerid, COLOR_WHITE, "Auth'd = 1;");
      Admin[playerid] = 1;
      format(AuthMsg,sizeof(AuthMsg), "%s Auth'd For Admin Level.", pName);
      SendClientMessageToAll(COLOR_WHITE,AuthMsg);
    }
    return 1;
}
As you can see, i check'd if he didnt add any Input, but now, i forgot how to check if his params equals the variable called "AdminPW", can someone tell me`? it's really simple i know, but i forgotten it, AGAIN. .

Cheers, - Mikkel.
Reply
#2

Use equal function which can be found in DracoBlue's dutils.inc
Reply
#3

Quote:
Originally Posted by Don Correlli
Use equal function which can be found in DracoBlue's dutils.inc
there's a much easier way instead of downloading a include file, i remember we did this some time ago, but it's completely forgotten how i did it.
Reply
#4

Quote:
Originally Posted by Mikkel
Quote:
Originally Posted by Don Correlli
Use equal function which can be found in DracoBlue's dutils.inc
there's a much easier way instead of downloading a include file, i remember we did this some time ago, but it's completely forgotten how i did it.
Have you asked WeeDarr or Wadabak?
Reply
#5

Quote:
Originally Posted by [XG
Lj ]
Quote:
Originally Posted by Mikkel
Quote:
Originally Posted by Don Correlli
Use equal function which can be found in DracoBlue's dutils.inc
there's a much easier way instead of downloading a include file, i remember we did this some time ago, but it's completely forgotten how i did it.
Have you asked WeeDarr or Wadabak?
Heh, Dejavъ, WeeDarr just helped me fix it yet again,

Fix:

apparently the new AdminPW = "6816";
had to be new AdminPW = 6816;

It works fine ,thx peeps.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)