/login cmd
#1

Hello
I wanted to ask if there is a way, like When player connects it automatically types a command for him?
like when he connects, he don't need to type /login, just when he connects the server auto types /login for the guy

PHP код:
public OnPlayerConnect(playerid)
{
    
SetPlayerColor(playerid0xA9A9A9FF);
    
OnPlayerCommandText(playerid"/login");
    return 
1;

tried doing like this
Reply
#2

use this
CallRemoteFunction
CallLocalFunction
Reply
#3

Код:
cmd_login(playerid,  "");
Reply
#4

Quote:
Originally Posted by ISmokezU
Посмотреть сообщение
Код:
cmd_login(playerid,  "");
he is not using zcmd
Reply
#5

Nah cant understand, can you give any example please?
Reply
#6

PHP код:
public OnPlayerConnect(playerid)
{
    
SetPlayerColor(playerid0xA9A9A9FF); 
    
CallRemoteFunction("OnPlayerCommandText""is"playerid"/login");
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if(!
strcmp(cmdtext"/login"true))
    {
        
//if(PlayerAlreadyLoggedIn(playerid)
            //return 1;
        
ShowPlayerDialog(playeriddialogidDIALOG_STYLE_PASSWORD"Login:""Enter your damn password son:, "Continue", "");
    }
    return 0;
}
//.. 
Reply
#7

and i think its better to use a timer !
Reply
#8

Why you are using commands to let someone login....simply show them the login dialog box and use it....
I suggest to update your login system...
Reply
#9

Try something like this

public OnPlayerConnect
{
if[playerregistered==0]
Return 1
{
(opens dialog for login...)
}
SendClientMessage(playerid,-1,"Welcome, you arent registered.");
(Dialog cases etc for register)
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)