hlmod.hu
https://hlmod.hu/

info
https://hlmod.hu/viewtopic.php?f=9&t=10898
Oldal: 1 / 1

Szerző:  Axion [2013.09.15. 16:21 ]
Hozzászólás témája:  info

Sziasztok!
próbálkoztam egy olyan plugint irni h kihozza az adataid : lefordítottam amxxre nem írt semmi hibát de játékban

===================
[A.X.I] A hpd : d.
[A.X.I] A FRAG-eid :
[A.X.I] A halallod :
==============

csak ennyit ír mi lehet a baj?

SMA Forráskód: [ Mindet kijelol ]
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <amxmisc>
  5. #include <fun>
  6.  
  7. #define PLUGIN "info"
  8. #define VERSION "1.0"
  9. #define AUTHOR "Axion"
  10.  
  11.  
  12. public plugin_init() {
  13. register_plugin(PLUGIN, VERSION, AUTHOR)
  14.  
  15. register_clcmd("say /hape","axi",0)
  16. }
  17. public axi(id)
  18. {
  19. client_print(id, print_chat,"===================", get_user_health(id))
  20. client_print(id, print_chat,"[A.X.I] A hpd : %s", get_user_health(id))
  21. client_print(id, print_chat,"[A.X.I] A FRAG-eid : %s", get_user_frags(id))
  22. client_print(id, print_chat,"[A.X.I] A halallod : %s", get_user_deaths(id))
  23. client_print(id, print_chat,"===================", get_user_health(id))
  24. }

Szerző:  JAck [2013.09.15. 16:34 ]
Hozzászólás témája:  Re: info

SMA Forráskód: [ Mindet kijelol ]
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <amxmisc>
  5. #include <fun>
  6.  
  7. #define PLUGIN "info"
  8. #define VERSION "1.0"
  9. #define AUTHOR "Axion"
  10.  
  11.  
  12. public plugin_init() {
  13. register_plugin(PLUGIN, VERSION, AUTHOR)
  14.  
  15. register_clcmd("say /hape","axi",0)
  16. }
  17. public axi(id)
  18. {
  19. new frag = cs_get_user_frags(id)
  20. new death = cs_get_user_deaths(id)
  21. new hp = cs_get_user_health(id)
  22. client_print(id, print_chat,"===================")
  23. client_print(id, print_chat,"[A.X.I] A hpd : %s", hp(id))
  24. client_print(id, print_chat,"[A.X.I] A FRAG-eid : %s", frag(id))
  25. client_print(id, print_chat,"[A.X.I] A halallod : %s", death(id))
  26. client_print(id, print_chat,"===================" )
  27. }

Szerző:  my05 [2013.09.15. 16:40 ]
Hozzászólás témája:  Re: info

%s helyett %d.
A %s string, azaz karakterlánc, a %d pedig decimális szám.

Szerző:  CrB [2013.09.15. 17:50 ]
Hozzászólás témája:  Re: info

SMA Forráskód: [ Mindet kijelol ]
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <amxmisc>
  5. #include <fun>
  6.  
  7. #define PLUGIN "info"
  8. #define VERSION "1.0"
  9. #define AUTHOR "Axion"
  10.  
  11.  
  12. public plugin_init() {
  13. register_plugin(PLUGIN, VERSION, AUTHOR)
  14.  
  15. register_clcmd("say /hape","axi",0)
  16. }
  17. public axi(id)
  18. {
  19. new frag = cs_get_user_frags(id)
  20. new death = cs_get_user_deaths(id)
  21. new hp = cs_get_user_health(id)
  22. client_print(id, print_chat,"===================")
  23. client_print(id, print_chat,"[A.X.I] A hpd : %d", hp(id))
  24. client_print(id, print_chat,"[A.X.I] A FRAG-eid : %d", frag(id))
  25. client_print(id, print_chat,"[A.X.I] A halallod : %d", death(id))
  26. client_print(id, print_chat,"===================" )
  27. }

Szerző:  Axion [2013.09.15. 18:14 ]
Hozzászólás témája:  Re: info

amikor leakarom fordítani amxxre ezt írja

Kód:
info.sma(19) : error 017: undefined symbol "cs_get_user_frags"
info.sma(20) : error 017: undefined symbol "cs_get_user_deaths"
info.sma(21) : error 017: undefined symbol "cs_get_user_health"
info.sma(22) : warning 217: loose indentation
info.sma(23) : error 012: invalid function call, not a valid address
info.sma(23) : warning 215: expression has no effect
info.sma(23) : error 001: expected token: ";", but found ")"
info.sma(23) : error 029: invalid expression, assumed zero
info.sma(23) : fatal error 107: too many error messages on one line

Compilation aborted.
7 Errors.
Done

Szerző:  CrB [2013.09.15. 18:18 ]
Hozzászólás témája:  Re: info

bocsi nemnéztem át a kódot csak a %s-t javítottam %d re parancsolj ez tuti lefut :D
SMA Forráskód: [ Mindet kijelol ]
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <amxmisc>
  5. #include <fun>
  6. #include <cstrike>
  7. #define PLUGIN "info"
  8. #define VERSION "1.0"
  9. #define AUTHOR "Axion"
  10.  
  11.  
  12. public plugin_init() {
  13. register_plugin(PLUGIN, VERSION, AUTHOR)
  14.  
  15. register_clcmd("say /hape","axi",0)
  16. }
  17. public axi(id)
  18. {
  19.  
  20.  
  21.  
  22. client_print(id, print_chat,"===================")
  23. client_print(id, print_chat,"[A.X.I] A hpd : %d", get_user_health(id))
  24. client_print(id, print_chat,"[A.X.I] A FRAG-eid : %d", get_user_frags(id))
  25. client_print(id, print_chat,"[A.X.I] A halallod : %d",cs_get_user_deaths(id))
  26. client_print(id, print_chat,"===================" )
  27. }

Szerző:  Maxi [2013.09.15. 21:05 ]
Hozzászólás témája:  Re: info

Egy kérdés...
Minek fun fügvénykönyvtár?

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