AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   origins (https://forums.alliedmods.net/showthread.php?t=205140)

daniel46 01-07-2013 09:42

origins
 
so i want to do an option that will send you to the enemy and +50 distance from hemm

lets say i look forward and i do this option i want to teleport to hemm so i teleport to hess origin and +50 distance to the side i looked forward

Neeeeeeeeeel.- 01-07-2013 10:33

Re: origins
 
I use this code to push players on laserspawn to prevent player's stuck. You can modify the values to do what you need.

PHP Code:

new Float:uOrigin], new Float:laserOrigin];
pevidpev_originuOrigin );
pevlaser_entpev_originlaserOrigin );

uOrigin] = ( uOrigin] - laserOrigin] ) * 13.0;
uOrigin] = ( uOrigin] - laserOrigin] ) * 13.0;
uOrigin] = ( uOrigin] - laserOrigin] ) + 185.0;

set_pevidpev_velocityuOrigin ); 


daniel46 01-07-2013 10:52

Re: origins
 
no you know what i need i have the problem of that i dont know what origin to add to player if its x or y cause i can look forward as y and i can look forward as x and some times when player higher then me z so when i teleport i want to do +50 to the origin of the enemy where i looked so its hard

Neeeeeeeeeel.- 01-07-2013 10:55

Re: origins
 
Quote:

Originally Posted by daniel46 (Post 1868862)
no you know what i need i have the problem of that i dont know what origin to add to player if its x or y cause i can look forward as y and i can look forward as x and some times when player higher then me z so when i teleport i want to do +50 to the origin of the enemy where i looked so its hard

I don't understand what you are trying to say. Please explain it clearly.

daniel46 01-07-2013 15:28

Re: origins
 
example:

mt origin is 255 255 50 i look at my ENEMY he is at 305 255 50 so i want to teleport to hemm and +50 to hes origin to make it if i aim at forward so 355 255 50 if i look forward and its on the y[ origin 2] its will be 305 305 50 and like this...


All times are GMT -4. The time now is 13:37.

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