Block commands and chat
#1

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
Reply
#2

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;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)