Raised This Month: $ Target: $400
 0% 

origin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JohnBloper
Member
Join Date: Jul 2014
Old 07-22-2014 , 11:12   origin
Reply With Quote #1

How can I do that the player origin wont be exactly where he died. It will be a bit more left, or right.
Is that possible? and how
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <cstrike>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new FloatfPlayerOrigins
    
    
public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHam(Ham_Killed"player""CBasePlayer_Killed"false);
}

public 
CBasePlayer_Killed victim 
{
    if(!
is_user_connected(victim))
        return;
    
    new 
CsTeamsTeam cs_get_user_team(victim)
    
    if ( 
Team == CS_TEAM_CT 
    {
    
        
pev(victimpev_originfPlayerOrigins);
        
//here you would exec the command
    
}

JohnBloper is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-22-2014 , 11:21   Re: origin
Reply With Quote #2

You could ask in the same theard where I gave you this code. To move it increase x,y or z axis just a bit.

Increase y axis tu put him a bit into the air. Modify x axis to move him left/right.

fPlayerOrigins[ 0 ] - x axis
fPlayerOrigins[ 1 ] - y axis
fPlayerOrigins[ 2 ] - z axis

Last edited by HamletEagle; 07-22-2014 at 11:26.
HamletEagle is offline
JohnBloper
Member
Join Date: Jul 2014
Old 07-22-2014 , 11:25   Re: origin
Reply With Quote #3

Quote:
Originally Posted by HamletEagle View Post
You could ask in the same theard where I gave you this code. To move it increase x,y or z axis just a bit.

Increase y axis tu put him a bit into the air. Modify x axis to move him left/right.

fPlayerOrigins[ 0 ] - x axis
fPlayerOrigins[ 1 ] - y axis
fPlayerOrigins[ 2 ] - z axis.
I really didnt understand how. Could you give me a example in the full code? Thanks if can.

Last edited by JohnBloper; 07-22-2014 at 11:30.
JohnBloper is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 07-22-2014 , 13:15   Re: origin
Reply With Quote #4

(Gladely search, it's a clear math :O)
They are basically the three dimensions - height, lenght, width.
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
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 13:12.


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