AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Put vector looks like (https://forums.alliedmods.net/showthread.php?t=121609)

S34Qu4K3 03-17-2010 15:59

Put vector looks like
 
I´m working with this code:
PHP Code:

#include <amxmodx> 
 #include <amxmisc> 
 #include <engine> 
 
 
new g_Classname [] = "func_car" 
 
new g_Model [] = "models/bigtree.mdl" 
 
 
public plugin_init () 
 { 
 
register_plugin "OMFG" "HAX" "LOL" 
 
 
register_clcmd "say /model" "CmdSayCar" 
 
 
register_touch g_Classname "player" "TouchCar" 
 } 
 
 public 
plugin_precache () 
 
precache_model g_Model 
 
 public 
CmdSayCar id 
 { 
 new 
Ent create_entity "info_target" 
 
entity_set_string Ent EV_SZ_classname g_Classname 
 
entity_set_model Ent g_Model 
 
entity_set_int Ent EV_INT_solid SOLID_TRIGGER 
 
entity_set_size Ent Float :{- 50.0 ,- 50.0 ,- 50.0 }, Float :{ 50.0 50.0 50.0 }) 
 
entity_set_edict Ent EV_ENT_owner id 
 } 
 
 public 
TouchCar Ptd Ptr 
 { 
 new 
Owner entity_get_edict Ptd EV_ENT_owner 
 if( 
Owner != Ptr 
 return 
 
 
client_print Ptr print_chat "You have used this car. Due to time purposes, I'm not going to add code beyond this." 
 } 

And wanted to know how to put the vector look. Place the model where you are watching

Somebody help me?

Srry for my english

Xellath 03-17-2010 16:24

Re: Put vector looks like
 
http://www.amxmodx.org/funcwiki.php?go=func&id=162

Use that and set the mode parameter to 3.

Quote:

Originally Posted by Funcwiki
If mode is passed, the origin changes:
0 - current position (Default)
1 - Position from eyes (weapon aiming)
2 - End position from player position
3 - End position from eyes (hit point for weapon)
4 - Position from last bullet hit (only CS)


S34Qu4K3 03-17-2010 16:46

Re: Put vector looks like
 
Yes i read this tutorial and i make this code:
PHP Code:


    
new Ent create_entity("info_target")
    new 
origin[3]
    
get_user_origin(indexorigin);
    
entity_set_origin(idorigin)
    
entity_set_string(Ent,EV_SZ_classname,g_Classname)
    
entity_set_model(Ent,g_Model)
    
entity_set_int(Ent,EV_INT_solid,SOLID_TRIGGER)
    
entity_set_size(Ent,Float:{-50.0,-50.0,-50.0},Float:{50.0,50.0,50.0})
    
entity_set_edict(Ent,EV_ENT_owner,id

But it doesn´t work


All times are GMT -4. The time now is 08:45.

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