11.01.2011, 16:54
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!)
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));
}



