Guest User

Clock 3D

a guest
Oct 26th, 2013
813
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. /*
  2. +++++++ ++++++ +++ +++ ++ ++
  3. +++ + ++ + + + + + +
  4. ++ ++++++ +++ +++ + +
  5. */
  6.  
  7.  
  8. #include <a_samp>
  9. #define FILTERSCRIPT
  10. new Text3D:ceas;
  11. new string[512],hours,minutes,seconds;
  12. forward settime(playerid);
  13.  
  14. public OnFilterScriptInit()
  15. {
  16. SetTimer("settime",1000,true);
  17. Update3DTextLabelText(ceas, 0xffffffff,string);
  18. return 1;
  19. }
  20.  
  21. public OnFilterScriptExit()
  22. {
  23. Update3DTextLabelText(ceas, 0xffffffff,string);
  24. return 1;
  25. }
  26. public OnPlayerConnect(playerid)
  27. {
  28. Update3DTextLabelText(ceas, 0xffffffff,string);
  29. return 1;
  30. }
  31. public OnPlayerSpawn(playerid)
  32. {
  33. Update3DTextLabelText(ceas, 0xffffffff,string);
  34. return 1;
  35. }
  36.  
  37. public OnPlayerDisconnect(playerid, reason)
  38. {
  39. Update3DTextLabelText(ceas, 0xffffffff,string);
  40. return 1;
  41. }
  42. public OnPlayerUpdate(playerid)
  43. {
  44. Update3DTextLabelText(ceas, 0xffffffff,string);
  45. return 1;
  46. }
  47. public settime(playerid)
  48. {
  49. format(string, sizeof string,"{00C0FF}Clock{FFAF00}By {F81414}Teddy\n{00C0FF}%s%d {F300FF}: {FFAF00}%s%d {F300FF}: {F81414}%s%d", (hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds);
  50. gettime(hours, minutes, seconds);
  51. ceas = Create3DTextLabel(string,0xffffffff,895.0890, -1101.9412, 35.5424,200.0,0);
  52. Update3DTextLabelText(ceas, 0xffffffff,string);
  53. }
Advertisement
Add Comment
Please, Sign In to add comment