if strlen equals AdminPW. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: if strlen equals AdminPW. (
/showthread.php?tid=79764)
if strlen equals AdminPW. -
shitbird - 30.05.2009
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.
Re: if strlen equals AdminPW. -
Correlli - 30.05.2009
Use equal function which can be found in DracoBlue's dutils.inc
Re: if strlen equals AdminPW. -
shitbird - 30.05.2009
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.
Re: if strlen equals AdminPW. -
Lewwy - 30.05.2009
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?
Re: if strlen equals AdminPW. -
shitbird - 30.05.2009
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.