respawn
sinoku
04.06.2009
#include <amxmodx> #include <hamsandwich> public plugin_init() { register_plugin( "Respawn", "1.0", "Sinoku" ); register_clcmd( "respawn", "Respawn" ); register_event("DeathMsg", "trup", "a"); } public trup(id) { if( !is_user_alive( id ) ) { client_cmd(id, "respawn") } } public Respawn( id ) { if( !is_user_alive( id ) ) { ExecuteHamB( Ham_CS_RoundRespawn, id ); } return PLUGIN_HANDLED; }
Napisalem se taki plugin na respawn i mam problem
1 jak zrobic zeby automatycznie byl respawn po 2 sek
2 plugin sie debuguje ;/ znaczy dizalal najpierw przez 2 dni 0 problema potem debug....
Wycinek loga
L 06/03/2009 - 14:46:13: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20090603.log") L 06/03/2009 - 14:46:13: [HAMSANDWICH] Entity has null private data (13) L 06/03/2009 - 14:46:13: [AMXX] Run time error 10 (plugin "respawn.amxx") (native "ExecuteHamB") - debug not enabled! L 06/03/2009 - 14:46:13: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes). L 06/03/2009 - 14:49:02: [HAMSANDWICH] Entity has null private data (14) L 06/03/2009 - 14:49:02: [AMXX] Run time error 10 (plugin "respawn.amxx") (native "ExecuteHamB") - debug not enabled! L 06/03/2009 - 14:49:02: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes). L 06/03/2009 - 14:49:04: [HAMSANDWICH] Entity has null private data (14) L 06/03/2009 - 14:49:04: [AMXX] Run time error 10 (plugin "respawn.amxx") (native "ExecuteHamB") - debug not enabled! L 06/03/2009 - 14:49:04: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes). L 06/03/2009 - 14:49:06: [HAMSANDWICH] Entity has null private data (14) L 06/03/2009 - 14:49:06: [AMXX] Run time error 10 (plugin "respawn.amxx") (native "ExecuteHamB") - debug not enabled! L 06/03/2009 - 14:49:06: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
Miczu
04.06.2009
zle pobierasz id gracza ktory umarl, zapraszam do tutoriali na naszym forum w dziale scrypting ;>
sinoku
04.06.2009
a nie mozecie mi poprostu tego poprawic albo napisac od nowa zeby nie bylo tego wpisaywania w konsole tylko zeby respawn byl automatyczny
mgr inż. Pavulon
04.06.2009
tylko ze to niczego cie to nie nauczy...a nie mozecie mi poprostu tego poprawic albo napisac od nowa zeby nie bylo tego wpisaywania w konsole tylko zeby respawn byl automatyczny
a jak zajrzysz do tutoriali to może coś z tego wyniesiesz i następnym razem zrobisz to bez błędów.
sinoku
04.06.2009
#include <amxmodx> #include <hamsandwich> public plugin_init() { register_plugin( "Respawn", "1.0", "Sinoku" ); register_clcmd( "respawn", "Respawn" ); register_event("DeathMsg", "trup", "a"); } public trup() { new vid = read_data(2) if( !is_user_alive( vid ) ) { client_cmd(vid, "respawn") } } public Respawn(id) { if( !is_user_alive( id ) ) { ExecuteHamB( Ham_CS_RoundRespawn, id ); } return PLUGIN_HANDLED; }Teraz sie nie ebdzie debugowal???
Miczu
04.06.2009
sinoku, czasem szybciej poprostu spytac niz czekac na odpowiedz :>
Powinno byc znosnie, ale w 1 miejscu moga byc male problemy...
Powinno byc znosnie, ale w 1 miejscu moga byc male problemy...
Knopers
04.06.2009
A nie łatwiej by było tak ?
#include <amxmodx> #include <hamsandwich> public plugin_init(){ register_plugin( "Respawn", "1.0", "Sinoku" ); register_event("DeathMsg", "trup", "a"); } public trup(){ new vid = read_data(2) if( !is_user_alive( vid ) ){ Respawn(vid); } } public Respawn(id){ if( !is_user_alive( id ) ){ ExecuteHamB( Ham_CS_RoundRespawn, id ); } return PLUGIN_HANDLED; }
sinoku
04.06.2009
no wlasnie se idealnie tak samo jak wyzej teraz do testow napisalem wiec to jets juz prawidlowa wersja??? a i jeszcze jedno pytanie jak zrobic zeby najlepszy gracz ryndy dostawal gratis 2000 $ tzn na najlepszego to mam kod ale niewiem jak zrobic zeby dostawal ta kase jaka jest komenda ??
Knopers
04.06.2009
sinoku
04.06.2009
ok dzięki a jescze jedno bo mama tak jest najlepszy i po tym jets restart rundy nie to jets tak jaby runda rozgrzewkowa i zeby ta kasa byla juz an normalna gre
Miczu
04.06.2009
if(cs_get_user_money(id) + 2000>16000) cs_set_user_money(id, 16000) else cs_set_user_money(id, cs_get_user_money(id) + 2000)
Trzeba sie zabezpieczyc by nie przekroczyc 16k
Miczu
04.06.2009
sinoku, masz juz niby kod od najlepszego gracza, to uzyj w/w funkcji dajac jako id - id najlepszego gracza i pamietaj o module cstrike