Bank problem
#1

I got an issue with bank system.

Here is the code
Код:
COMMAND:banklogin(playerid, params[])
{
    if( PlayerInfo[playerid][BankLogged] == 1 ) return SendClientMessage(playerid, COLOR_RED, "You're already logged in! "); 
    if( !fexist( BankPath(playerid) ) ) 
    {
        SendClientMessage(playerid, COLOR_RED, "You dont have a bank account yet, please use /registerbank to register it! ");
        return 0;
    }
    else if( fexist( BankPath(playerid) ) ) 
    {
        if( !strlen( params ) ) return SendClientMessage(playerid, COLOR_RED, "Usage: /banklogin [pin]"); 
        if( strlen( params ) < 4 || strlen( params ) > 4 ) return SendClientMessage(playerid, COLOR_RED, "A pin has 4 numbers, please use numbers only! "); 
        if( !isnumeric( params ) ) return SendClientMessage(playerid, COLOR_RED, "Numbers only please! "); 
        if( !strcmp( params, PlayerInfo[playerid][BankPassword], true ) ) 
        {
            PlayerInfo[playerid][BankLogged] = 1;
            SendClientMessage(playerid, COLOR_YELLOW, "Thank you for logging in to your bank account! ");
        }
        else
        {
            SendClientMessage(playerid, COLOR_RED, "Wrong pin! Please try again. ");
            return 0;
        }
        return 1;
    }
    return 1;
}

The command /createbank works fully and you can enter the password etc. It makes your bank account but the /banklogin wont work. For example:

/banklogin shows this SendClientMessage(playerid, COLOR_RED, "Usage: /banklogin [pin]");

But when you for example type your pin

Ex:

/banklogin 1234 it says "Unknown command"
Reply
#2

Anyone?
Reply
#3

Try returning 1. But does it work? Or it says unkown command AND doesn't work?
Reply
#4

Nope doesnt work.

It doesnt say Unknown command for the command itself. It just says unknown command when you type for example

/banklogin 1234

It basically says unknown command when you type the password
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)