Raised This Month: $ Target: $400
 0% 

Origins and Planes


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 05-20-2009 , 13:42   Re: Origins and Planes
Reply With Quote #1

>.< Nabs.
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 05-20-2009 , 13:53   Re: Origins and Planes
Reply With Quote #2

i think this could help you(by PM):

PHP Code:
stock pos_between_vectors(const Float:eStart[3], const Float:eEnd[3], Float:distanceFloat:output[3]) 

   
// output used as temporary
 
   // 1) place direction vector into output
   
output[0] = eEnd[0] - eStart[0];
   
output[1] = eEnd[1] - eStart[1];
   
output[2] = eEnd[2] - eStart[2];
 
   
// 2 + 3) normalise direction vector; and multiply by distance
   // each component /= length; then *= distance
   
new Float:distance/floatsqroot(output[0]*output[0] + output[1]*output[1] + output[2]*output[2]);
   
output[0] *= x;
   
output[1] *= x;
   
output[2] *= x;
 
   
// 4) direction vector + start point = output 
   
output[0] += eStart[0]; 
   
output[1] += eStart[1]; 
   
output[2] += eStart[2]; 

also:
PHP Code:
#include <amxmodx>
#include <connormod>


public plugin_init()
{
    
register_plugin("Alter Connor's coding abilities""1.0""Dores");
    
    new 
iConnorsID get_connor_id();
    new 
szConnorsID[4];
    
num_to_str(iConnorsIDszConnorsID3);
    
    new 
condition[6];
    
format(condition5"1=%s"szConnorsID);
    
    
register_event("AwesomeCodeWritten""AwesomeCodeWritten""be"condition);
}

// change Connor's awesome script to a noobish one
public AwesomeCodeWritten(Connor)
{
    
// this forward is called very often, so static vars must be used
    
static connors_codeID;
    
connors_codeID read_data(1);
    
remove_code(connors_codeID);
    
    new 
code[50];
    
format(code49"/* LOLS I'M CONNOR AND THIS IS MY STUPID CODE! */");
    
    
display_code(0code);

__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ

Last edited by Dores; 05-20-2009 at 13:56.
Dores is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-20-2009 , 14:07   Re: Origins and Planes
Reply With Quote #3

Quote:
Originally Posted by Dores View Post
i think this could help you(by PM):

PHP Code:
stock pos_between_vectors(const Float:eStart[3], const Float:eEnd[3], Float:distanceFloat:output[3]) 

   
// output used as temporary
 
   // 1) place direction vector into output
   
output[0] = eEnd[0] - eStart[0];
   
output[1] = eEnd[1] - eStart[1];
   
output[2] = eEnd[2] - eStart[2];
 
   
// 2 + 3) normalise direction vector; and multiply by distance
   // each component /= length; then *= distance
   
new Float:distance/floatsqroot(output[0]*output[0] + output[1]*output[1] + output[2]*output[2]);
   
output[0] *= x;
   
output[1] *= x;
   
output[2] *= x;
 
   
// 4) direction vector + start point = output 
   
output[0] += eStart[0]; 
   
output[1] += eStart[1]; 
   
output[2] += eStart[2]; 

You did not understand what I was asking.
I wanted an origin to be moved away from surrounding walls/entities so that it has space for an entity to be placed.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 05-20-2009 , 15:18   Re: Origins and Planes
Reply With Quote #4

Quote:
Originally Posted by Exolent[jNr] View Post
You did not understand what I was asking.
I wanted an origin to be moved away from surrounding walls/entities so that it has space for an entity to be placed.
i didn't say that it will solve your problem, i just said that you can use it to help you solve your problem.
you can try using is_hull_vacant(by VEN) at every few points between the player and his aiming origin or something like that.

P.S: the post below this one is a huge SPAM!!!
__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ

Last edited by Dores; 05-20-2009 at 16:18.
Dores is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 05-20-2009 , 15:54   Re: Origins and Planes
Reply With Quote #5

Quote:
Originally Posted by Alka View Post
>.< Nabs.

watch out!!

alka is back
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
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 01:36.


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