Cant Speak if Not Logged In HELP
#1

This is performed in almost every server in SAMP. Im also looking to input this into my server. Only problem is that I have no clue on how to make this code. Could someone refer me to a website that will help me or just be kind enough to just help me now? Thanks

- I am Experienced! Even I need help sometimes...
Reply
#2

pawn Код:
new pLogged[MAX_PLAYERS];
On successful login do:

pawn Код:
pLogged[playerid] = 1;
Then do this:

pawn Код:
public OnPlayerText(playerid, text[])
{
    new string[128], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    if(pLogged == 1)
    {
        format(string, sizeof(string), "%s says %s", name, text);
        SendClientMessageToAll(-1, string);
    }
    else
    {
             SendClientMessage(playerid, -1, "You must be logged in to talk!");
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)