Raised This Month: $ Target: $400
 0% 

One error...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DarlD
Senior Member
Join Date: Aug 2004
Old 10-24-2005 , 23:54   One error...
Reply With Quote #1

I get an error with fakedamage while compiling, here is the code:

Code:
#include <amxmodx> #include <amxmisc> #include <engine> public plugin_init() {     register_plugin("Admin_Damage", "1", "Meta")     register_cvar("amx_damage", "0")     register_event("ResetHUD","damage","be"); } public damage()     {     new damn = get_cvar_num("amx_damage")     fakedamage(+damn);     return PLUGIN_CONTINUE }
__________________
DarlD is offline
Send a message via MSN to DarlD
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 10-25-2005 , 01:08  
Reply With Quote #2

That's not at all how fakedamage works.

http://www.amxmodx.org/funcwiki.php?go=func&id=391
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
DarlD
Senior Member
Join Date: Aug 2004
Old 10-25-2005 , 01:30  
Reply With Quote #3

i looked at that and to me it just doesnt make any more sense :S
__________________
DarlD is offline
Send a message via MSN to DarlD
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 10-25-2005 , 07:56  
Reply With Quote #4

Code:
fakedamage (0, Classname[]"(i have not idea what it is)", get_cvar_num("amx_damage"), damagetype"(i think this has to do if the player starts tob urn or something or when the player dies... think 29 is skull :P)")

something like that...
[ --<-@ ] Black Rose is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 10-25-2005 , 12:09  
Reply With Quote #5

fakedamage ( victim, Classname[], Float:damage, damagetype )

victim is the player the damage should be inflicted upon.

Classname is the name of the damage, ie if someone is killed by it then the console would show "Player was killed by Classname".

damage is the amount of damage to inflict upon the victim.

damagetype is the kind of damage inflicted, really it only affects the icon that appears.

0 : "GENERIC"
1 : "CRUSH"
2 : "BULLET"
4 : "SLASH"
8 : "BURN"
16 : "FREEZE"
32 : "FALL"
64 : "BLAST"
128 : "CLUB"
256 : "SHOCK"
512 : "SONIC"
1024 : "ENERGYBEAM"
16384: "DROWN"
32768 : "PARALYSE"
65536 : "NERVEGAS"
131072 : "POISON"
262144 : "RADIATION"
524288 : "DROWNRECOVER"
1048576 : "CHEMICAL"
2097152 : "SLOWBURN"
4194304 : "SLOWFREEZE"
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
DarlD
Senior Member
Join Date: Aug 2004
Old 10-25-2005 , 16:59  
Reply With Quote #6

Ok this is my script, it compiles, but when i try it on my server it doesnt make my bullets kill one shot, what i want to do is add damage to a players weapon.
Code:
#include <amxmodx> #include <amxmisc> #include <engine> #include <fun> public plugin_init() {     register_plugin("amx_damage", "1", "Meta")     register_cvar("amx_damage", "0")     register_event("ResetHUD","damage","be"); } public damage(id)     {     set_task(1.0,"todo")     return PLUGIN_CONTINUE } public todo(victim)     {     new damn = get_cvar_num("amx_damage")     fakedamage ( victim, "damage", damn, 1);     return PLUGIN_CONTINUE }
__________________
DarlD is offline
Send a message via MSN to DarlD
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 10-25-2005 , 17:31  
Reply With Quote #7

This will never do what I think you want it to, but it should work partially. Basically, when you spawn or type "fullupdate" in your console, it'll kill you.

Code:
#include <amxmodx> #include <amxmisc> #include <engine> #include <fun> public plugin_init() {     register_plugin("amx_damage", "1", "Meta")     register_cvar("amx_damage", "100.0")     register_event("ResetHUD","damage","be"); } public damage(id) {     set_task(1.0,"todo",id)     return PLUGIN_CONTINUE } public todo(victim) {     new Float:damn = get_cvar_float("amx_damage")     fakedamage ( victim, "damage", damn, 1);     return PLUGIN_CONTINUE }
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
DarlD
Senior Member
Join Date: Aug 2004
Old 10-25-2005 , 17:33  
Reply With Quote #8

so i cant add damage to a weapon?
__________________
DarlD is offline
Send a message via MSN to DarlD
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 10-25-2005 , 17:41  
Reply With Quote #9

Code:
public plugin_init() {    register_event("Damage","event_damage","b"); } public event_damage(id) {    new weapon, hitzone, attacker = get_user_attacker(id,weapon,hitzone);    if(!attacker || attacker == id || !weapon)       return;    new playername[32];    get_user_name(attacker,playername,31);    fakedamage(id,playername,DAMAGE_TO_ADD_HERE,2); }

I use playername as the classname so it will appear as "Player A was killed by Player B" in console.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
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 23:39.


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