Problem
#1

So i got a problem with any clock filterscript , i try to put clocks ( around ten ) and nothing works , i add it on filterscript folder and filterscript line in server.cfg
I loaded it in the game , restart the server but nothing , pleaze help.
+rep who helps me
Reply
#2

Someone pleaze ??
Reply
#3

write some more info ,and show your script
Reply
#4

http://pastebin.com/zYPRahpf
This is the clock
Reply
#5

I didn't read the full code yet, but FYI:
pawn Код:
format(str, sizeof str, "%2d", someinteger)
Makes the number to be always 2 chars wide, so it will add preceding 0 if < 10.

Also - OnFilterScriptInit is for filterscripts, OnGameModeInit is for gamemodes
Reply
#6

I try it , but still not working , the problem is : Any clock i put , doesnt work..
Reply
#7

Anyone pleaze ?
Reply
#8

pawn Код:
public settime(playerid)
//Change to
public settime()
You aren't passing the arugment with timer, so why keep it there? Little by little we will find out what's wrong.

`e: Ok, big chunk

pawn Код:
#include <a_samp>
#include <time>
#define FILTERSCRIPT
forward settime(playerid);
new Text:Time2, Text:Date;

public settime()
{
    new string[256],year,month,day,hours,minutes,seconds;
    getdate(year, month, day), gettime(hours, minutes, seconds);
    format(string, sizeof string, "~r~%2d/~y~%2d/~b~%d", day, month, year);
    TextDrawSetString(Date, string);
    format(string, sizeof string, "~r~%2d:~y~%2d:~b~%2d", hours, minutes, seconds);
    TextDrawSetString(Time2, string);
}
public OnPlayerSpawn(playerid)
{
    TextDrawShowForPlayer(playerid, Time2);
    TextDrawShowForPlayer(playerid, Date);
    return 1;
}
public OnGameModeInit()
{
    Date = TextDrawCreate(547.000000,11.000000,"--");
    TextDrawFont(Date,3);
    TextDrawLetterSize(Date,0.399999,1.600000);
    TextDrawColor(Date,0xffffffff);
    Time2 = TextDrawCreate(547.000000,28.000000,"--");
    TextDrawFont(Time2,3);
    TextDrawLetterSize(Time2,0.399999,1.600000);
    TextDrawColor(Time2,0xffffffff);
    SetTimer("settime",1000,true);
    return 1;
}
Reply
#9

Ok i will try as you say .
Edit : Ty so much :X it worked !!

1 More question , the date is a bit in the Right part , how i can move it a bit to the left?
Reply
#10

Quote:
Originally Posted by yLuSsSIoN
Посмотреть сообщение
Ok i will try as you say .
Edit : Ty so much :X it worked !!

1 More question , the date is a bit in the Right part , how i can move it a bit to the left?
Код:
TextDrawCreate(547.000000,11.000000,"--");
Change 547 to a lower value to make it left,
Change 547 to a higher to make it right,
Change 11 to lower to make it up,
Change 11 to higher to make it down.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)