Forumas skirtas spręsti problemas iškilusias su CS 1.6 serveriais.
Pukuotukas951
Gana aktyvus vartotojas
Posts: 445 Joined: 2011 Aug 27 09:29
Post
by Pukuotukas951 » 2011 Sep 22 18:18
Stai kai paleidziu plugina man raso [AMXX] Run time error 4 ....
As ta errora debuginau ir suzinojau, kad kazkas blogai su hook_deathmessage
stai kodas:
Code: Select all
/* --| Event when player died */public Hook_Deathmessage(){ /* --| If plugin is on... */ if( get_pcvar_num( gDrShopOn ) == 1 ) { /* --| Get the killer and attacker */ new killer = read_data( 1 ); new victim = read_data( 2 ); /* --| If player has died with world / trigger_hurt */ if( killer == victim ) { return PLUGIN_HANDLED; } /* --| Setting killer points when killed a enemy */ gKillerPoints[ killer ] += get_pcvar_num( gKillerPointsCvar ); /* --| Reseting items */ HasHe[ victim ] = false; HasBothGren[ victim ] = false; HasSilent[ victim ] = false; HasHealth[ victim ] = false; HasArmor[ victim ] = false; HasSpeed[ victim ] = false; HasGravity[ victim ] = false; HasInvis[ victim ] = false; HasNoclip[ victim ] = false; HasJet[ victim ] = false; HasDeagle[ victim ] = false; HasLongJump[ victim ] = false; HasGlow[ victim ] = false; HasNVG[ victim ] = false; set_user_gravity( victim, 1.0 ); set_user_maxspeed( victim, 0.0 ); set_user_footsteps( victim, 0 ); set_user_noclip( victim, 0 ); set_user_rendering( victim ); set_user_nvg( victim, 0 ); remove_user_nvg( victim ); remove_task( victim ); } return PLUGIN_CONTINUE;}
Kaip ji pataisyti? Nes ant kito plugino kur nera points issaugojimo sio error nemeta.
morka
Gana aktyvus vartotojas
Posts: 292 Joined: 2011 Jan 08 00:21
Post
by morka » 2011 Sep 22 18:23
Gal neužregistruotas Death event?
Pukuotukas951
Gana aktyvus vartotojas
Posts: 445 Joined: 2011 Aug 27 09:29
Post
by Pukuotukas951 » 2011 Sep 22 18:47
Užregistruota kaip ir.
Code: Select all
/* --| Register some usefull events */ register_event( "DeathMsg", "Hook_Deathmessage", "a" ); /* --| We can't do that on deathmsg because player die in traps by suicide,.. trigger_hurt or world.. etc */ register_forward( FM_ClientKill, "forward_kill" );
morka
Gana aktyvus vartotojas
Posts: 292 Joined: 2011 Jan 08 00:21
Post
by morka » 2011 Sep 22 19:13
tai koks visdelto error? Nes kazkas nieko nesako
Pukuotukas951
Gana aktyvus vartotojas
Posts: 445 Joined: 2011 Aug 27 09:29
Post
by Pukuotukas951 » 2011 Sep 22 19:36
Čia prieš debug plugina plugin.ini faile:
Čia po debug:
morka
Gana aktyvus vartotojas
Posts: 292 Joined: 2011 Jan 08 00:21
Post
by morka » 2011 Sep 22 20:05
kokia eilute yra 1073?
beast
AMX Mod X ekspertai
Posts: 509 Joined: 2011 Jan 08 18:44
Skype: thefurious4
Contact:
Post
by beast » 2011 Sep 22 20:08
if( killer == victim )
>>
if( killer == victim || 1 <= killer <= 32 || 1 <= victim <= 32 )
EDIT: vietoj 32 reikia get_maxplayers() gražinamos reikšmės.
Last edited by
beast on 2014 Feb 03 16:40, edited 1 time in total.
Pukuotukas951
Gana aktyvus vartotojas
Posts: 445 Joined: 2011 Aug 27 09:29
Post
by Pukuotukas951 » 2011 Sep 23 19:12
Štai kas būna kai bandau complininti kai pakeičiau iš
if( killer == victim )
į
if( killer == victim || 1 <= killer <= 32 || 1 <= victim <= 32 )
Aurimas
O taip. Jis jau surinko 50 žinučių!
Posts: 79 Joined: 2011 Jul 13 20:33
Post
by Aurimas » 2011 Sep 24 09:54
Sulygiuok eilutes kode.
Pukuotukas951
Gana aktyvus vartotojas
Posts: 445 Joined: 2011 Aug 27 09:29
Post
by Pukuotukas951 » 2011 Sep 24 10:22
Kaip tai?
Code: Select all
/* --| Event when player died */public Hook_Deathmessage(){ /* --| If plugin is on... */ if( get_pcvar_num( gDrShopOn ) == 1 ) { /* --| Get the killer and attacker */ new killer = read_data( 1 ); new victim = read_data( 2 ); /* --| If player has died with world / trigger_hurt */ if( killer == victim || 1 <= killer <= 32 || 1 <= victim <= 32 ) { return PLUGIN_HANDLED; } /* --| Setting killer points when killed a enemy */ gKillerPoints[ killer ] += get_pcvar_num( gKillerPointsCvar ); /* --| Reseting items */ HasHe[ victim ] = false; HasBothGren[ victim ] = false; HasSilent[ victim ] = false; HasHealth[ victim ] = false; HasArmor[ victim ] = false; HasSpeed[ victim ] = false; HasGravity[ victim ] = false; HasInvis[ victim ] = false; HasNoclip[ victim ] = false; HasJet[ victim ] = false; HasDeagle[ victim ] = false; HasLongJump[ victim ] = false; HasGlow[ victim ] = false; HasNVG[ victim ] = false; set_user_gravity( victim, 1.0 ); set_user_maxspeed( victim, 0.0 ); set_user_footsteps( victim, 0 ); set_user_noclip( victim, 0 ); set_user_rendering( victim ); set_user_nvg( victim, 0 ); remove_user_nvg( victim ); remove_task( victim ); } return PLUGIN_CONTINUE;
Users browsing this forum: Ahrefs [Bot] and 1 guest