Raised This Month: $ Target: $400
 0% 

no


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Awesome_man
Senior Member
Join Date: May 2014
Location: singapore
Old 08-13-2014 , 09:57   no
Reply With Quote #1

no

Last edited by Awesome_man; 06-12-2015 at 23:02.
Awesome_man is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 08-13-2014 , 10:46   Re: Compile Error [HELP]
Reply With Quote #2

Quote:
Originally Posted by Awesome_man View Post
Here the code but giving compile error, and i'm unable to fix it. please someone fix this little code

PHP Code:
#include <amxmodx>
#include <fun>
#include <colorchat>
#include <jctf>

#define PLUGIN ""
#define VERSION "1.0"
#define AUTHOR ""

const TASK_ID 6969
const BonusHP 30


new g_iSync


public plugin_init(){

register_plugin("""0.2""")

register_event("DeathMsg""onDeathMsgEvent""a")
register_event("CurWeapon""onCurWeaponEvent""be""1=1")

g_iSync CreateHudSyncObj()

new 
szVersion[6]

get_cvar_string("jctf_version"szVersioncharsmax(szVersion))

if(
str_to_float(szVersion) < 1.21)
set_fail_state("jCTF is required at least v1.21 !")
}


public 
onDeathMsgEvent()
{
    new 
id read_data(1)

    new 
szWeapon[32]
    
read_data(4szWeaponcharsmax(szWeapon))

    if(
equal(szWeapon"knife") && is_user_alive(id))
    {
        new 
szName[32], szName2[32]
        
get_user_name(idszNamecharsmax(szName))
        
get_user_name(read_data(2), szName2charsmax(szName2))

        
set_hudmessage(255000.020.210.16.00.10.1, -1)
        
ShowSyncHudMsg(0g_iSync"Player %s Knifed %s HAHA"szNameszName2)

        
client_cmd(0,"spk misc/laugh")
        
ColorChat(0GREEN"^Player %s Recieved 40 Adrenaline And 40 Hp For Knifing %s"szNameszName2)


        
set_user_health(idget_user_health(id) + 30
        
jctf_add_adrenaline(id40"no reason" );  
       
        
remove_task(id TASK_ID)
    } 


simple jctf.inc add in your include folder
and then try to do locally compile

last line you forget to add
expect tokens add this also
}
Attached Files
File Type: inc jctf.inc (3.1 KB, 68 views)
__________________
Thanks everyone. #miss_you_all

Last edited by indraraj striker; 08-13-2014 at 10:50. Reason: fixed
indraraj striker is offline
Old 08-14-2014, 02:21
Awesome_man
This message has been deleted by Awesome_man.
Eagle07
Veteran Member
Join Date: May 2014
Location: Morocco :D
Old 08-13-2014 , 15:06   Re: Compile Error [HELP]
Reply With Quote #4

First remove ^ in this line

Quote:
ColorChat(0, GREEN, "^Player %s Recieved 40 Adrenaline And 40 Hp For Knifing %s", szName, szName2)
And add } in the last of plugin

_____

PHP Code:
#include <amxmodx>
#include <fun>
#include <colorchat>
#include <jctf>

#define PLUGIN ""
#define VERSION "1.0"
#define AUTHOR ""

const TASK_ID 6969
const BonusHP 30


new g_iSync


public plugin_init(){

register_plugin("""0.2""")

register_event("DeathMsg""onDeathMsgEvent""a")
register_event("CurWeapon""onCurWeaponEvent""be""1=1")

g_iSync CreateHudSyncObj()

new 
szVersion[6]

get_cvar_string("jctf_version"szVersioncharsmax(szVersion))

if(
str_to_float(szVersion) < 1.21)
set_fail_state("jCTF is required at least v1.21 !")
}


public 
onDeathMsgEvent()
{
    new 
id read_data(1)

    new 
szWeapon[32]
    
read_data(4szWeaponcharsmax(szWeapon))

    if(
equal(szWeapon"knife") && is_user_alive(id))
    {
        new 
szName[32], szName2[32]
        
get_user_name(idszNamecharsmax(szName))
        
get_user_name(read_data(2), szName2charsmax(szName2))

        
set_hudmessage(255000.020.210.16.00.10.1, -1)
        
ShowSyncHudMsg(0g_iSync"Player %s Knifed %s HAHA"szNameszName2)

        
client_cmd(0,"spk misc/laugh")
        
ColorChat(0GREEN"Player %s Recieved 40 Adrenaline And 40 Hp For Knifing %s"szNameszName2)


        
set_user_health(idget_user_health(id) + 30
        
jctf_add_adrenaline(id40"no reason" );  
       
        
remove_task(id TASK_ID)
    } 
   } 
__________________
Eagle07 is offline
Awesome_man
Senior Member
Join Date: May 2014
Location: singapore
Old 08-14-2014 , 02:35   Re: Compile Error [HELP]
Reply With Quote #5

Thanks eagle, But code not working i mean when i am knifing someone nothing happens neither i get hp , adrenaline nor hud and chat message appear ? Whats wrong please help
Awesome_man is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 08-14-2014 , 03:19   Re: Compile Error [HELP]
Reply With Quote #6

Why you remove unexisting task? Useless.
You are not precaching the sound, therefore it won't be played. For the HUD, just check out the parameters and try to put some chat messages for markers to see which exactly is not working. Some error logs may be useful, too.
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
Awesome_man
Senior Member
Join Date: May 2014
Location: singapore
Old 08-14-2014 , 03:40   Re: Compile Error [HELP]
Reply With Quote #7

Quote:
Originally Posted by Flick3rR View Post
Why you remove unexisting task? Useless.
You are not precaching the sound, therefore it won't be played. For the HUD, just check out the parameters and try to put some chat messages for markers to see which exactly is not working. Some error logs may be useful, too.
There already a line

Code:
client_cmd(0,"spk misc/laugh")
And why its not giving adrenaline ?
Also its not giving hp too

In other words plugins is just loading but not working please fix the code, i dont know scripting dat much

Last edited by Awesome_man; 08-14-2014 at 03:42.
Awesome_man is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 08-14-2014 , 04:07   Re: Compile Error [HELP]
Reply With Quote #8

It is propably from that custom include and it's requires. Check out the error logs. The code was working for me in the firat request, so that's the option left. And this is scripting help forum, so don't wait for someone to make it for you...
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
Awesome_man
Senior Member
Join Date: May 2014
Location: singapore
Old 08-14-2014 , 04:20   Re: Compile Error [HELP]
Reply With Quote #9

Quote:
Originally Posted by Flick3rR View Post
It is propably from that custom include and it's requires. Check out the error logs. The code was working for me in the firat request, so that's the option left. And this is scripting help forum, so don't wait for someone to make it for you...
L 08/14/2014 - 12:08:52: [AMXX] Run time error 10 (plugin "knife_kill.amxx") (native "ShowSyncHudMsg") - debug not enabled!
L 08/14/2014 - 12:08:52: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).

Applied debug, still not working
Awesome_man is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 08-14-2014 , 04:27   Re: Compile Error [HELP]
Reply With Quote #10

It won't work because of the debug. It just shows the error in details, so we can know exactly what's wrong. So, please post the output from the debugged error.
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
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 13:17.


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