You cant chat until u login.
#1

Hai there,i need little help with the chat.

I use dini as saving system,and i need to do a thing:

The player cant chat until he /register,and if is already registered,until he /login.

Thanks.
Reply
#2

You will need to set a variable when a player connects then when he loggers in undo the variable to allow him to talk.
Reply
#3

mmm any help about settings this variable?
Reply
#4

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
mmm any help about settings this variable?
pawn Код:
Under the Onplayertext callback:

if(IsPlayerLogged[payerid] == 0) return 0; // put this line at the top of that callback.

After login success:
IsPlayerLogged[payerid] = 1;

Onplayerdc:

IsPlayerLogged[payerid] = 0;
Reply
#5

And to add the messages like:

"U need to be registered to chat,use /register"

and if not logged in:

"Please login to chat."

Thanks.
Reply
#6

pawn Код:
Under the Onplayertext callback:

if(IsPlayerLogged[payerid] == 0)
{
     SCM // write the scm here
     return 0; // put this line at the top of that callback.
}

After login success:
IsPlayerLogged[payerid] = 1;

Onplayerdc:

IsPlayerLogged[payerid] = 0;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)