Raised This Month: $51 Target: $400
 12% 

hostages, vip escape


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 11-16-2014 , 08:43   hostages, vip escape
Reply With Quote #1

How can i detect when some hostage has been rescued?
How can i detect when vip has reach escape zone?
__________________
Jhob94 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-16-2014 , 09:51   Re: hostages, vip escape
Reply With Quote #2

Code:
register_logevent ("OnPlayerAction", 3, "1=triggered") public OnPlayerAction( ) {         new loguser[ 80 ], szName[ 32 ], szEvent[ 64 ]     read_logargv(0, loguser, charsmax(loguser))     read_logargv(2, szEvent, charsmax(szEvent))     parse_loguser(loguser, szName, charsmax(szName))         new id = get_user_index(szName)         if(equal(szEvent, "Rescued_A_Hostage"))     {     //rescued a  hostage     }         else if(equal(szEvent, "Escaped_As_VIP"))     {     //vip escaped     } }
__________________
HamletEagle is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 11-16-2014 , 10:27   Re: hostages, vip escape
Reply With Quote #3

I also need to check when someone kills hostage or the VIP. This event also can detect who is the killer?
__________________
Jhob94 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-16-2014 , 11:08   Re: hostages, vip escape
Reply With Quote #4

For hostage kill: you can hook Ham_Killed with hostage as classname.
Or you can do:
Code:
else if(equal(szEvent, "Killed_A_Hostage")) {         }

To check for vip kill hook TakeDamage and check if the victim is vip:
Code:
native cs_get_user_vip(index)
__________________

Last edited by HamletEagle; 11-16-2014 at 12:41.
HamletEagle is offline
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 11-16-2014 , 12:46   Re: hostages, vip escape
Reply With Quote #5

@HamletEagle: Just curious, where did you get those events' name and their infos?

Last edited by RateX; 11-16-2014 at 12:46.
RateX is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-16-2014 , 13:00   Re: hostages, vip escape
Reply With Quote #6

Quote:
Originally Posted by RateX View Post
@HamletEagle: Just curious, where did you get those events' name and their infos?
Searched around the forum some time ago and learned them )
__________________
HamletEagle is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 11-16-2014 , 14:03   Re: hostages, vip escape
Reply With Quote #7

Indeed there is much information that isnt easy to find. Events is one of them.
__________________
Jhob94 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-16-2014 , 14:19   Re: hostages, vip escape
Reply With Quote #8

But I hope that I helped you with my posts. Is something that you don't understood ?
__________________
HamletEagle is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 11-16-2014 , 15:58   Re: hostages, vip escape
Reply With Quote #9

Quote:
Originally Posted by HamletEagle View Post
But I hope that I helped you with my posts. Is something that you don't understood ?
I dont.
read_logargv(0, loguser, charsmax(loguser))
When i check for the message that vip has been assassinated, will it return me who's name? VIP or killer?
__________________
Jhob94 is offline
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 15:53.


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