Raised This Month: $105 Target: $400
 26% 

AMX Self Weld


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Natural Selection        Category:   General Purpose        Approver:   Geesu (62)
KCE
Senior Member
Join Date: Jan 2005
Location: Los Angeles, CA
Old 03-25-2005 , 19:13   AMX Self Weld
Reply With Quote #1

Code:
/* * AMXX Self Weld enables a player to weld themselves by looking down * Copyright 2005  KCE * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. * * Title : AMXX SELF WELD * * Author : KCE * * Special Thanks & Credit : *      Gnome Builder v0.5.6b by White Panther, Zamma - Ripped Self Weld code * * Version : 1.0 * * Cvars (name/default value/description) : *     amx_selfweld (1) - Enable/Disable *     amx_selfweld_amt (5) - How much armor to weld per 7/10 ths of a second or per tick * * Cmds : *     Type "/selfweld" in chat or team chat to see usage * */ #include <amxmodx> #include <amxmisc> #include <engine> #include <fakemeta> #include <ns>
Attached Files
File Type: sma Get Plugin or Get Source (amx_selfweld.sma - 2557 views - 5.6 KB)
__________________

My 3D Art: http://k-c-e.deviantart.com/

[img]http://img213.**************/img213/7132/userbar152416mp2.gif[/img]
[img]http://img65.**************/img65/5606/userbar152433ie5.gif[/img]
[img]http://img223.**************/img223/7576/userbar152440yk6.gif[/img]
KCE is offline
karlos
Veteran Member
Join Date: Apr 2004
Location: Germany/Poland
Old 03-25-2005 , 23:09  
Reply With Quote #2

ripping does not mean copy everything even if completly unneeded

1) in this plugin u can throw away half of the self weld code as it is needed for gnome but not here

2) your mvm check will always return that it is a mvm map cause "find_ent_by_class(0,"team_command")" is always bigger 1
this function only returns the ID of a CC and due to the fact that on a server with more than 1 player: 1 and 2 are player ids so this will return a value bigger 1
rather use ns_get_build(...)

3) im sure u will always have runtime errors due to this
Code:
for ( new id = 0; id <= get_maxplayers(); id++ ){
	if ( pev(id,pev_team) == 1 || is_mvm() ){ //if marines
         if(is_user_connected(id) && is_user_alive(id) && ......)
3a ) a player id is always 1 or bigger and not 0
3b ) before doing any operation in a FOR loop check if player is connected and NOT doing operations and checking later if player is connected

4) due to 1) heavy cant weld above 100 ap and if the have above 100 and start to weld self they will drop down to 100
__________________
alias White Panther
karlos is offline
KCE
Senior Member
Join Date: Jan 2005
Location: Los Angeles, CA
Old 03-25-2005 , 23:19  
Reply With Quote #3

Quote:
Originally Posted by karlos
ripping does not mean copy everything even if completly unneeded

1) in this plugin u can throw away half of the self weld code as it is needed for gnome but not here

2) your mvm check will always return that it is a mvm map cause "find_ent_by_class(0,"team_command")" is always bigger 1
this function only returns the ID of a CC and due to the fact that on a server with more than 1 player: 1 and 2 are player ids so this will return a value bigger 1
rather use ns_get_build(...)

3) im sure u will always have runtime errors due to this
Code:
for ( new id = 0; id <= get_maxplayers(); id++ ){
	if ( pev(id,pev_team) == 1 || is_mvm() ){ //if marines
         if(is_user_connected(id) && is_user_alive(id) && ......)
3a ) a player id is always 1 or bigger and not 0
3b ) before doing any operation in a FOR loop check if player is connected and NOT doing operations and checking later if player is connected

4) due to 1) heavy cant weld above 100 ap and if the have above 100 and start to weld self they will drop down to 100
Thanks for the feedback. With some of the code, I was not sure if it was needed so I left it there in case I needed it. I probably would have run into number 3 if I ran it on a dedicated server. Problems Fixed
__________________

My 3D Art: http://k-c-e.deviantart.com/

[img]http://img213.**************/img213/7132/userbar152416mp2.gif[/img]
[img]http://img65.**************/img65/5606/userbar152433ie5.gif[/img]
[img]http://img223.**************/img223/7576/userbar152440yk6.gif[/img]
KCE is offline
EL WAPO
New Member
Join Date: Mar 2006
Old 03-23-2006 , 22:25  
Reply With Quote #4

IM having problems with this plugin.

L 03/23/2006 - 110:04: [AMXX] Displaying debug trace (plugin "amx_selfweld.amxx")
L 03/23/2006 - 110:04: [AMXX] Run time error 4: index out of bounds
L 03/23/2006 - 110:04: [AMXX] [0] amx_selfweld.sma::server_frame (line 136)


This is what im getting from the debug whats up?
EL WAPO is offline
Send a message via ICQ to EL WAPO Send a message via MSN to EL WAPO Send a message via Yahoo to EL WAPO
Seather
Member
Join Date: Oct 2004
Old 04-07-2006 , 03:28  
Reply With Quote #5

replace

new Float:used_welder[3]
new old_ent_id[3]
new Float:ent_ap_change[3]

with

new Float:used_welder[33]
new old_ent_id[33]
new Float:ent_ap_change[33]
Seather is offline
Skyrider
AMX Mod X Beta Tester
Join Date: May 2005
Location: Netherlands
Old 12-17-2006 , 19:07   Re: AMX Self Weld
Reply With Quote #6

seems this plugin does not work.. /selfweld command works, but it doesn't weld yourself at all.. not does amx_selfweld works, gives unknown command.. Using latest metamod & amxx.
__________________
Skyrider is offline
Send a message via AIM to Skyrider Send a message via MSN to Skyrider Send a message via Yahoo to Skyrider
regalis
Veteran Member
Join Date: Jan 2007
Old 06-09-2007 , 20:01   Re: AMX Self Weld
Reply With Quote #7

Does this plugin work?
It seems to be corrupted...0o

Just found it and wondered why this is approved..
greetz regalis
__________________
regalis is offline
Juba_PornBorn
BANNED
Join Date: Apr 2007
Location: Caracas
Old 06-09-2007 , 21:16   Re: AMX Self Weld
Reply With Quote #8

If this plugin worked what would it supost to do?
I dont understand in wich sense weld is aplied.
Juba_PornBorn is offline
Send a message via MSN to Juba_PornBorn
regalis
Veteran Member
Join Date: Jan 2007
Old 06-09-2007 , 21:21   Re: AMX Self Weld
Reply With Quote #9

I think this is something NS specific..no idea ;)
__________________
regalis is offline
Skyrider
AMX Mod X Beta Tester
Join Date: May 2005
Location: Netherlands
Old 06-12-2007 , 05:19   Re: AMX Self Weld
Reply With Quote #10

It welds your Armour when you look down and weld the ground.
__________________
Skyrider is offline
Send a message via AIM to Skyrider Send a message via MSN to Skyrider Send a message via Yahoo to Skyrider
Old 09-17-2007, 22:05
Darth Sailor
This message has been deleted by Darth Sailor.
Old 09-17-2007, 22:21
Darth Sailor
This message has been deleted by Darth Sailor.
Reply


Thread Tools
Display Modes

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 04:15.


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