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;
}