Server Crashes
#3

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
You have some bug in your OnPlayerText then. Maybe an array index out of bounds or so. Go through it and try to find anything unusual.
pawn Код:
public OnPlayerText(playerid, text[])
{
    ServerInfo[TotText] ++;
    dini_IntSet(SFile, "MessagesSent", ServerInfo[TotText]);
    new playrname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playrname, sizeof(playrname));
    new chat[256], second, minute, hour;
    gettime(hour,minute,second);
    format(chat, sizeof(chat), "\n[%d:%d:%d]%s: %s", hour, minute, second, playrname, text);
    ChatLog(chat);
    SpamStrings[playerid] ++;
    if(SpamStrings[playerid] >= MAX_SPAM)
    {
        switch (Lang[playerid])
        {
            case 0:
            {
                SendClientMessage(playerid, COLOR_BRIGHTRED, "TEXT LIMIT EXCEEDED - Please wait before talking again !");
                return 0;
            }
            case 1:
            {
            }
        }
    }
    if(Muted[playerid] == 1)
    {
        switch (Lang[playerid])
        {
            case 0:
            {
                SendClientMessage(playerid, COLOR_BRIGHTRED, "You can't talk, you are Muted !");
                return 0;
            }


        }
        SendClientMessage(playerid, COLOR_BRIGHTRED, "You are Muted !");
        return 0;
    }
    if(ServerInfo[ChatLocked] == 1 && PlayerInfo[playerid][pAdmin] < 1)
    {
        switch (Lang[playerid])
        {
            case 0:
            {
                SendClientMessage(playerid, COLOR_BRIGHTRED, "You can't talk, the chat is Locked !");
                return 0;
            }

        }
    }
    if(strcmp(text, "login", true,5) == 0)
    {
        return 0;
    }
    return 1;
}
Can you see any? :-S
Reply


Messages In This Thread
Server Crashes - by ollis93 - 12.11.2010, 14:08
Re: Server Crashes - by Mauzen - 12.11.2010, 14:43
Re: Server Crashes - by ollis93 - 12.11.2010, 14:53

Forum Jump:


Users browsing this thread: 1 Guest(s)