Raised This Month: $32 Target: $400
 8% 

[FIX] Blockmaker - create teleport aiming fix.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lazarev
Veteran Member
Join Date: Sep 2008
Old 03-05-2010 , 08:47   [FIX] Blockmaker - create teleport aiming fix.
Reply With Quote #1

Hello
When you create teleport and aim at "ceiling", the teleport goes up, and we can't see it.
Look at the picture: http://img402.**************/img402/9773/teleportlol.jpg
Let's fix it!

First of all, you need to have #include <fakemeta> in the beginning of the bm.

Next step: change
PHP Code:
new const Float:gfTeleportZOffset 38.0
to
PHP Code:
new const Float:gfTeleportZOffset 16.0
Next: go to
PHP Code:
createTeleportAiming(const id, const teleportType)
{
    
//make sure player has access to this command
    
if (get_user_flags(id) & BM_ADMIN_LEVEL)
    {
        
//get where player is aiming for origin of teleport entity
        
new pOrigin[3], Float:vOrigin[3];
        
get_user_origin(idpOrigin3);
        
IVecFVec(pOriginvOrigin);
        
vOrigin[2] += gfTeleportZOffset;
        
        
//create the teleport of the given type
        
createTeleport(idteleportTypevOrigin);
    }

and change it to:
PHP Code:
createTeleportAiming(const id, const teleportType)
{
    
//make sure player has access to this command
    
if (get_user_flags(id) & BM_ADMIN_LEVEL)
    {
        
//get where player is aiming for origin of teleport entity
        
new pOrigin[3], Float:vOrigin[3];
        
get_user_origin(idpOrigin3);
        
IVecFVec(pOriginvOrigin);
        new 
Float:flCrosshairPitch get_pdata_floatid506 // m_flCrosshairPitch = 506;
        
if(0.0 <= flCrosshairPitch <= 125.0)
        {
            
vOrigin[2] -= gfTeleportZOffset;
        }
        
//create the teleport of the given type
        
createTeleport(idteleportTypevOrigin);
    }

That's all, hope you enjoyed it!

Last edited by lazarev; 05-22-2010 at 08:12.
lazarev is offline
Capell
Member
Join Date: Feb 2009
Old 03-05-2010 , 08:48   Re: [FIX] Blockmaker - create teleport aiming fix.
Reply With Quote #2

Never noticed this ;p

Thanks for fix tho
Capell is offline
JaGareN
Senior Member
Join Date: Mar 2009
Old 03-06-2010 , 13:02   Re: [FIX] Blockmaker - create teleport aiming fix.
Reply With Quote #3

I dont really understand what this do. :S Explain it more please.
JaGareN is offline
lazarev
Veteran Member
Join Date: Sep 2008
Old 03-06-2010 , 15:38   Re: [FIX] Blockmaker - create teleport aiming fix.
Reply With Quote #4

Quote:
Originally Posted by JaGareN View Post
I dont really understand what this do. :S Explain it more please.
try to create teleport like on a picture -.-
lazarev is offline
JaGareN
Senior Member
Join Date: Mar 2009
Old 03-07-2010 , 07:01   Re: [FIX] Blockmaker - create teleport aiming fix.
Reply With Quote #5

Is that black stretch a wall in the picture?
JaGareN is offline
r14170
Veteran Member
Join Date: Dec 2009
Old 03-07-2010 , 08:15   Re: [FIX] Blockmaker - create teleport aiming fix.
Reply With Quote #6

really nice drawing
r14170 is offline
lazarev
Veteran Member
Join Date: Sep 2008
Old 03-07-2010 , 10:25   Re: [FIX] Blockmaker - create teleport aiming fix.
Reply With Quote #7

Quote:
Originally Posted by JaGareN View Post
Is that black stretch a wall in the picture?
yes use your imagination
[edit] main post updated - image has more explanation

Last edited by lazarev; 03-07-2010 at 10:32.
lazarev 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 12:16.


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