hlmod.hu
https://hlmod.hu/

KÉSZ! Halálcsík
https://hlmod.hu/viewtopic.php?f=29&t=19302
Oldal: 4 / 4

Szerző:  DeR0iD [ 2015.02.09. 18:59 ]
Hozzászólás témája:  Re: ujabb halalcsik

write_byte(255) kék
write_byte(255) piros
write_byte(255) zöld
write_byte(60) fényesség

Szerző:  Bence98007 [ 2015.02.09. 20:23 ]
Hozzászólás témája:  Re: ujabb halalcsik

Vaaaagy akár fel is dobhatod random színekkel:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2.  
  3. #define PLUGIN "Halal csik"
  4. #define VERSION "1.0"
  5. #define AUTHOR "DeRoiD"
  6.  
  7. new vonal
  8.  
  9. public plugin_precache()
  10. vonal = precache_model("sprites/animglow01.spr")
  11. public plugin_init() {
  12. register_plugin(PLUGIN, VERSION, AUTHOR)
  13. register_event("DeathMsg","Halal","a")
  14. }
  15. public Halal() {
  16. new gyilkos = read_data(1)
  17. new id = read_data(2)
  18. if(gyilkos != id)
  19. {
  20. new start_origin[3], veg_origin[3]
  21. get_user_origin(id, veg_origin)
  22. get_user_origin(gyilkos, start_origin)
  23.  
  24. VonalHuzas(id, start_origin, veg_origin)
  25. }
  26. }
  27. public VonalHuzas(id, stop[3], start[3]) {
  28. new r = random_num(50,255)
  29. new g = random_num(50,255)
  30. new b = random_num(50,255)
  31. message_begin(MSG_ONE, SVC_TEMPENTITY, _, id)
  32. write_byte( TE_BEAMPOINTS )
  33. write_coord(start[0])
  34. write_coord(start[1])
  35. write_coord(start[2])
  36. write_coord(stop[0])
  37. write_coord(stop[1])
  38. write_coord(stop[2])
  39. write_short(vonal)
  40. write_byte(10)
  41. write_byte(10)
  42. write_byte(100)
  43. write_byte(10)
  44. write_byte(0)
  45. write_byte(b)
  46. write_byte(r)
  47. write_byte(g)
  48. write_byte(60)
  49. write_byte(50)
  50. message_end()
  51. }

Szerző:  ZiT3K [ 2015.02.09. 21:47 ]
Hozzászólás témája:  Re: ujabb halalcsik

Bence: Random színű nem lett csak fehér.

EZ VAN FENT:

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2.  
  3. #define PLUGIN "New Plug-In"
  4. #define VERSION "1.0"
  5. #define AUTHOR "DeRoiD"
  6.  
  7. new vonal
  8.  
  9. public plugin_precache()
  10. vonal = precache_model("sprites/animglow01.spr")
  11. public plugin_init() {
  12. register_plugin(PLUGIN, VERSION, AUTHOR)
  13. register_event("DeathMsg","Halal","a")
  14. }
  15. public Halal() {
  16. new gyilkos = read_data(1)
  17. new id = read_data(2)
  18. if(gyilkos != id)
  19. {
  20. new start_origin[3], veg_origin[3]
  21. get_user_origin(id, veg_origin)
  22. get_user_origin(gyilkos, start_origin)
  23.  
  24. VonalHuzas(id, start_origin, veg_origin)
  25. }
  26. }
  27. public VonalHuzas(id, stop[3], start[3]) {
  28. message_begin(MSG_ONE, SVC_TEMPENTITY, _, id)
  29. write_byte( TE_BEAMPOINTS )
  30. write_coord(start[0])
  31. write_coord(start[1])
  32. write_coord(start[2])
  33. write_coord(stop[0])
  34. write_coord(stop[1])
  35. write_coord(stop[2])
  36. write_short(vonal)
  37. write_byte(10)
  38. write_byte(10)
  39. write_byte(100)
  40. write_byte(10)
  41. write_byte(0)
  42. write_byte(255) //KÉK }
  43. write_byte(255) //PIROS}=szín
  44. write_byte(255) //ZÖLD }
  45. write_byte(60) //FÉNYERŐSSÉG
  46. write_byte(50)
  47. message_end()
  48. }


ALAPJÁN MŰKÖDIK! Amilyen színre állítom, olyan lesz.

De random színű(egyszer ilyen, egyszer olyan színű csík) nem lett.

Szerző:  GameFather [ 2015.02.09. 21:52 ]
Hozzászólás témája:  Re: ujabb halalcsik

Próbáld!
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2.  
  3. #define PLUGIN "Halal csik"
  4. #define VERSION "1.0"
  5. #define AUTHOR "DeRoiD"
  6.  
  7. new vonal
  8.  
  9. public plugin_precache()
  10. vonal = precache_model("sprites/animglow01.spr")
  11. public plugin_init() {
  12. register_plugin(PLUGIN, VERSION, AUTHOR)
  13. register_event("DeathMsg","Halal","a")
  14. }
  15. public Halal() {
  16. new gyilkos = read_data(1)
  17. new id = read_data(2)
  18. if(gyilkos != id)
  19. {
  20. new start_origin[3], veg_origin[3]
  21. get_user_origin(id, veg_origin)
  22. get_user_origin(gyilkos, start_origin)
  23.  
  24. VonalHuzas(id, start_origin, veg_origin)
  25. }
  26. }
  27. public VonalHuzas(id, stop[3], start[3]) {
  28. new r = random_num(50,255)
  29. new g = random_num(50,255)
  30. new b = random_num(50,255)
  31. message_begin(MSG_ONE, SVC_TEMPENTITY, _, id)
  32. write_byte( TE_BEAMPOINTS )
  33. write_coord(start[0])
  34. write_coord(start[1])
  35. write_coord(start[2])
  36. write_coord(stop[0])
  37. write_coord(stop[1])
  38. write_coord(stop[2])
  39. write_short(vonal)
  40. write_byte(10)
  41. write_byte(10)
  42. write_byte(100)
  43. write_byte(10)
  44. write_byte(0)
  45. write_byte(b)
  46. write_byte(r)
  47. write_byte(g)
  48. write_byte(60)
  49. write_byte(50)
  50. message_end()
  51. }

Szerző:  Bence98007 [ 2015.02.09. 23:38 ]
Hozzászólás témája:  Re: ujabb halalcsik

Miben tér el az enyémtől?
15 percen keresztűl néztem a kódot de nem veszem észre :o
GameFather írta:
Próbáld!
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2.  
  3. #define PLUGIN "Halal csik"
  4. #define VERSION "1.0"
  5. #define AUTHOR "DeRoiD"
  6.  
  7. new vonal
  8.  
  9. public plugin_precache()
  10. vonal = precache_model("sprites/animglow01.spr")
  11. public plugin_init() {
  12. register_plugin(PLUGIN, VERSION, AUTHOR)
  13. register_event("DeathMsg","Halal","a")
  14. }
  15. public Halal() {
  16. new gyilkos = read_data(1)
  17. new id = read_data(2)
  18. if(gyilkos != id)
  19. {
  20. new start_origin[3], veg_origin[3]
  21. get_user_origin(id, veg_origin)
  22. get_user_origin(gyilkos, start_origin)
  23.  
  24. VonalHuzas(id, start_origin, veg_origin)
  25. }
  26. }
  27. public VonalHuzas(id, stop[3], start[3]) {
  28. new r = random_num(50,255)
  29. new g = random_num(50,255)
  30. new b = random_num(50,255)
  31. message_begin(MSG_ONE, SVC_TEMPENTITY, _, id)
  32. write_byte( TE_BEAMPOINTS )
  33. write_coord(start[0])
  34. write_coord(start[1])
  35. write_coord(start[2])
  36. write_coord(stop[0])
  37. write_coord(stop[1])
  38. write_coord(stop[2])
  39. write_short(vonal)
  40. write_byte(10)
  41. write_byte(10)
  42. write_byte(100)
  43. write_byte(10)
  44. write_byte(0)
  45. write_byte(b)
  46. write_byte(r)
  47. write_byte(g)
  48. write_byte(60)
  49. write_byte(50)
  50. message_end()

}

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