Raised This Month: $ Target: $400
 0% 

help with "trigger_teleport"


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
extreme
Junior Member
Join Date: Oct 2008
Old 07-16-2010 , 12:46   help with "trigger_teleport"
Reply With Quote #1

Hello. Such a question how to find coordinates destination point of entity "triger_teleport"?
extreme is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 07-16-2010 , 13:35   Re: help with "trigger_teleport"
Reply With Quote #2

the destination of a trigger_teleport is a info_player_destination or a info_target!

Try to search
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 07-16-2010 , 13:44   Re: help with "trigger_teleport"
Reply With Quote #3

Check this:
PHP Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>

new g_start_names[100][32]
new 
g_end_names[100][32]
new 
g_start_ids[100]
new 
g_start_cnt
new g_end_ids[100]
new 
g_end_cnt


public plugin_init(){
    
register_plugin("GetTeleports""1.0""Sylwester")
    new 
tmp
    
for(new i=0i<g_start_cnti++){
        for(new 
j=0j<g_end_cntj++){
            if(
i==&& equali(g_start_names[i], g_end_names[i]))
                break
            else if(!
equali(g_start_names[i], g_end_names[j]))
                continue
            
tmp g_end_ids[i]
            
g_end_ids[i] = g_end_ids[j]
            
g_end_ids[j] = tmp
            formatex
(g_end_names[j], 31g_end_names[i])
            
formatex(g_end_names[i], 31g_start_names[i])
        }
    }
    
register_clcmd("test""test")
}

public 
test(id){
    new 
Float:o[3]
    
pev(idpev_origino)
    
client_print(0print_console"Your coords %f %f %f"o[0], o[1], o[2])
    for(new 
i=0i<g_start_cnti++){
        
pev(g_end_ids[i], pev_origino)
        
client_print(0print_console"name %s || startid %d || endid %d || end coords %f %f %f",
        
g_start_names[i], g_start_ids[i], g_end_ids[i], o[0], o[1], o[2])
    }
    return 
PLUGIN_HANDLED
}


public 
pfn_keyvalue(entid){
    new 
classname[32], key[32], value[32]
    
copy_keyvalue(classname31key31value31)
    if(
equali(classname,"trigger_teleport")){
        if(
equali(key"target")){
            
g_start_ids[g_start_cnt] = entid
            formatex
(g_start_names[g_start_cnt], 31value)
            
g_start_cnt++
        }
    }else if(
equali(classname,"info_teleport_destination")){
        if(
equali(key"targetname")){
            
g_end_ids[g_end_cnt] = entid
            formatex
(g_end_names[g_end_cnt], 31value)
            
g_end_cnt++
        }
    }

__________________
Impossible is Nothing
Sylwester is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 07-16-2010 , 13:48   Re: help with "trigger_teleport"
Reply With Quote #4

Quote:
Originally Posted by mottzi View Post
the destination of a trigger_teleport is a info_player_destination or a info_target!

Try to search
I always use info_target
__________________
I am out of order!
grimvh2 is offline
Mxnn
Veteran Member
Join Date: Aug 2009
Location: AT MY HOME
Old 07-16-2010 , 14:19   Re: help with "trigger_teleport"
Reply With Quote #5

I would add to if statement "|| equali(classname, "info_target") "
Mxnn is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 07-16-2010 , 15:15   Re: help with "trigger_teleport"
Reply With Quote #6

and info_player_destination

// yeah senior member
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
extreme
Junior Member
Join Date: Oct 2008
Old 07-16-2010 , 16:48   Re: help with "trigger_teleport"
Reply With Quote #7

Sylwester, thanks
extreme is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-19-2010 , 02:23   Re: help with "trigger_teleport"
Reply With Quote #8

You may find this code usefull : http://forums.alliedmods.net/showthread.php?p=848089
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 07:12.


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