AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Block Damage and stock (https://forums.alliedmods.net/showthread.php?t=221360)

Shooting King 07-21-2013 01:44

Block Damage and stock
 
1. Is there a way to block Damage only with <amxmodx> not with ham & fm ?

2. What is the difference btw,
PHP Code:

1. stock function()
2. function() 


Arkshine 07-21-2013 04:11

Re: Block Damage and stock
 
1. Tell first the reason ; but it's most likely a retarted one.

2. When using "stock" if function is not found on compilation, it will be ignored.

Shooting King 07-21-2013 06:06

Re: Block Damage and stock
 
Quote:

Originally Posted by Arkshine (Post 1995509)
1. Tell first the reason ; but it's most likely a retarted one.

This is actually a request in Suggestion forums, When T's stab CT's then CT's must be changed to T. First I though to hook Damage event and keep on adding the damages to the player's health, but its retarded. So when a CT player hit T and if his damage is >= 100 the player simply dies. (It is because the register_event is called at the end of the event).
Quote:

Originally Posted by Arkshine (Post 1995509)
When using "stock" if function is not found on compilation, it will be ignored.

Didn't get you Ark :?:

Arkshine 07-21-2013 06:16

Re: Block Damage and stock
 
1. You don't answer to the question.
2. If you have a function which is not called at least one time, when compiling the plugin you will get warning and function will be integrated even though not used. Using "stock" means if a function is not used, it's ignored by the compiler, then you get no warning and function is not integrated.

Shooting King 07-21-2013 06:24

Re: Block Damage and stock
 
Quote:

Originally Posted by Arkshine (Post 1995509)
When using "stock" if function is not found on compilation, it will be ignored.

Quote:

Originally Posted by Arkshine (Post 1995557)
If you have a function which is not called at least one time, when compiling the plugin you will get warning and function will be integrated even though not used. Using "stock" means if a function is not used, it's ignored by the compiler, then you get no warning and function is not integrated.

You should have used "function use" instead of "function" in the previous post :). Whatever, Got that point.
Quote:

Originally Posted by Arkshine (Post 1995557)
You don't answer to the question.

I though you asked the use of Damage Block. If I should use Ham_takeDamage it would be relatively slow compared to amxmodx and I should include ham for only this purpose.

Arkshine 07-21-2013 06:27

Re: Block Damage and stock
 
Slow ? What are you're talking about ?

Shooting King 07-21-2013 06:55

Re: Block Damage and stock
 
Quote:

Originally Posted by Shooting King (Post 1995567)
I should include ham for only this purpose.


Arkshine 07-21-2013 07:15

Re: Block Damage and stock
 
And ? So at the end it's well for a retarded reason. If you don't understand how works things you should not make assumptions. Saying it's "slow" doesn't make sense and is wrong. Just use the available tool for your needs.

devWaleed 07-21-2013 07:36

Correct me if I am wrong but wouldn't HAM_SUPERCEDE work on Ham_TraceAttack or with Ham_TakeDamage?


MERGE EDIT
PHP Code:

RegisterHam(Ham_TakeDamage"player""onDamage"0);

public 
onDamage(id){
    return 
HAM_SUPERCEDE;


Yup! Tried it, This will do your work if you want to use Ham.

Shooting King 07-21-2013 07:50

Re: Block Damage and stock
 
Quote:

Originally Posted by Arkshine (Post 1995601)
And ? So at the end it's well for a retarded reason. If you don't understand how works things you should not make assumptions. Saying it's "slow" doesn't make sense and is wrong. Just use the available tool for your needs.

Ok Ok Its faster than amx. Is there a way with amx ??


All times are GMT -4. The time now is 06:24.

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