Advertisement
Guest User

[FS]Reloginho SA:MP

a guest
Jul 17th, 2014
1,067
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.85 KB | None | 0 0
  1. /*=========================[CRIADOR PORCHEFAO_UNKNOWN]==========================
  2.   =============================[RELOGINHO SA:MP]================================
  3.   =========================[CRIADOR PORCHEFAO_UNKNOWN]==========================
  4. */
  5. //Lembre-se que é apenas para iniciante que querem aprendeu um pouco XD.
  6. //Vim postar em nome da SSGAMES
  7. #include <a_samp>
  8.  
  9. // ---------- new ---------- //
  10. new Text:HoraDoServidorTXT;
  11. new HoraDoServidor = 12;
  12. // ---------- new ---------- //
  13.  
  14. public OnFilterScriptInit()
  15. {
  16.     print("\n[FS]Reloginho  by:Chefao_Unknown\n");
  17.     return 1;
  18. }
  19.  
  20.  
  21. public OnGameModeInit()
  22. {
  23. SetWorldTime(HoraDoServidor);
  24. SetTimer("CicloDeTempo", 60000, true);
  25.  
  26.  
  27. HoraDoServidorTXT = TextDrawCreate(498.000000, 13.000000, "12:00");
  28. TextDrawBackgroundColor(HoraDoServidorTXT, 255);
  29. TextDrawFont(HoraDoServidorTXT, 1);
  30. TextDrawLetterSize(HoraDoServidorTXT, 0.440000, 1.100000);
  31. TextDrawColor(HoraDoServidorTXT, -1);
  32. TextDrawSetOutline(HoraDoServidorTXT, 1);
  33. TextDrawSetProportional(HoraDoServidorTXT, 1);
  34. return 1;
  35. }
  36.  
  37. public OnGameModeExit()
  38. {
  39.   TextDrawDestroy(HoraDoServidorTXT); //Exclui o textdrawi
  40.   return 1;
  41. }
  42.  
  43. public OnPlayerSpawn(playerid)
  44. {
  45. TextDrawShowForPlayer(playerid, HoraDoServidorTXT);
  46. return 1;
  47. }
  48.  
  49. forward CicloDeTempo(playerid);
  50. public CicloDeTempo(playerid)
  51. {
  52. HoraDoServidor++;
  53. SetWorldTime(HoraDoServidor);
  54.  
  55. new string[48];
  56. format(string, sizeof(string), "%d:00", HoraDoServidor);
  57. TextDrawSetString(HoraDoServidorTXT,string);
  58.  
  59. if(HoraDoServidor == 23)//se servetime variável é a 23 que coloca a variável a 0
  60. {
  61. HoraDoServidor = 0;
  62. }
  63. return 1;
  64. }
  65. /*=========================[CRIADOR PORCHEFAO_UNKNOWN]==========================
  66.   =============================[RELOGINHO SA:MP]================================
  67.   =========================[CRIADOR PORCHEFAO_UNKNOWN]==========================
  68. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement