Raised This Month: $ Target: $400
 0% 

map coordinates


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 07-22-2009 , 19:53   map coordinates
Reply With Quote #1

Well i have problems with coordinates...

I have 2 questions...

First: How to get coordinates of the map?
Second: How to use this coordinates to teleport a player?

To get the coordinates i tried to use "status" in console or "amx_teleportmenu". Then in the plugin code i writed:

PHP Code:
set_pev(idpev_origin, {3160, -3479, -682}) 
But i teleported to another part of the map.... why? what i am doing wrong?

Thx to much
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-22-2009 , 19:56   Re: map coordinates
Reply With Quote #2

PHP Code:
set_pev(idpev_originFloat:{3160.0, -3479.0, -682.0}) 
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 07-22-2009 , 20:14   Re: map coordinates
Reply With Quote #3

Oh, thx Exolent.. work perfect.

And, how to set the angles?
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-22-2009 , 20:43   Re: map coordinates
Reply With Quote #4

set_pev( id, pev_angles, ?? );
__________________
Arkshine is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 07-22-2009 , 23:38   Re: map coordinates
Reply With Quote #5

Mmm.. sry i dont understand at all...

you mean something like this?:

PHP Code:
set_pev(idpev_origin"here the angless",  Float:{3160.0, -3479.0, -682.0}) 
And how can i get the angles? with a plugin or what?
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 07-22-2009 , 23:45   Re: map coordinates
Reply With Quote #6

Set angles just as you do with pev_origin except use pev_angles.

PHP Code:
set_pevid pev_angles Float:{ 3160.0 , -3479.0 , -682.0 } );

//or, using a variable

new FloatfAngles];
fAngles] = 3260.0;
fAngles] = -3479.0;
fAngles] = -682.0;
set_pevid pev_angles fAngles ); 
To get angles\origin:
PHP Code:
new FloatfOrigin];
pevid pev_origin fOrigin );

new 
FloatfAngles];
pevid pev_angles fAngles ); 
__________________
Bugsy is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 07-23-2009 , 00:48   Re: map coordinates
Reply With Quote #7

Wow, rly thx Bugsy...

and sry Arkshine... i didnt notice the "pev_angles":

Quote:
Originally Posted by Arkshine View Post
set_pev( id, pev_angles, ?? );
Now i understand... thx too

And i have a quesiton... this code is fine?

PHP Code:
#include <amxmodx>
#include <fakemeta>

#define PLUGIN    "Get angles & origin"
#define AUTHOR    "Alucard"
#define VERSION    "1.0"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /origin""get_origin")
    
register_clcmd("say /angles""get_angles")
}

public 
get_origin(id)
{
    new 
FloatfOrigin]
    
pevid pev_origin fOrigin )
    
client_print(idprint_chat"origin: %f, %f, %f"fOrigin[0], fOrigin[1], fOrigin[2])
    return 
PLUGIN_HANDLED
}

public 
get_angles(id)
{
    new 
FloatfAngles]
    
pevid pev_angles fAngles )
    
client_print(idprint_chat"angles: %f, %f, %f"fAngles[0], fAngles[1], fAngles[2])
    return 
PLUGIN_HANDLED

I tested and i think work fine but... with /origin and "status" have some differences... see an example:

With /origin:

Quote:
origin: 3113.025146, -3715.923095, -699.96875
With command "status":

Quote:
3113 x, -3715 y, -682 z
Maybe the decimals doesnt import at all but... the z is different...
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-23-2009 , 12:52   Re: map coordinates
Reply With Quote #8

AMXX gives the exact coordinates.
Were you crouching when you did one coordinates and not the other?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 07-23-2009 , 18:24   Re: map coordinates
Reply With Quote #9

Well dont know why the code give me differents coordinates but i didnt crouch. But this is not the problem right now... cuz the cordinates work perfect.

The problem is the angles... doesnt work... maybe cuz i get 0.0000 Z... see:

PHP Code:
set_pev(idpev_originFloat:{1118.717163866.860046, -827.968750})
set_pev(idpev_anglesFloat:{-2.620239, -90.1428220.0000}) 
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 07-23-2009 , 19:01   Re: map coordinates
Reply With Quote #10

A good method And it's easy to look at:
http://forums.alliedmods.net/showthr...357#post879357
The "Z" axis is the up/down. You should be in the middle of the map or so with giving it 0.0
__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
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 18:17.


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