OnPlayerText
#1

I wanna prevent non logged/who's logging players to use the chat, so i did in this way:

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(Player[playerid][IsLoggedIn] == false) return ShowPlayerFooter(playerid, "You need to be ~r~logged ~w~to use the chat.", 5000);
   
    if(Player[playerid][IsLoggingIn] == true) return ShowPlayerFooter(playerid, "You need to be ~r~logged ~w~to use the chat.", 5000);
   
    if(IsDead[playerid] == 1) return ShowPlayerFooter(playerid, "You are too tired to talk...", 5000);
   
    if(GetOnlySpacesText(text)) return 0;
   
    SendNearbyMessage(playerid, 20.0, -1, "{%06x}%s: "WHITE"%s", GetPlayerColor(playerid) >>> 8, ReturnName(playerid, 0), text);
    return 0;
}
Result is, i get the message "you need to be logged bla bla" but still sends the message in chat.
Reply


Messages In This Thread
OnPlayerText - by KinderClans - 21.10.2018, 19:14
Re: OnPlayerText - by UFF - 21.10.2018, 19:21
Re: OnPlayerText - by Calisthenics - 21.10.2018, 19:28
Re: OnPlayerText - by RogueDrifter - 21.10.2018, 21:55
Re: OnPlayerText - by Jefff - 21.10.2018, 22:23
Re: OnPlayerText - by KinderClans - 22.10.2018, 16:49

Forum Jump:


Users browsing this thread: 1 Guest(s)