12.11.2010, 14:08
(
Последний раз редактировалось ollis93; 12.11.2010 в 14:53.
)
Hi,
Everytime I write something in my server
(T- blabla - Enter) my server crashes.
It just stops/exits, without any error or something.
Any idea? /commands works.
Everytime I write something in my server
(T- blabla - Enter) my server crashes.
It just stops/exits, without any error or something.
Any idea? /commands works.
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;
}