L Admin, Disable chat before logging in [HELP]
#1

Im using L Admin and im wondering if someone knows how to make that the chat is disabled before you are logged in...
Reply
#2

Quote:
Originally Posted by mattym
Im using L Admin and im wondering if someone knows how to make that the chat is disabled before you are logged in...
pawn Код:
public OnPlayerText(playerid, text[])
pawn Код:
if(PlayerInfo[playerid][LoggedIn] != 1)
    {
      SendClientMessageToAll(grey,"You are not logged in, you can't use the chat!");
      return 0;
    }
Reply
#3

Quote:
Originally Posted by -Teddy-
Quote:
Originally Posted by mattym
Im using L Admin and im wondering if someone knows how to make that the chat is disabled before you are logged in...
pawn Код:
public OnPlayerText(playerid, text[])
pawn Код:
if(PlayerInfo[playerid][LoggedIn] != 1)
    {
      SendClientMessageToAll(grey,"You are not logged in, you can't use the chat!");
      return 0;
    }
Код:
error 010: invalid function or declaration
if(PlayerInfo[playerid][LoggedIn] != 1) and return 0;
Reply
#4

change

Код:
if(PlayerInfo[playerid][LoggedIn] != 1)
to

Код:
if(PlayerInfo[playerid][LoggedIn] != 1)
Reply
#5

Quote:
Originally Posted by Naxix
change

Код:
if(PlayerInfo[playerid][LoggedIn] != 1)
to

Код:
if(PlayerInfo[playerid][LoggedIn] != 1)
Ehh... Both codes is same.
Reply
#6

Quote:
Originally Posted by Naxix
change

Код:
if(PlayerInfo[playerid][LoggedIn] != 1)
to

Код:
if(PlayerInfo[playerid][LoggedIn] != 1)
What is the difference?


here you go:
Код:
public OnPlayerText(playerid, text[])
{
if(PlayerInfo[playerid][LoggedIn] == 0)
{
  SendClientMessage(playerid,grey,"You are not logged in, you can't use the chat!");
  return 0;
}
return 1;
}
EDIT::::I HAVE EDITED THE CODE.
Reply
#7

Quote:
Originally Posted by DJDhan

here you go:
Quote:

if(PlayerInfo[playerid][LoggedIn] == 0) <-error 010: invalid function or declaration
{
SendClientMessageToAll(grey,"You are not logged in, you can't use the chat!");
return 0; <- error 010: invalid function or declaration
}
return 1; <- error 010: invalid function or declaration
}

Still getting these errors...
Reply
#8

That's strange, I have edited the code. Are you sure those are the lines with the error?
Reply
#9

Quote:
Originally Posted by DJDhan
That's strange, I have edited the code. Are you sure those are the lines with the error?
Yes...
Reply
#10

I tried this same code in my script and it worked. Must be something above this code I gave.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)