Raised This Month: $ Target: $400
 0% 

Help with maps and plugins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Arphenius
Junior Member
Join Date: Jan 2009
Old 01-09-2009 , 14:39   Help with maps and plugins
Reply With Quote #1

Hello. I'm working on a plugin, and this plugin requires some informations of the current position of the players in a custom map I made. I don't know how to get the position of the players, and if this is possible, I think is better to make the map send informations when some player touch a defined block. I need help with this problem. Thanks
Arphenius is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 01-09-2009 , 14:44   Re: Help with maps and plugins
Reply With Quote #2

I suggest that you read some includes before posting.
Quote:
/* Gets origin from player.
* Modes:
* 0 - current position.
* 1 - position from eyes (weapon aiming).
* 2 - end position from player position.
* 3 - end position from eyes (hit point for weapon).
* 4 - position of last bullet hit (only CS). */
native get_user_origin(index, origin[3], mode = 0);
SnoW is offline
Send a message via MSN to SnoW
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-09-2009 , 14:45   Re: Help with maps and plugins
Reply With Quote #3

You can get the X,Y,Z of the player in multiple ways:

Code:
#include <amxmodx> new origin[3]; get_user_origin(id, origin);

Code:
#include <fakemeta> new Float:origin[3]; pev(id, pev_origin, origin);

Code:
#include <engine> new Float:origin[3]; entity_get_vector(id, EV_VEC_origin, origin);

origin[0] = X coordinate
origin[1] = Y coordinate
origin[2] = Z coordinate
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Arphenius
Junior Member
Join Date: Jan 2009
Old 01-09-2009 , 15:19   Re: Help with maps and plugins
Reply With Quote #4

Wow, thanks for the help and sorry for not searching. I will use the

Code:
#include <amxmodx>

new origin[3];
get_user_origin(id, origin);
but I don't know how to get the position of my char in-game, playing with my map, so I can add the positions in the script. There is a way to make a trigger in my map and make my plugin verify if one player touched it? I think this way is better. Thank you all
Arphenius is offline
Reply



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 09:14.


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