Raised This Month: $ Target: $400
 0% 

Problems teleporting players.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Korxu
Senior Member
Join Date: Sep 2010
Old 07-28-2011 , 10:54   Problems teleporting players.
Reply With Quote #1

Hi all ;).

I have this code to move the player to which this aim.
PHP Code:
public f_user_jump(id) {
    if (
is_user_alive(id)) {
        new 
old_or[3], new_or[3]
        
        
get_user_origin(idold_or)
        
get_user_origin(idnew_or3)
                
        
new_or[0] += (( new_or[0] - old_or[0] > 0) ? -50 50)
        
new_or[1] += (( new_or[1] - old_or[1] > 0) ? -50 50)
        
new_or[2] += 20
        
        set_user_origin
(idnew_or)
        
        if(
user_jump_stuck(id)) {
            
set_user_origin(idold_or)
        }
    }
    return 
PLUGIN_HANDLED
}
stock user_jump_stuck(id) {
    new 
Float:origin[3]
    
pev(idpev_originorigin)
    
    
engfunc(EngFunc_TraceHulloriginoriginIGNORE_MONSTERSpev(idpev_flags ) & FL_DUCKING HULL_HEAD HULL_HUMANid0)
    
    return 
get_tr2(0TR_StartSolid)

When the player moves, it goes straight to where it was pointing, but it moves to the side or slightly above. As I can make it go where it points without being pinched on the wall?

And finally, are there a better way to do this?.

Thanks and sorry for my English. Bye ^^.

Last edited by Korxu; 07-28-2011 at 13:11. Reason: UPDATED ENGLISH.
Korxu is offline
Leon M.
Senior Member
Join Date: Apr 2009
Location: Germany
Old 07-29-2011 , 05:46   Re: Problems teleporting players.
Reply With Quote #2

No Feedback -.-
__________________
  • ZapTic - Paintball (Version 7.1.3 b1303)
  • Your #1 CS Paintball Server since 2008
  • 85.131.163.101:27015

Last edited by Leon M.; 08-02-2011 at 09:39.
Leon M. 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 00:51.


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