Unknown Command problem.
#1

Hello everyone. I have made the following command:

Код:
COMMAND:login(playerid,params[])
{
    if(isnull(params)) return NoSuccess(playerid,"Usage: /login <password>");
    format(str,256,"%s.txt",pname[playerid]);
    if(!dini_Exists(str)) return NoSuccess(playerid,"[Notification] You did not Register yet. Please use /register <password> to Register a new account!");
    if(Login[playerid] == 1) return NoSuccess(playerid,"[Notification] You have already been logged in!");
    if(strcmp(params,ReturnPasswort(pname[playerid]),false)) return NoSuccess(playerid,"[Notification] You have     entered an invalid password!");
    
    LoadPlayer(playerid);
    Login[playerid] = 1;
    SendClientMessage(playerid,neongruen,"[Notification] You have successfully been logged in!");
    return 1;
}
But, when i try using /login OR /login <my password>, it says "Unknown Command". Is it because of my command,
Or is it because of something else?

Please help me. Thanks.

Greetings, CrazyManiac.
Reply
#2

I don't see any problem there, you use zcmd there, remove the public OnPlayerCommandText script in your script, compile then try again.
Reply
#3

It doesn't has one. Also, this is my OnPlayerCommandPerformed.

Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
	if(success)
	{
	    printf("[COMMAND] Command %s from %s was successfully loaded.",cmdtext,pname[playerid]);
	}
	else
	{
	    printf("[CMD] Command %s from %s was »not« successfully loaded.",cmdtext,pname);

	    format(str,144,"[Notification] That Command does not exists. Please re-try, or use /help.",cmdtext);
	    NoSuccess(playerid,str);
	}
	return 1;
}
Can someone help me out?
Reply
#4

Quote:
Originally Posted by CrazyManiac
Посмотреть сообщение
Hello everyone. I have made the following command:

Код:
COMMAND:login(playerid,params[])
{
    if(isnull(params)) return NoSuccess(playerid,"Usage: /login <password>");
    format(str,256,"%s.txt",pname[playerid]);
    if(!dini_Exists(str)) return NoSuccess(playerid,"[Notification] You did not Register yet. Please use /register <password> to Register a new account!");
    if(Login[playerid] == 1) return NoSuccess(playerid,"[Notification] You have already been logged in!");
    if(strcmp(params,ReturnPasswort(pname[playerid]),false)) return NoSuccess(playerid,"[Notification] You have     entered an invalid password!");
    
    LoadPlayer(playerid);
    Login[playerid] = 1;
    SendClientMessage(playerid,neongruen,"[Notification] You have successfully been logged in!");
    return 1;
}
But, when i try using /login OR /login <my password>, it says "Unknown Command". Is it because of my command,
Or is it because of something else?

Please help me. Thanks.

Greetings, CrazyManiac.
EDIT:

When i type /Login, it says "Usage: /Login <password>". But when i type /login <my pass>, it says the command does not exists.
Reply
#5

Anyone?...Bump...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)