hlmod.hu
https://hlmod.hu/

Nyereményjáték
https://hlmod.hu/viewtopic.php?f=9&t=9678
Oldal: 1 / 1

Szerző:  pixxa112 [2013.07.23. 21:47 ]
Hozzászólás témája:  Nyereményjáték

Hali.

Valaki ezt ki tudná javítani, hogy amit a chatbe ír azt ne így írja:
[Nyeremenyjatek] Meg -19 nap van hatra a nyeremenyjatekig.

Vagyis ne legyen ott a "-" jel.
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <colorchat>
  4. #include <dhudmessage>
  5.  
  6. #define fTask 15.0
  7.  
  8. new const Autor[] = "Chatto."
  9. new const Name[] = "Notifications of festivities"
  10. new const Vers[] = " 1.0 "
  11.  
  12. new const szHolydays[ ][ ] =
  13. {
  14. "4",
  15. "18",
  16. "1",
  17. "15",
  18. "29",
  19. "6",
  20. "20"
  21. }
  22.  
  23. new const szMonths[ ][ ] =
  24. {
  25. "August",
  26. "September",
  27. "October"
  28. }
  29.  
  30. new gMaxPlayers;
  31.  
  32. public plugin_init()
  33. {
  34. register_plugin(Name, Vers, Autor)
  35. register_logevent("RoundStart", 2, "1=Round_Start")
  36. gMaxPlayers = get_maxplayers();
  37. }
  38. public RoundStart( )
  39. {
  40. for( new i = 1; i < gMaxPlayers; i++ )
  41. {
  42. set_task( fTask, "Recording", i )
  43. }
  44. }
  45. public Recording( id )
  46. {
  47. new Month[33], Day[12];
  48. get_time( "%B", Month, charsmax(Month) )
  49. get_time( "%d", Day, charsmax(Day) )
  50.  
  51. new Christmas = str_to_num(szHolydays[ 0 ]) - str_to_num(Day)
  52. new Halloween = str_to_num(szHolydays[ 3 ]) - str_to_num(Day)
  53. new LastDay_ofAge = str_to_num(szHolydays[ 1 ]) - str_to_num(Day)
  54.  
  55. if( equali( Month, szMonths[0] ) )
  56. {
  57. ColorChat(id, GREEN, "[Nyeremenyjatek]^1 Meg^3 %d^1 nap van hatra a nyeremenyjatekig.", Halloween )
  58. }
  59. {
  60. ColorChat(id, GREEN, "[Nyeremenyjatek]^1 Meg^3 %d^1 nap van hatra a nyeremenyjatekig.", Christmas )
  61. ColorChat(id, GREEN, "[Nyeremenyjatek]^1 Meg^3 %d^1 nap van hatra a nyeremenyjatekig.", LastDay_ofAge )
  62. }
  63. {
  64. if( equal( Day, szHolydays[3] ) )
  65. {
  66. new name[33]
  67. get_user_name(id, name, 32)
  68. ColorChat(id, GREEN, "[Nyeremenyjatek]^1 A mai nap kezdetet vette a nyeremenyjatek. Sok sikert %s", name)
  69. }
  70. }
  71. }

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/