Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new Text:Time;
- forward settime(playerid);
- public OnFilterScriptInit()
- {
- SetTimer("settime",1000,true);
- Time = TextDrawCreate(547.000000,28.000000,"--");
- TextDrawFont(Time,3);
- TextDrawLetterSize(Time,0.399999,1.600000);
- TextDrawColor(Time,0xffffffff);
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- TextDrawShowForPlayer(playerid, Time);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- TextDrawHideForPlayer(playerid, Time);
- return 1;
- }
- public settime(playerid)
- {
- new string[256],hours,minutes,seconds;
- gettime(hours, minutes, seconds);
- format(string, sizeof string, "%s%d:%s%d:%s%d", (hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds);
- TextDrawSetString(Time, string);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement