Hello everyone ! I'm using Diablix library of Cannon that is being controlled by person!
It is a little bugged[Maybe more than little] , but the author isn't interested anymore in this project[Or maybe he don't know how to fix this :>]
PHP Code:
#include <amxmodx>
#include "dzialko.inl"
#define VERSION "0.1"
public plugin_init() {
register_plugin("Test z dzialkiem", VERSION, "Diablix")
register_clcmd("say /test", "cmdTest");
}
public cmdTest(id){
diablix_create_cannon(id, 100, 30, 1.0);
}
This will create Cannon with 100hp [Yea working] Dealing 30dmg [Working too]
Allowing You to shoot each one second [Working only with 1.0 value , 0.9 value is giving crazy effect [Totally fast shoot]
So the problems are :
1 #
PHP Code:
L 10/21/2011 - 02:25:50: [HAMSANDWICH] Failed to retrieve classtype for "cl_dzialko", hook for "think_Dzialko" not active.
L 10/21/2011 - 02:25:50: [AMXX] Displaying debug trace (plugin "dzialko.amxx")
L 10/21/2011 - 02:25:50: [AMXX] Run time error 10: native error (native "RegisterHam")
L 10/21/2011 - 02:25:50: [AMXX] [0] dzialko.sma::plugin_init (line 64)
The error each map change. That appear only ONCE each map!
[But still annoying]
2 # Even after You die - While You are still pressing Left Mouse Button , the cannon is shooting ;D
3 # Even If Your Cannon is destroyed. On next round in the place where the cannon was, You can press E and attack like with cannon[But Cannon was destroyed]
Ehh don't know If my description of this problem is normal.
I wanted to say.
a) Your Cannon is destroyed
b) In the place where it standed, You still can press E and attack with cannon ;d
4 # The cannon is not deleted after round end.
If someone could fix this, it could be really usefull for a lot of servers!
It is library so implementing this in any plugin is 30sec of work.
I'm uploading sma below.
The sma on top of this topic is just test plugin.
Can't upload the INC files so I'm adding it here
PHP Code:
#if defined _dzialko_included
#endinput
#endif
#define _dzialko_included
/*
* Creating cannon near player
*
* @param id Index of player
* @param iHp HP of Cannon
* @param iDamage Basic damage of cannon[Hitboxes are not counted]
* @param Float:fCooldown Delay of each shoot [Normally 0.4sec]
*
* @return Return if invalid
*/
If there is anyone who could fix this I would be really gratefull!
native diablix_create_cannon(id, const iHp, const iDamage, const Float:fCooldown=0.4);