Raised This Month: $ Target: $400
 0% 

Detect teleporting on fail at bhop map


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-11-2013 , 03:23   Detect teleporting on fail at bhop map
Reply With Quote #1

Hello everybody,

I'd like to know if its possible to detect if a player falls down at a bhop Map and gets teleported back to the beginning of that, and if so, how to do that?

Greetz,
Kia.
__________________
Kia is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 05-11-2013 , 04:21   Re: Detect teleporting on fail at bhop map
Reply With Quote #2

Hook Touch on trigger_teleport.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.

Last edited by hornet; 05-11-2013 at 04:21.
hornet is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-11-2013 , 04:27   Re: Detect teleporting on fail at bhop map
Reply With Quote #3

But if I have a map which uses teleporters this would be also called or not?
__________________
Kia is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 05-11-2013 , 04:56   Re: Detect teleporting on fail at bhop map
Reply With Quote #4

Yes it would. You could check the teleport destination entity for a certain name using pev_targetname from pev_target of the trigger entity.
However, it wouldn't be a consistent solution for every map but you don't have much of a choice.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.

Last edited by hornet; 05-11-2013 at 04:59.
hornet is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-11-2013 , 05:02   Re: Detect teleporting on fail at bhop map
Reply With Quote #5

Hmm okay, I have this code now and it's working, but as I thought it will execute the code also on teleporters.

PHP Code:
public ent_touch(ent,player)
{
    if(!
pev_valid(ent) || !pev_valid(player))
        return 
HAM_IGNORED;
    
    new 
ent_class[33];
    
pev(entpev_classname,  ent_class32)
    
    if(
equali(ent_class"trigger_teleport") && g_Impossible[player])
    {
        
user_kill(player)
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_CONTINUE

__________________
Kia is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 05-11-2013 , 05:07   Re: Detect teleporting on fail at bhop map
Reply With Quote #6

Like I said, if it's only one specific map, then find the targetname of the teleport destination and condition it that way.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-11-2013 , 05:12   Re: Detect teleporting on fail at bhop map
Reply With Quote #7

There are about 100 maps.
__________________
Kia is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 05-11-2013 , 05:17   Re: Detect teleporting on fail at bhop map
Reply With Quote #8

Well then you may have to look into other alternatives. Perhaps check the distance from the info_teleport_destination to info_player_start?
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-11-2013 , 05:37   Re: Detect teleporting on fail at bhop map
Reply With Quote #9

+ sometimes, only 1 point entity is used for destination of new zone, and for back origin if you've just failed in that new zone.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-12-2013 , 01:45   AW: Detect teleporting on fail at bhop map
Reply With Quote #10

I'll try that, thank you both for your help.
__________________
Kia is offline
Reply


Thread Tools
Display Modes

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 16:23.


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