hlmod.hu
https://hlmod.hu/

Sebimérő Hiba!
https://hlmod.hu/viewtopic.php?f=10&t=17635
Oldal: 1 / 1

Szerző:  NuD[!]e [2014.10.19. 18:43 ]
Hozzászólás témája:  Sebimérő Hiba!

Halli. Valaki ki javítaná eztaz sma-t mert pawn-nónál ezt irja:szines.sma(85) : warning 204: symbol is assigned a value that is never used: "b"
szines.sma(85) : warning 204: symbol is assigned a value that is never used: "g"
szines.sma(85) : warning 204: symbol is assigned a value that is never used: "r"
SMA:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <fakemeta>
  3.  
  4. #define PLUGIN "Sebessegmero"
  5. #define VERSION "1.2"
  6. #define AUTHOR "NuD[!]e"
  7.  
  8. #define FREQ 0.1
  9.  
  10. new bool:plrSpeed[33]
  11.  
  12. new TaskEnt,SyncHud,showspeed,color, maxplayers, r, g, b
  13.  
  14. public plugin_init() {
  15. register_plugin(PLUGIN, VERSION, AUTHOR)
  16. register_cvar("AcidoX", "Speedometer 1.1", FCVAR_SERVER)
  17. register_forward(FM_Think, "Think")
  18.  
  19. TaskEnt = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
  20. set_pev(TaskEnt, pev_classname, "speedometer_think")
  21. set_pev(TaskEnt, pev_nextthink, get_gametime() + 1.01)
  22.  
  23. register_clcmd("say /speed", "toogleSpeed")
  24.  
  25. showspeed = register_cvar("showspeed", "1")
  26.  
  27. SyncHud = CreateHudSyncObj()
  28.  
  29. maxplayers = get_maxplayers()
  30.  
  31. new colors[16], red[4], green[4], blue[4]
  32. get_pcvar_string(color, colors, sizeof colors - 1)
  33. parse(colors, red, 3, green, 3, blue, 3)
  34. r = str_to_num(red)
  35. g = str_to_num(green)
  36. b = str_to_num(blue)
  37. }
  38.  
  39. public Think(ent)
  40. {
  41. if(ent == TaskEnt)
  42. {
  43. SpeedTask()
  44. set_pev(ent, pev_nextthink, get_gametime() + FREQ)
  45. }
  46. }
  47.  
  48. public client_putinserver(id)
  49. {
  50. plrSpeed[id] = showspeed > 0 ? true : false
  51. }
  52.  
  53. public toogleSpeed(id)
  54. {
  55. plrSpeed[id] = plrSpeed[id] ? false : true
  56. return PLUGIN_HANDLED
  57. }
  58.  
  59. SpeedTask()
  60. {
  61. static i, target
  62. static Float:velocity[3]
  63. static Float:speed, Float:speedh, Float: kmh
  64.  
  65. for(i=1; i<=maxplayers; i++)
  66. {
  67. if(!is_user_connected(i)) continue
  68. if(!plrSpeed[i]) continue
  69.  
  70. target = pev(i, pev_iuser1) == 4 ? pev(i, pev_iuser2) : i
  71. pev(target, pev_velocity, velocity)
  72.  
  73. speed = vector_length(velocity)
  74. speedh = floatsqroot(floatpower(velocity[0], 2.0) + floatpower(velocity[1], 2.0))
  75. kmh = speedh / 60
  76.  
  77. set_hudmessage 0, 252, 100, -1.0, 0.7, 2, 0.0, FREQ, 0.01, 0.0)
  78. ShowSyncHudMsg(i, SyncHud, "[B]om[B]a^n%3.2f Sebesség^n%.0f km/h", speed, kmh)
  79. }
  80. }
  81.  
  82. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  83. *{\ rtf1\ ansi\ deff0{\ fonttbl{\ f0\ fnil Tahoma;}}n\ viewkind4\ uc1\ pard\ lang1038\ f0\ fs16 n\ par }
  84. */
  85.  

Szerző:  xXlederXxHUN [2014.10.19. 18:49 ]
Hozzászólás témája:  Re: Sebimérő Hiba!

12, sorban ezeket töröld:
SMA Forráskód: [ Mindet kijelol ]
  1. r, g, b

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