Raised This Month: $ Target: $400
 0% 

Finding origin.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Da_sk8rboy
Veteran Member
Join Date: Jul 2006
Old 06-28-2007 , 02:03   Finding origin.
Reply With Quote #1

Okay, I feel like an idiot, I know it's something small.

Code:
#include <amxmodx> #include <amxmisc>   #define PLUGIN "Find Origin" #define VERSION "1.0" #define AUTHOR "Brit Jamerson" public plugin_init() {  register_plugin(PLUGIN, VERSION, AUTHOR)  register_clcmd("say /findorigin", "fo_base") }   public fo_base(id) {  new origin[0]  get_user_origin(id, 0) }


Not sure what I did wrong, I'm trying to find the origin whereever the player uses the say cmd
__________________
i stop around here and there.

Last edited by Da_sk8rboy; 06-28-2007 at 02:05.
Da_sk8rboy is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 06-28-2007 , 02:08   Re: Finding origin.
Reply With Quote #2

Code:
public fo_base(id) {  new origin[3]  get_user_origin(id, origin) }
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
Da_sk8rboy
Veteran Member
Join Date: Jul 2006
Old 06-28-2007 , 03:38   Re: Finding origin.
Reply With Quote #3

Quote:
/home/groups/amxmodx/tmp3/text9pyaqh.sma(17) : error 009: invalid array size (negative or zero)
/home/groups/amxmodx/tmp3/text9pyaqh.sma(17) : error 017: undefined symbol "origin"
__________________
i stop around here and there.
Da_sk8rboy is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 06-28-2007 , 04:23   Re: Finding origin.
Reply With Quote #4

SixTwin code is correct!
You have extra code?
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-28-2007 , 04:24   Re: Finding origin.
Reply With Quote #5

SixTwin is right andt it compiles fine.

What's your code exactly ?
__________________
Arkshine is offline
Da_sk8rboy
Veteran Member
Join Date: Jul 2006
Old 06-28-2007 , 05:00   Re: Finding origin.
Reply With Quote #6

Wait, I see the problem, I used:
Code:
new origin[0]
instead of:
Code:
new origin[3]
__________________
i stop around here and there.
Da_sk8rboy is offline
warlock
Senior Member
Join Date: Jan 2005
Old 06-28-2007 , 12:48   Re: Finding origin.
Reply With Quote #7

Quote:
Originally Posted by Da_sk8rboy View Post
Wait, I see the problem, I used:
Code:
new origin[0]
instead of:
Code:
new origin[3]
public fo_base(id)
{
new origin[__3___]
get_user_origin(__id, origin__)
}


You forgot the id, origin part.
__________________
Kind regards,
warlock
warlock is offline
kmal2t
BANNED
Join Date: Apr 2006
Old 06-29-2007 , 02:50   Re: Finding origin.
Reply With Quote #8

I would use this personally:
Code:
#include <amxmodx> #include <fakemeta> new Float:origin[33][3]; public plugin_init() {     register_clcmd("say /myorigin", "MyOrigin"); }   public MyOrigin(id) {     pev(id, pev_origin, origin[id]);     client_print(id, print_chat, "X: %f Y: %f Z: %f ", origin[id][0],origin[id][1],origin[id][2]); }
kmal2t 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 21:24.


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