SA-MP Dedicated Server
----------------------
v0.3.7, (C)2005-2015 SA-MP Team
[23:56:49]
[23:56:49] Server Plugins
[23:56:49] --------------
[23:56:49] Loading plugin: crashdetect
[23:56:49] CrashDetect v4.15.1 is OK.
[23:56:49] Loaded.
[23:56:49] Loading plugin: streamer
[23:56:49]
*** Streamer Plugin v2.7.7 by Incognito loaded ***
[23:56:49] Loaded.
[23:56:49] Loaded 2 plugins.
[23:56:49]
[23:56:49] Filterscripts
[23:56:49] ---------------
[23:56:49] Loading filterscript 'GAC.amx'...
[23:56:49] [debug] Run time error 19: "File or function is not found"
[23:56:49] [debug] SSCANF_Init
[23:56:49] [debug] SSCANF_Join
[23:56:49] [debug] SSCANF_Leave
[23:56:49] Loaded 1 filterscripts.
[23:56:49] Loaded 3 vehicles from: vehicles/trains.txt
[23:56:49] Loaded 3 vehicles from: vehicles/pilots.txt
[23:56:49] Loaded 15 vehicles from: vehicles/lv_law.txt
[23:56:49] Loaded 39 vehicles from: vehicles/lv_airport.txt
[23:56:49] Loaded 255 vehicles from: vehicles/lv_gen.txt
[23:56:49] Loaded 38 vehicles from: vehicles/sf_law.txt
[23:56:49] Loaded 35 vehicles from: vehicles/sf_airport.txt
[23:56:49] Loaded 353 vehicles from: vehicles/sf_gen.txt
[23:56:49] Loaded 24 vehicles from: vehicles/ls_law.txt
[23:56:49] Loaded 37 vehicles from: vehicles/ls_airport.txt
[23:56:49] Loaded 98 vehicles from: vehicles/ls_gen_inner.txt
[23:56:49] Loaded 389 vehicles from: vehicles/ls_gen_outer.txt
[23:56:49] Loaded 71 vehicles from: vehicles/whetstone.txt
[23:56:49] Loaded 168 vehicles from: vehicles/bone.txt
[23:56:49] Loaded 61 vehicles from: vehicles/flint.txt
[23:56:49] Loaded 96 vehicles from: vehicles/tierra.txt
[23:56:49] Loaded 96 vehicles from: vehicles/red_county.txt
[23:56:49] Total vehicles from files: 1781
[23:56:49] [debug] Run time error 19: "File or function is not found"
[23:56:49] [debug] SSCANF_Init
[23:56:49] [debug] SSCANF_Join
[23:56:49] [debug] SSCANF_Leave
[23:56:49]
---------------------------------------
[23:56:49] Running Grand Larceny - by the SA-MP team
[23:56:49] ---------------------------------------
[23:56:49] Number of vehicle models: 173
[00:10:29] Number of vehicle models: 173
[00:10:54] [connection] 127.0.0.1:63777 requests connection cookie.
[00:10:55] Incoming connection: 127.0.0.1:63777 id: 0
[00:10:55] [join] Glossy42O has joined the server (0:127.0.0.1)
[00:10:55] [debug] Run time error 19: "File or function is not found"
[00:10:55] [debug] SSCANF_Init
[00:10:55] [debug] SSCANF_Join
[00:10:55] [debug] SSCANF_Leave
[00:11:01] [debug] Run time error 19: "File or function is not found"
[00:11:01] [debug] SSCANF_Init
[00:11:01] [debug] SSCANF_Join
[00:11:01] [debug] SSCANF_Leave
[00:11:02] [debug] Run time error 19: "File or function is not found"
[00:11:02] [debug] SSCANF_Init
[00:11:02] [debug] SSCANF_Join
[00:11:02] [debug] SSCANF_Leave
[00:11:02] [debug] Run time error 19: "File or function is not found"
[00:11:02] [debug] SSCANF_Init
[00:11:02] [debug] SSCANF_Join
[00:11:02] [debug] SSCANF_Leave
[00:11:03] [debug] Run time error 19: "File or function is not found"
[00:11:03] [debug] SSCANF_Init
[00:11:03] [debug] SSCANF_Join
[00:11:03] [debug] SSCANF_Leave
[00:11:04] [debug] Run time error 19: "File or function is not found"
[00:11:04] [debug] SSCANF_Init
[00:11:04] [debug] SSCANF_Join
[00:11:04] [debug] SSCANF_Leave
[00:11:06] [debug] Run time error 19: "File or function is not found"
[00:11:06] [debug] SSCANF_Init
[00:11:06] [debug] SSCANF_Join
[00:11:06] [debug] SSCANF_Leave
[00:11:07] [debug] Run time error 19: "File or function is not found"
[00:11:07] [debug] SSCANF_Init
[00:11:07] [debug] SSCANF_Join
[00:11:07] [debug] SSCANF_Leave
[00:11:07] [debug] Run time error 19: "File or function is not found"
[00:11:07] [debug] SSCANF_Init
[00:11:07] [debug] SSCANF_Join
[00:11:07] [debug] SSCANF_Leave
[00:11:07] [debug] Run time error 19: "File or function is not found"
[00:11:07] [debug] SSCANF_Init
[00:11:07] [debug] SSCANF_Join
[00:11:07] [debug] SSCANF_Leave
[00:11:08] [debug] Run time error 19: "File or function is not found"
[00:11:08] [debug] SSCANF_Init
[00:11:08] [debug] SSCANF_Join
[00:11:08] [debug] SSCANF_Leave
[00:11:08] [debug] Run time error 19: "File or function is not found"
[00:11:08] [debug] SSCANF_Init
[00:11:08] [debug] SSCANF_Join
[00:11:08] [debug] SSCANF_Leave
[00:11:09] [debug] Run time error 19: "File or function is not found"
[00:11:09] [debug] SSCANF_Init
[00:11:09] [debug] SSCANF_Join
[00:11:09] [debug] SSCANF_Leave
[00:11:11] [debug] Run time error 19: "File or function is not found"
[00:11:11] [debug] SSCANF_Init
[00:11:11] [debug] SSCANF_Join
[00:11:11] [debug] SSCANF_Leave
[00:11:12] [debug] Run time error 19: "File or function is not found"
[00:11:12] [debug] SSCANF_Init
[00:11:12] [debug] SSCANF_Join
[00:11:12] [debug] SSCANF_Leave
[00:11:12] [debug] Run time error 19: "File or function is not found"
[00:11:12] [debug] SSCANF_Init
[00:11:12] [debug] SSCANF_Join
[00:11:12] [debug] SSCANF_Leave
[00:11:13] [debug] Run time error 19: "File or function is not found"
[00:11:13] [debug] SSCANF_Init
[00:11:13] [debug] SSCANF_Join
[00:11:13] [debug] SSCANF_Leave
[00:11:15] [debug] Run time error 19: "File or function is not found"
[00:11:15] [debug] SSCANF_Init
[00:11:15] [debug] SSCANF_Join
[00:11:15] [debug] SSCANF_Leave
[00:11:16] [debug] Run time error 19: "File or function is not found"
[00:11:16] [debug] SSCANF_Init
[00:11:16] [debug] SSCANF_Join
[00:11:16] [debug] SSCANF_Leave
[00:11:26] [debug] Run time error 19: "File or function is not found"
[00:11:26] [debug] SSCANF_Init
[00:11:26] [debug] SSCANF_Join
[00:11:26] [debug] SSCANF_Leave
[00:11:26] [part] Glossy42O has left the server (0:1)
new SpamCount[MAX_PLAYERS];
new ChatSpamTime[MAX_PLAYERS][3];
new Muted[MAX_PLAYERS];
#define AutomaticUnmuteTime 5
public OnGameModeInit( )
{
print("Gamemode started.");
return 1;
}
public OnPlayerText(playerid, text[])
{
if(Muted[playerid] == 1)
{
SendClientMessage(playerid, 0xFF0000FF, "You're muted. So shut the fuck up.");
return 0;
}
return 1;
}
public OnPlayerConnect(playerid)
{
SpamCount[playerid]=0;
Muted[playerid]=0;
return 1;
}
stock AntiSpam(playerid)
{
SpamCount[playerid]++;
switch (SpamCount[playerid])
{
case 1:
{
ChatSpamTime[playerid][0]=gettime();
}
case 2:
{
if((gettime()-ChatSpamTime[playerid][0])<4)
{
SendClientMessage(playerid,0xFF0000FF,"* You have received a warning. (SPAM (1/3)");
ChatSpamTime[playerid][1]=gettime();
}
else SpamCount[playerid]=0;
}
case 3:
{
if((gettime()-ChatSpamTime[playerid][1])<4)
{
SendClientMessage(playerid,0xFF0000FF,"* You have received a warning. (SPAM (2/3)");
ChatSpamTime[playerid][2]=gettime();
}
else SpamCount[playerid]=0;
}
case 4..50:
{
new string[128],name[24];
GetPlayerName(playerid,name,24);
if((gettime()-ChatSpamTime[playerid][2])<4)
{
format(string,sizeof(string),"%s Has been muted for spamming bullshit - 5 minutes",name);
SendClientMessageToAll(0xFF0000FF,string);
SendClientMessage(playerid,0xFF0000FF,"* You have received a final warning. (SPAM (3/3)");
Muted[playerid]=1;
SetTimerEx("AutoUnMute",AutoUnmuteTime*60000,false,"i",playerid);
Kick(playerid);
}
}
}
return 1;
}
forward AutoUnMute(pID);
public AutoUnMute(pID)
{
Muted[pID] = 0;
SpamCount[pID]=0;
GameTextForPlayer(pID, "Unmuted", 2000,5);
return 1;
}
sorry for double posting but it was the script problem. i fixed everything but, the mute won't work
PHP код:
|
#include <a_samp> new SpamCount[MAX_PLAYERS]; new ChatSpamTime[MAX_PLAYERS][3]; new Muted[MAX_PLAYERS]; #define AutomaticUnmuteTime 5 public OnGameModeInit( ) { print("Gamemode started."); return 1; } public OnPlayerText(playerid, text[]) { if(Muted[playerid] == 1) { SendClientMessage(playerid, 0xFF0000FF, "You're muted. So shut the fuck up."); return 0; } return 1; } public OnPlayerConnect(playerid) { SpamCount[playerid]=0; Muted[playerid]=0; return 1; } stock AntiSpam(playerid) { SpamCount[playerid]++; switch (SpamCount[playerid]) { case 1: { ChatSpamTime[playerid][0]=gettime(); } case 2: { if((gettime()-ChatSpamTime[playerid][0])<4) { SendClientMessage(playerid,0xFF0000FF,"* You have received a warning. (SPAM (1/3)"); ChatSpamTime[playerid][1]=gettime(); } else SpamCount[playerid]=0; } case 3: { if((gettime()-ChatSpamTime[playerid][1])<4) { SendClientMessage(playerid,0xFF0000FF,"* You have received a warning. (SPAM (2/3)"); ChatSpamTime[playerid][2]=gettime(); } else SpamCount[playerid]=0; } case 4..50: { new string[128],name[24]; GetPlayerName(playerid,name,24); if((gettime()-ChatSpamTime[playerid][2])<4) { format(string,sizeof(string),"%s Has been muted for spamming bullshit - 5 minutes",name); SendClientMessageToAll(0xFF0000FF,string); SendClientMessage(playerid,0xFF0000FF,"* You have received a final warning. (SPAM (3/3)"); Muted[playerid]=1; SetTimerEx("AutoUnMute",AutoUnmuteTime*60000,false,"i",playerid); Kick(playerid); } } } return 1; } forward AutoUnMute(pID); public AutoUnMute(pID) { Muted[pID] = 0; SpamCount[pID]=0; GameTextForPlayer(pID, "Unmuted", 2000,5); return 1; }