Raised This Month: $51 Target: $400
 12% 

new respawn


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
man_s_our
Senior Member
Join Date: Jul 2017
Location: aim_taliban
Old 03-08-2018 , 12:02   new respawn
Reply With Quote #1

since I tried this plugin with respawn related plugins and founded that the players whom killed by the bomb doesn't respawn I coded this respawner to solve the problem.
Attached Files
File Type: sma Get Plugin or Get Source (respawn.sma - 1054 views - 639 Bytes)
__________________
man_s_our is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 03-08-2018 , 12:38   Re: new respawn
Reply With Quote #2

This code has more problems than lines of code.
__________________

Last edited by HamletEagle; 03-08-2018 at 12:38.
HamletEagle is offline
man_s_our
Senior Member
Join Date: Jul 2017
Location: aim_taliban
Old 03-09-2018 , 05:14   Re: new respawn
Reply With Quote #3

Quote:
Originally Posted by HamletEagle View Post
This code has more problems than lines of code.
like what?
__________________
man_s_our is offline
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 03-09-2018 , 07:54   Re: new respawn
Reply With Quote #4

Quote:
Originally Posted by man_s_our View Post
since I tried this plugin with respawn related plugins and founded that the players whom killed by the bomb doesn't respawn I coded this respawner to solve the problem.
https://forums.alliedmods.net/showthread.php?p=8906
__________________

Last edited by D3XT3R; 03-09-2018 at 07:54.
D3XT3R is offline
Send a message via Skype™ to D3XT3R
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 03-09-2018 , 08:01   Re: new respawn
Reply With Quote #5

can be done with better ways
Code:
#include < amxmodx > #include < amxmisc > #include < hamsandwich > public plugin_init( ) {     RegisterHam( Ham_Killed, "player", "Ham_PlayerDeath", 1 ) } public Ham_PlayerDeath( victim, attacker, shouldgib ) {     set_task( 1.0, "respawn", victim ) } public respawn( victim ) {     if( is_user_alive( victim ) )         return         ExecuteHamB( Ham_CS_RoundRespawn, victim ) }
__________________

Last edited by D3XT3R; 03-09-2018 at 08:02.
D3XT3R is offline
Send a message via Skype™ to D3XT3R
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 03-09-2018 , 08:53   Re: new respawn
Reply With Quote #6

Quote:
Originally Posted by man_s_our View Post
like what?
1.You are using permanent tasks to respawn the player where you could simply hook Ham_Killed.
2.The way you get all players(loop with get_maxplayers) is wrong. In most cases you should use get_players.
3.Declaring variables in a loop.
4.If I remember right using spawn() on players has issues, but I don't feel like checking right now. Anyway, you should use Ham for this.
5.Creating different tasks with the same id.
6.Why are you using 2 tasks at 0.5 and at 0.7 seconds to respawn the player?
7.Why include cstrike if you are not going to use it?
__________________

Last edited by HamletEagle; 03-09-2018 at 08:59.
HamletEagle is offline
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 03-09-2018 , 12:03   Re: new respawn
Reply With Quote #7

Quote:
Originally Posted by HamletEagle View Post
1.You are using permanent tasks to respawn the player where you could simply hook Ham_Killed.
2.The way you get all players(loop with get_maxplayers) is wrong. In most cases you should use get_players.
3.Declaring variables in a loop.
4.If I remember right using spawn() on players has issues, but I don't feel like checking right now. Anyway, you should use Ham for this.
5.Creating different tasks with the same id.
6.Why are you using 2 tasks at 0.5 and at 0.7 seconds to respawn the player?
7.Why include cstrike if you are not going to use it?
Why you told him all this if you can tell him as dexter show you in example
Also him code is stolen from the code that i showed you and i think this idea is already unnaproved D:
__________________

Last edited by D3XT3R; 03-09-2018 at 12:04.
D3XT3R is offline
Send a message via Skype™ to D3XT3R
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-09-2018 , 12:41   Re: new respawn
Reply With Quote #8

Quote:
Originally Posted by D3XT3R View Post
Why you told him all this if you can tell him as dexter show you in example
Why are you talking to yourself in third person?

The code is terrible. If you want to fix a broken plugin, you usually do it by making a better version, not this.
__________________

Last edited by OciXCrom; 03-09-2018 at 13:45.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 03-09-2018 , 12:49   Re: new respawn
Reply With Quote #9

Dextar, HamletEagle didn't wanted to say to use your example because I got a warning message from AM, saying that I've posted a troll/flaming post regarding you, saying that(2x please): I recommended someone to hire you in order helping him with some plugins(stuff'n'things). Really, Hamlet didn't wanted to get an infraction point as I got. Saying good things to you = increases my chances to get banned on this forum.
__________________

Last edited by Relaxing; 03-09-2018 at 12:51. Reason: it ain't a lie
Relaxing is offline
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 03-09-2018 , 16:12   Re: new respawn
Reply With Quote #10

Quote:
Originally Posted by Relaxing View Post
Dextar, HamletEagle didn't wanted to say to use your example because I got a warning message from AM, saying that I've posted a troll/flaming post regarding you, saying that(2x please): I recommended someone to hire you in order helping him with some plugins(stuff'n'things). Really, Hamlet didn't wanted to get an infraction point as I got. Saying good things to you = increases my chances to get banned on this forum.
i feel like im BAILOPAIN so when anyone blame me he got banned NICE!
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode