hlmod.hu
https://hlmod.hu/

szinezés
https://hlmod.hu/viewtopic.php?f=9&t=15774
Oldal: 1 / 1

Szerző:  LaCruz [ 2014.05.09. 14:59 ]
Hozzászólás témája:  szinezés

Sziasztok valaki tudna segíteni abban hogy egy -sma-ba át kellene szinezni egy sort mutatom |
V

SMA Forráskód: [ Mindet kijelol ]
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <amxmisc>
  5.  
  6. #define PLUGIN "New Plug-In"
  7. #define VERSION "1.0"
  8. #define AUTHOR "author"
  9.  
  10. new korok
  11.  
  12. public plugin_init() {
  13. register_plugin(PLUGIN, VERSION, AUTHOR)
  14. register_event("TextMsg", "resi", "a", "2=#Game_will_restart_in")
  15. register_event("HLTV", "ujkor", "a", "1=0", "2=0")
  16. }
  17. public ujkor()
  18. {
  19. korok++
  20. client_print(0,print_chat,"[=/RoyalTeam/=] Kor: %d - Pa'lya: de_dust2 | Ja'te'kosok: %d/%d",korok,get_playersnum(),get_maxplayers())
  21. }
  22. public resi()
  23. {
  24. korok = 0;
  25. }
  26.  


A 20. sorba a [=/RoyalTeam/=] -et zöldre, a pályát amin van a szerver azt is zöldre, és a játékosok számát 1/10 azt is zöldre
Köszi előre ha valaki segít!!! Megy a gomb

Szerző:  norbee.16 [ 2014.05.09. 15:05 ]
Hozzászólás témája:  Re: szinezés

LaCruz írta:
Sziasztok valaki tudna segíteni abban hogy egy -sma-ba át kellene szinezni egy sort mutatom |
V

SMA Forráskód: [ Mindet kijelol ]
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <amxmisc>
  5.  
  6. #define PLUGIN "New Plug-In"
  7. #define VERSION "1.0"
  8. #define AUTHOR "author"
  9.  
  10. new korok
  11.  
  12. public plugin_init() {
  13. register_plugin(PLUGIN, VERSION, AUTHOR)
  14. register_event("TextMsg", "resi", "a", "2=#Game_will_restart_in")
  15. register_event("HLTV", "ujkor", "a", "1=0", "2=0")
  16. }
  17. public ujkor()
  18. {
  19. korok++
  20. client_print(0,print_chat,"[=/RoyalTeam/=] Kor: %d - Pa'lya: de_dust2 | Ja'te'kosok: %d/%d",korok,get_playersnum(),get_maxplayers())
  21. }
  22. public resi()
  23. {
  24. korok = 0;
  25. }
  26.  


A 20. sorba a [=/RoyalTeam/=] -et zöldre, a pályát amin van a szerver azt is zöldre, és a játékosok számát 1/10 azt is zöldre
Köszi előre ha valaki segít!!! Megy a gomb

Kör üzenet

Ugyan azt írja ki is lehet színezni.

Szerző:  LaCruz [ 2014.05.09. 19:59 ]
Hozzászólás témája:  Re: szinezés

Köszi ment a gomb, ja és bármeik Lang filet tudom !g !y stb szinnel?

Szerző:  DeR0iD [ 2014.05.09. 20:10 ]
Hozzászólás témája:  Re: szinezés

amxx-studio
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <colorchat>
  4.  
  5. #define PLUGIN "New Plug-In"
  6. #define VERSION "1.0"
  7. #define AUTHOR "author"
  8.  
  9. new korok
  10.  
  11. public plugin_init() {
  12. register_plugin(PLUGIN, VERSION, AUTHOR)
  13. register_event("TextMsg", "resi", "a", "2=#Game_will_restart_in")
  14. register_event("HLTV", "ujkor", "a", "1=0", "2=0")
  15. }
  16. public ujkor()
  17. {
  18. korok++
  19. ColorChat(0, GREEN,"[=/RoyalTeam/=]^x01 Kor: %d - Pa'lya: ^x04de_dust2^x01 | Ja'te'kosok: ^x04%d/%d",korok,get_playersnum(),get_maxplayers())
  20. }
  21. public resi()
  22. {
  23. korok = 0;
  24. }


ha neten compilered akkor
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3.  
  4. #define PLUGIN "New Plug-In"
  5. #define VERSION "1.0"
  6. #define AUTHOR "author"
  7. enum Color
  8. {
  9. NORMAL = 1, // clients scr_concolor cvar color
  10. GREEN, // Green Color
  11. TEAM_COLOR, // Red, grey, blue
  12. GREY, // grey
  13. RED, // Red
  14. BLUE, // Blue
  15. }
  16.  
  17. new TeamName[][] =
  18. {
  19. "",
  20. "TERRORIST",
  21. "CT",
  22. "SPECTATOR"
  23. }
  24.  
  25. ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...)
  26. {
  27. static message[256];
  28.  
  29. switch(type)
  30. {
  31. case NORMAL: // clients scr_concolor cvar color
  32. {
  33. message[0] = 0x01;
  34. }
  35. case GREEN: // Green
  36. {
  37. message[0] = 0x04;
  38. }
  39. default: // White, Red, Blue
  40. {
  41. message[0] = 0x03;
  42. }
  43. }
  44.  
  45. vformat(message[1], 251, msg, 4);
  46. message[192] = '^0';
  47.  
  48. static team, ColorChange, index, MSG_Type;
  49.  
  50. if(id)
  51. {
  52. MSG_Type = MSG_ONE;
  53. index = id;
  54. } else {
  55. index = FindPlayer();
  56. MSG_Type = MSG_ALL;
  57. }
  58.  
  59. team = get_user_team(index);
  60. ColorChange = ColorSelection(index, MSG_Type, type);
  61.  
  62. ShowColorMessage(index, MSG_Type, message);
  63.  
  64. if(ColorChange)
  65. {
  66. Team_Info(index, MSG_Type, TeamName[team]);
  67. }
  68. }
  69.  
  70. ShowColorMessage(id, type, message[])
  71. {
  72. message_begin(type, get_user_msgid("SayText"), _, id);
  73. write_byte(id)
  74. write_string(message);
  75. message_end();
  76. }
  77.  
  78. Team_Info(id, type, team[])
  79. {
  80. message_begin(type, get_user_msgid("TeamInfo"), _, id);
  81. write_byte(id);
  82. write_string(team);
  83. message_end();
  84.  
  85. return 1;
  86. }
  87.  
  88. ColorSelection(index, type, Color:Type)
  89. {
  90. switch(Type)
  91. {
  92. case RED:
  93. {
  94. return Team_Info(index, type, TeamName[1]);
  95. }
  96. case BLUE:
  97. {
  98. return Team_Info(index, type, TeamName[2]);
  99. }
  100. case GREY:
  101. {
  102. return Team_Info(index, type, TeamName[0]);
  103. }
  104. }
  105.  
  106. return 0;
  107. }
  108.  
  109. FindPlayer()
  110. {
  111. static i;
  112. i = -1;
  113.  
  114. while(i <= get_maxplayers())
  115. {
  116. if(is_user_connected(++i))
  117. {
  118. return i;
  119. }
  120. }
  121.  
  122. return -1;
  123. }
  124.  
  125. new korok
  126.  
  127. public plugin_init() {
  128. register_plugin(PLUGIN, VERSION, AUTHOR)
  129. register_event("TextMsg", "resi", "a", "2=#Game_will_restart_in")
  130. register_event("HLTV", "ujkor", "a", "1=0", "2=0")
  131. }
  132. public ujkor()
  133. {
  134. korok++
  135. ColorChat(0, GREEN,"[=/RoyalTeam/=]^x01 Kor: %d - Pa'lya: ^x04de_dust2^x01 | Ja'te'kosok: ^x04%d/%d",korok,get_playersnum(),get_maxplayers())
  136. }
  137. public resi()
  138. {
  139. korok = 0;
  140. }

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