Command not working
#1

pawn Код:
CMD:login(playerid,params[])
{
    new string[256];
    new string1[128];
    string = dini_Get(File,"Password:");
    if(sscanf(params,"%s",string1)) SendClientMessage(playerid,0x00FF00FF,"Usage: /login [Password]");
    else
    {
        if(strcmp(string,string1,true))
        {
            SendClientMessage(playerid,0x00FF00FF,"You succesfully logged in");
        }
        if(!strcmp(string,string1,true))
        {
            SendClientMessage(playerid,0x00FF00FF,"Invalid password");
        }
    }
    return 1;
}
This is my script,and no matter what i type it says "Invalid Password"
Reply
#2

so i changed it to this:
pawn Код:
if(strcmp(string,string1,true)==0)
and now nothing happens,doesn't matter if the password is correct or no
Reply
#3

nah,i want to make this one work,it will never be used anyway,im just trying to learn.If you can just tell me what do i have to change.

Although,what would you recommend?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)