Block commands and chat - 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)
+--- Thread: Block commands and chat (
/showthread.php?tid=336204)
Block commands and chat -
mmm560 - 21.04.2012
Hey,

First of all - I'm sorry about my English, I've started to learn English just this year.
So I have an users system, and I want to do this:
If the player didn't connect, then he won't be able to write a message or do a command.
I don't know how to do it, I tried many things and nothing works.
What checks if the player is connect:
PlayerInfo[playerid][LoggedIn]
0 - the player isn't connect.
1 - the player is connect.
Thank you very much! :P
Re: Block commands and chat -
Roel - 21.04.2012
Put this in OnPlayerCommand:
pawn Code:
if(!PlayerInfo[playerid][LoggedIn])
{
return SendClientMessage(playerid,White,"You are not allowed to use any commands when you are not spawned!"), 0;
}
And put this on OnPlayerText
pawn Code:
if(!PlayerInfo[playerid][LoggedIn])
{
return SendClientMessage(playerid,White,"You are not allowed to write anything when you are not spawned!"), 0;
}