L Admin, Disable chat before logging in [HELP] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: L Admin, Disable chat before logging in [HELP] (
/showthread.php?tid=153507)
L Admin, Disable chat before logging in [HELP] -
mattym - 09.06.2010
Im using
L Admin and im wondering if someone knows how to make that the chat is disabled before you are logged in...
Re: L Admin, Disable chat before logging in [HELP] -
nakashor - 09.06.2010
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;
}
Re: L Admin, Disable chat before logging in [HELP] -
mattym - 09.06.2010
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;
Re: L Admin, Disable chat before logging in [HELP] -
Naxix - 09.06.2010
change
Код:
if(PlayerInfo[playerid][LoggedIn] != 1)
to
Код:
if(PlayerInfo[playerid][LoggedIn] != 1)
Re: L Admin, Disable chat before logging in [HELP] -
mattym - 09.06.2010
Quote:
Originally Posted by Naxix
change
Код:
if(PlayerInfo[playerid][LoggedIn] != 1)
to
Код:
if(PlayerInfo[playerid][LoggedIn] != 1)
|
Ehh... Both codes is same.
Re: L Admin, Disable chat before logging in [HELP] -
DJDhan - 09.06.2010
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.
Re: L Admin, Disable chat before logging in [HELP] -
mattym - 09.06.2010
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...
Re: L Admin, Disable chat before logging in [HELP] -
DJDhan - 09.06.2010
That's strange, I have edited the code. Are you sure those are the lines with the error?
Re: L Admin, Disable chat before logging in [HELP] -
mattym - 09.06.2010
Quote:
Originally Posted by DJDhan
That's strange, I have edited the code. Are you sure those are the lines with the error?
|
Yes...
Re: L Admin, Disable chat before logging in [HELP] -
DJDhan - 09.06.2010
I tried this same code in my script and it worked.

Must be something above this code I gave.