This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Hook Dat DeathMsg!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
thebobjones34
Member
Join Date: Oct 2006
Old 08-25-2007 , 08:59   Hook Dat DeathMsg!
Reply With Quote #1

Okay yeah, first time with events and i dont know what im doing wrong. Like when i kill who evers id is passed into PlayerCT it doesnt reg it.
Code:
public hook_DeathMsg() {     new Victim = read_data(2) //get the second message parameter     if(g_Dueling == 1) {         if(is_user_dueling(Victim)) {             duelEND(Victim)         }     }     return PLUGIN_CONTINUE }                 /* returns wether or not if the user is dueling */ public is_user_dueling(id) {     if(g_Dueling == 1) {         if(g_PlayerCT == id || g_PlayerT == id)             return 1     }     return 0 }
__________________
thebobjones34 is offline
Send a message via AIM to thebobjones34
X-Script
BANNED
Join Date: Jul 2007
Location: (#504434)
Old 08-25-2007 , 09:55   Re: Hook Dat DeathMsg!
Reply With Quote #2

Compile it, and what are your errors?
X-Script is offline
thebobjones34
Member
Join Date: Oct 2006
Old 08-25-2007 , 09:59   Re: Hook Dat DeathMsg!
Reply With Quote #3

Read the post properly next time...
Quote:
Originally Posted by thebobjones34
Like when i kill who evers id is passed into PlayerCT it doesnt reg it.
My plugin compiles no errors. Its a logic error somewhere in there.


Full Code Here -> http://ampaste.net/80927
__________________

Last edited by thebobjones34; 08-25-2007 at 10:02. Reason: added code
thebobjones34 is offline
Send a message via AIM to thebobjones34
Old 08-25-2007, 10:00
X-Script
This message has been deleted by X-Script. Reason: Hold on
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 08-25-2007 , 13:55   Re: Hook Dat DeathMsg!
Reply With Quote #4

Looks like you are hooking the DeathMsg wrong. I really didn't look much at the rest of your code so I don't know if there are any other mistakes.

Change...
register_event("DeathMsg","hook_DeathMsg","b" )

To...
register_event("DeathMsg", "hook_DeathMsg", "a", "1>0")
hlstriker is offline
thebobjones34
Member
Join Date: Oct 2006
Old 08-25-2007 , 18:36   Re: Hook Dat DeathMsg!
Reply With Quote #5

Thanks Works now
__________________
thebobjones34 is offline
Send a message via AIM to thebobjones34
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 12:52.


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