[HELP] I Can't load a Filterscript! -
DJ-CJ89 - 11.01.2011
Hello. I have a problem with loading a filterscript.
The sever console echos this error:
Loading filterscript 'gl_realtime.amx'...
Loading filterscript '~<L.amx'...
Unable to load filter script 'Дь!!.amx'
Please help me.
Here is the code: (it compiles without errors by the way!)
Код:
#include <a_samp>
#include <colors>
#pragma tabsize 0
#define FILTERSCRIPT
#define Monday 1
#define Tuesday 2
#define Wednesday 3
#define Thursday 4
#define Friday 5
#define Saturday 6
#define Sunday 7
//--------------------------------------------------
new Text:txtTimeDisp;
new Text:Day;
new hour, minute;
new Daycount = 1;
new timestr[32];
new timemsg[32];
forward UpdateTime();
//--------------------------------------------------
public UpdateTime()
{
if(minute < 59)
{
minute += 01;
}
else if(minute == 59 && hour < 23)
{
hour += 01;
minute = 00;
format(timemsg,sizeof(timemsg),"Time is now %d o'clock",hour);
SendClientMessageToAll(orange,timemsg);
}
else
{
if(Daycount < 7)
{
Daycount++;
}
if(Daycount == 7)
{
Daycount = 1;
}
switch(Daycount)
{
case 1: TextDrawSetString(Day,"Monday");
case 2: TextDrawSetString(Day,"Tuesday");
case 3: TextDrawSetString(Day,"Wednesday");
case 4: TextDrawSetString(Day,"Thursday");
case 5: TextDrawSetString(Day,"Friday");
case 6: TextDrawSetString(Day,"Saturday");
case 7: TextDrawSetString(Day,"Sunday");
default: TextDrawSetString(Day,"Monday");
}
hour = 00;
minute = 00;
format(timemsg,sizeof(timemsg),"Time is now 0%d:0%d",hour,minute);
SendClientMessageToAll(orange,timemsg);
}
format(timestr,32,"~g~%02d:%02d",hour,minute);
TextDrawSetString(txtTimeDisp,timestr);
SetWorldTime(hour);
new x=0;
while(x!=MAX_PLAYERS) {
if(IsPlayerConnected(x) && GetPlayerState(x) != PLAYER_STATE_NONE) {
SetPlayerTime(x,hour,minute);
}
x++;
}
new cstr[24];
switch(Daycount)
{
case 1:
{
format(cstr,sizeof(cstr),"worldtime Monday %d:%d",hour,minute);
SendRconCommand(cstr);
}
case 2:
{
format(cstr,sizeof(cstr),"worldtime Tuesday %d:%d",hour,minute);
SendRconCommand(cstr);
}
case 3:
{
format(cstr,sizeof(cstr),"worldtime Wednesday %d:%d",hour,minute);
SendRconCommand(cstr);
}
case 4:
{
format(cstr,sizeof(cstr),"worldtime Thursday %d:%d",hour,minute);
SendRconCommand(cstr);
}
case 5:
{
format(cstr,sizeof(cstr),"worldtime Friday %d:%d",hour,minute);
SendRconCommand(cstr);
}
case 6:
{
format(cstr,sizeof(cstr),"worldtime Saturday %d:%d",hour,minute);
SendRconCommand(cstr);
}
case 7:
{
format(cstr,sizeof(cstr),"worldtime Sunday %d:%d",hour,minute);
SendRconCommand(cstr);
}
}
}
//--------------------------------------------------
public OnFilterScriptInit()
{
// Init our text display (Time)
txtTimeDisp = TextDrawCreate(605.0,25.0,"00:00");
TextDrawUseBox(txtTimeDisp, 0);
TextDrawFont(txtTimeDisp, 3);
TextDrawSetShadow(txtTimeDisp,0); // no shadow
TextDrawSetOutline(txtTimeDisp,2); // thickness 1
TextDrawBackgroundColor(txtTimeDisp,0x000000FF);
TextDrawColor(txtTimeDisp,0xFFFFFFFF);
TextDrawAlignment(txtTimeDisp,3);
TextDrawLetterSize(txtTimeDisp,0.5,1.5);
// Day
Day = TextDrawCreate(552.000000,8.000000,"Monday");
TextDrawAlignment(Day,0);
TextDrawBackgroundColor(Day,0x000000ff);
TextDrawFont(Day,3);
TextDrawLetterSize(Day,0.399999,1.000000);
TextDrawColor(Day,0xffffffcc);
TextDrawSetOutline(Day,1);
TextDrawSetProportional(Day,1);
TextDrawSetShadow(Day,1);
UpdateTime();
SetTimer("UpdateTime",1000,1);
SetTimer("ChangeWeather",10*60000,1);
return 1;
}
//--------------------------------------------------
public OnPlayerSpawn(playerid)
{
TextDrawShowForPlayer(playerid,txtTimeDisp);
TextDrawShowForPlayer(playerid,Day);
SetPlayerTime(playerid,hour,minute);
return 1;
}
//--------------------------------------------------
public OnPlayerDeath(playerid, killerid, reason)
{
TextDrawHideForPlayer(playerid,txtTimeDisp);
TextDrawHideForPlayer(playerid,Day);
return 1;
}
//--------------------------------------------------
public OnPlayerConnect(playerid)
{
SetPlayerTime(playerid,hour,minute);
return 1;
}
public OnPlayerDisconnect(playerid,reason)
{
TextDrawHideForPlayer(playerid,txtTimeDisp);
TextDrawHideForPlayer(playerid,Day);
return 1;
}
//--------------------------------------------------
forward ChangeWeather();
public ChangeWeather()
{
SetWeather(random(19));
}
Re: [HELP] I Can't load a Filterscript! -
iMonk3y - 11.01.2011
try to rename Дь!!.pwn to something else, and use the classical latin alphabet. then compile and try again.
AW: [HELP] I Can't load a Filterscript! -
DJ-CJ89 - 11.01.2011
I dont even have a filterscript with this name! The only filterscript i use is this gl_realtime
Re: [HELP] I Can't load a Filterscript! -
iMonk3y - 11.01.2011
hmmmm.. are you sure? show us your server config file.
AW: [HELP] I Can't load a Filterscript! -
DJ-CJ89 - 11.01.2011
echo Executing Server Config...
lanmode 0
rcon_password **** <<<< censored!
maxplayers 125
port 7777
hostname Cops and Robbers
mapname San Andreas
gamemode0 CopsAndRobbers
filterscripts gl_realtime
plugins irc GeoIP_Plugin streamer
announce 1
query 1
weburl
www.sa-mp.com
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 3
AW: [HELP] I Can't load a Filterscript! -
DJ-CJ89 - 11.01.2011
if someone could try this filterscript for me here is the include for it.
save as colors.inc
Код:
// Colors
#define rot 0xFF0000FF
#define gelb 0xFFCC33FF
#define dunkelgelb 0xFFFF00FF
#define gruen 0x33FF00FF
#define blau 0x0033FFFF
#define hellblau 0x00CCFFFF
#define lila 0x990099FF
#define orange 0xFF9900FF
#define grau 0x999999FF
#define WeiЯ 0xFFFFFFDD
#define unsichtbar 0xFFFFFF00
#define ADMINFS_MESSAGE_COLOR 0xFF444499
#define PM_INCOMING_COLOR 0xFFFF22AA
#define PM_OUTGOING_COLOR 0xFFCC2299
Re: [HELP] I Can't load a Filterscript! -
iMonk3y - 11.01.2011
Here are my suggestions:
1. Change the gamemode and see if it has anything to do with it
2. In server config cut the
plugins -line and paste if above
filterscripts
well... I'm gonna try it
edit: that's weird, I got the same error..
AW: [HELP] I Can't load a Filterscript! -
DJ-CJ89 - 11.01.2011
I tried all that and it is still not working o.O
Is this maybe an sa-mp 0.3c related bug?
Re: [HELP] I Can't load a Filterscript! -
iMonk3y - 11.01.2011
you know what... I changed
OnFilterscriptInit to
OnGamemodeInit and the error miraculously disappeared.
AW: [HELP] I Can't load a Filterscript! -
DJ-CJ89 - 11.01.2011
ah k thx then i just implement the code to my gm.
But it would be good if someone reports that to the samp developers.