Raised This Month: $51 Target: $400
 12% 

Ayuda Con BUG en player!


  
 
 
Thread Tools Display Modes
Author Message
alee.cs
Member
Join Date: May 2011
Old 07-31-2013 , 22:39   Ayuda Con BUG en player!
#1

Bueno el dato es asi yo tengo el teleport del blockmaker y lo que ize es que el blocke end ( osea por donde sale cuando se teletransporta ) sea SOLIDA para que puedan pisar sobre esta misma, Bueno el problema es que cuando el player se teletransporta se bugea porque la entidad es solida, entonces yo queria saber si me podian ayudar a hacer que al teletransportarse el player aparesca sobre la entidad y no se trabe , osea que apareca arriba del teleport. creo que hay que cambiar el origin y eso . tengo 2 posibles lugares donde puede cambiarse esto pero nose cual es , le dejo el pedasito del code haci lo ven :

PHP Code:
actionTeleport(ident)
{
    new 
tele entity_get_int(entEV_INT_iuser1);
    
    if (
tele)
    {
        new 
Float:vTele[3];
        
entity_get_vector(teleEV_VEC_originvTele);
        
        if ((
id && id <= 32) && get_cvar_num("bm_telefrags") > 0)
        {
            new 
player = -1;
            
            do
            {
                
player find_ent_in_sphere(playervTele16.0);
                
                if (
player && player <= 32)
                {
                    if (
is_user_alive(player) && player != id)
                    {
                        
user_kill(player1);
                    }
                }
            }while(
player);
        }
        
        new 
Float:vOrigin[3];
        new 
origin[3];
        
entity_get_vector(entEV_VEC_originvOrigin);
        
FVecIVec(vOriginorigin);
        
        
message_begin(MSG_PVSSVC_TEMPENTITYorigin);
        
write_byte(TE_IMPLOSION);
        
write_coord(origin[0]);
        
write_coord(origin[1]);
        
write_coord(origin[2]);
        
write_byte(64);        
        
write_byte(100);    
        
write_byte(6);        
        
message_end();
        
        
entity_set_vector(idEV_VEC_originvTele);
        
        new 
Float:vVelocity[3];
        
entity_get_vector(idEV_VEC_velocityvVelocity);
        
vVelocity[2] = floatabs(vVelocity[2]);
        
entity_set_vector(idEV_VEC_velocityvVelocity);
        
        if (
get_cvar_num("bm_teleportsound") > 0)
        {
        }
    }

o esta :

PHP Code:
    while ((ent find_ent_by_class(entg_teleport_end_classname)))
    {
        
//get the origin of the teleport end entity
        
entity_get_vector(entEV_VEC_originvOrigin);
        
        
//compare this origin with all player and grenade origins
        
entinsphere = -1;
        while ((
entinsphere find_ent_in_sphere(entinspherevOrigin64.0)))
        {
            
//get classname of entity
            
new szClassname[32];
            
entity_get_string(entinsphereEV_SZ_classnameszClassname32);
            
            
//if entity is a player
            
if (entinsphere && entinsphere <= 32)
            {
                
//make sure player is alive
                
if (is_user_alive(entinsphere))
                {
                    
entNear true;
                    
                    break;
                }
            }
            
//or if entity is a grenade
            
else if (equal(szClassname"grenade"))
            {
                
entNear true;
                
                break;
            }
        }
        
        
//set the solid type of the teleport end entity depending on whether or not a player is near
        
if (entNear)
        {
            
//only do this if it is not being grabbed
            
if (entity_get_int(entEV_INT_iuser2) == 0)
            {
                
entity_set_int(entEV_INT_solidSOLID_NOT);    //can't be grabbed or deleted
            
}
        }
        else
        {
            
//get time from teleport end entity to check if it can go solid
            
new Float:fTime entity_get_float(entEV_FL_ltime);
            
            
//only set teleport end entity to solid if its 'solid not' time has elapsed
            
if (halflife_time() >= fTime)
            {
                
entity_set_int(entEV_INT_solidSOLID_BBOX);    //CAN be grabbed and deleted
            
}
        }
    } 

Last edited by alee.cs; 07-31-2013 at 22:53.
alee.cs is offline
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 07-31-2013 , 23:05   Re: Ayuda Con BUG en player!
#2

Qué tan dificil puede ser deducirlo? No hace falta ni siquiera saber programar para darse cuenta qué hay que editar para cambiar el punto donde querés que aparezca...
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
alee.cs
Member
Join Date: May 2011
Old 07-31-2013 , 23:18   Re: Ayuda Con BUG en player!
#3

sinceramente no lo se neeeeeel.- , estube leyendo pero no logro encontrarlo soy principiante por eso pido ayuda si me ayudas y me decis como es para la proxima ya lo sabre y depaso voy viendo como es gracias igual! y disculpa mi ignorancia

Last edited by alee.cs; 07-31-2013 at 23:19.
alee.cs is offline
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 07-31-2013 , 23:33   Re: Ayuda Con BUG en player!
#4

Sabes lo que significan SET y GET?
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
alee.cs
Member
Join Date: May 2011
Old 07-31-2013 , 23:58   Re: Ayuda Con BUG en player!
#5

Sisi , pero lo que nose es como poner para que sea arriba de la entidad y no en el origen :/
alee.cs is offline
UnrealT
Member
Join Date: Jul 2013
Old 08-01-2013 , 00:12   Re: Ayuda Con BUG en player!
#6

Quote:
Originally Posted by alee.cs View Post
Sisi , pero lo que nose es como poner para que sea arriba de la entidad y no en el origen :/
Toma el origin del player

luego pon origin[2] += 70

y luego setea el origin al player
UnrealT is offline
ChileScripting
BANNED
Join Date: Jan 2013
Old 08-01-2013 , 00:23   Re: Ayuda Con BUG en player!
#7

Quote:
Originally Posted by UnrealT View Post
Toma el origin del player

luego pon origin[2] += 70

y luego setea el origin al player
Si hay un techo....
ChileScripting is offline
alee.cs
Member
Join Date: May 2011
Old 08-01-2013 , 01:12   Re: Ayuda Con BUG en player!
#8

Sigo sin entendr , disculpen es que recien empiezo cn esto d los vectores y los origenes. Me podrian dcir dond es que tngo que hacerlo y que hay que cambiar? Asi veo en que me equivocaba y depaso aprendo, gracias x ayudarme aunque no entienda chicos jeje
alee.cs is offline
alee.cs
Member
Join Date: May 2011
Old 08-01-2013 , 23:38   Re: Ayuda Con BUG en player!
#9

Trate de arreglarlo y poner lo que me dijieron y ahora no me teletransporta miren:

PHP Code:
new tele entity_get_int(entEV_INT_iuser1);
    
    if (
tele)
    {
        new 
Float:vTele[3];
        
entity_get_vector(teleEV_VEC_originvTele);
        
        if ((
id && id <= 32) && get_cvar_num("bm_telefrags") > 0)
        {
            new 
player = -1;
            
            do
            {
                
player find_ent_in_sphere(playervTele16.0);
                
                if (
player && player <= 32)
                {
                    if (
is_user_alive(player) && player != id)
                    {
                        
user_kill(player1);
                    }
                }
            }while(
player);
        }
        
        new 
Float:vOrigin[3];
        new 
Float:Origen[3];
        new 
Float:vOrigan[3];
        new 
origin[3];
        
        
Origen[2] +=70.0;
        
        
vOrigan[1] = (vTele[ent] + Origen[id]);
        
        
entity_get_vector(entEV_VEC_originvOrigin);
        
FVecIVec(vOriginorigin);
        
        
message_begin(MSG_PVSSVC_TEMPENTITYorigin);
        
write_byte(TE_IMPLOSION);
        
write_coord(origin[0]);
        
write_coord(origin[1]);
        
write_coord(origin[2]);
        
write_byte(64);        
        
write_byte(100);    
        
write_byte(6);        
        
message_end();
        
        
entity_set_vector(idEV_VEC_originvOrigan);
        
        new 
Float:vVelocity[3];
        
entity_get_vector(idEV_VEC_velocityvVelocity);
        
vVelocity[2] = floatabs(vVelocity[2]);
        
entity_set_vector(idEV_VEC_velocityvVelocity);
    } 
alee.cs is offline
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 08-02-2013 , 00:12   Re: Ayuda Con BUG en player!
#10

Quote:
Originally Posted by UnrealT View Post
Toma el origin del player

luego pon origin[2] += 70

y luego setea el origin al player
porque 70? la forma correcta de hacerlo es calcular la medida de la entidad y aumentar eso +2
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
 



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:09.


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