AlliedModders

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

Balck 04-15-2013 13:14

Need Help
 
PHP Code:

#include <amxmodx>
#include <engine>

public plugin_init( )
{
    
register_plugin"D2 texture abuse fix""1.0""Simo123" );

    new 
map[32];
    
get_mapname(map31);

    if ( 
equal(map"de_dust2") )
    {
        new 
Ent create_entity"info_target" );

        
entity_set_modelEnt"models/w_shield.mdl" );
        
entity_set_originEntFloat:{440.0265.955.0} );
        
entity_set_vectorEntEV_VEC_anglesFloat:{-55.0, -40.0, -89.0} );
    }


How can i change the w_shield position :cry:

didoWEE 04-15-2013 13:46

Re: Need Help
 
Change the amounts of entity_set_origin( Ent, Float:{440.0, 265.9, 55.0} ); ???


Balck 04-15-2013 13:53

Re: Need Help
 
Quote:

Originally Posted by didoWEE (Post 1933222)
Change the amounts of entity_set_origin( Ent, Float:{440.0, 265.9, 55.0} ); ???


Yes but how to get dhe position this is my problem how can i get the position (entity_set_origin) :cry:

Backstabnoob 04-15-2013 14:01

Re: Need Help
 
what's that supposed to do?

Balck 04-15-2013 15:01

Re: Need Help
 
i will learn to get ent, float (?, ?, ?) i need this i will set some models in walls Sory for my english
So plzz help

didoWEE 04-15-2013 15:40

Re: Need Help
 
I have never used entity_set_origin.
I use entity_set_vector(index, EV_VEC_origin, {0.0, 0.0, 0.0})
And to get the origin I use:
PHP Code:

new VecFlOrigin[3];
entity_get_vector(indexEV_VEC_originVecFlOrigin); 


baneado 04-15-2013 16:08

Re: Need Help
 
to get origins you can make a plugin test, for example make when you write in chat /myorigin use entity_get_vector(...) and show a print with this origin

Balck 04-15-2013 17:37

Re: Need Help
 
thanks both :)

but what should I add here


PHP Code:

#include <amxmodx>
#include <engine>

public plugin_init()
{
    
register_plugin("PLUGIN""VERSION""AUTHOR")
    
register_clcmd("say /myposition""setori")       
}

public 
setori(id)
{   
    new 
VecFlOrigin[3];
    
entity_get_vectoridEV_VEC_originVecFlOrigin );


because this is not working

hornet 04-16-2013 00:37

Re: Need Help
 
Quote:

Originally Posted by Balck (Post 1933359)
thanks both :)

but what should I add here


PHP Code:

#include <amxmodx>
#include <engine>

public plugin_init()
{
    
register_plugin("PLUGIN""VERSION""AUTHOR")
    
register_clcmd("say /myposition""setori")       
}

public 
setori(id)
{   
    new 
VecFlOrigin[3];
    
entity_get_vectoridEV_VEC_originVecFlOrigin );


because this is not working

Because you didn't make VecFlOrigin a float, not to mention that you didn't make it print anything.

Code:
#include <amxmodx> #include <engine> public plugin_init() {     register_plugin("PLUGIN", "VERSION", "AUTHOR")     register_clcmd("say /myposition", "setori")       } public setori(id) {       new Float:VecFlOrigin[3];     entity_get_vector( id, EV_VEC_origin, VecFlOrigin );         client_print( id, print_chat, "Your origin is: %f %f %f", VecFlOrigin[ 0 ], VecFlOrigin[ 1 ], VecFlOrigin[ 2 ] ); }

Balck 04-16-2013 07:38

Re: Need Help
 
Quote:

Originally Posted by hornet (Post 1933471)
Because you didn't make VecFlOrigin a float, not to mention that you didn't make it print anything.

Code:
#include <amxmodx> #include <engine> public plugin_init() {     register_plugin("PLUGIN", "VERSION", "AUTHOR")     register_clcmd("say /myposition", "setori")       } public setori(id) {       new Float:VecFlOrigin[3];     entity_get_vector( id, EV_VEC_origin, VecFlOrigin );         client_print( id, print_chat, "Your origin is: %f %f %f", VecFlOrigin[ 0 ], VecFlOrigin[ 1 ], VecFlOrigin[ 2 ] ); }

Thanks man you are the best :)

and can you learn me how to make entity_set_vector( Ent, EV_VEC_angles, Float:{-55.0, -40.0, -89.0}


All times are GMT -4. The time now is 10:55.

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