17.03.2013, 07:56
Hi
I'm trying to create a code that won't allow the player to write text or commands until he is logged in, but it doesn't seem to work so well.
I'd really appreciate it if someone could help me
I use YCMD for the commands, that's why they aren't in the "OnPlayerCommandText" public.
Thank you.
I'm trying to create a code that won't allow the player to write text or commands until he is logged in, but it doesn't seem to work so well.
I'd really appreciate it if someone could help me
Код:
public OnPlayerText(playerid, text[]) { if (pInfo[playerid][pLogged] == false) { SendClientMessage(playerid, COLOR_RED, "You must be logged in before writing!"); return 0; } return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (pInfo[playerid][pLogged] == false) { SendClientMessage(playerid, COLOR_RED, "You must be logged in before writing!"); return 1; } return 0; }
Thank you.