Solucionado Paracaidas para ct y tt aparte
#1
Buenas noches! como puedo hacer para que los ct y tt tengan skin de paracaidas distintos
Código PHP:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <cstrike>
#include <fun>

new para_ent[33]

public 
plugin_init()
{
    register_plugin("Pre Paracaidas""1.3 Fixed""KRoT@L/JTP10181 & Fixed sector")

    register_event("ResetHUD""newSpawn""be")
    register_event("DeathMsg""death_event""a")
}

public 
plugin_natives()
{
    set_native_filter("native_filter")
}

public 
native_filter(const name[], indextrap)
{
    if (!trap) return PLUGIN_HANDLED
    
return PLUGIN_CONTINUE
}

public 
plugin_precache()
{
    precache_model("models/parachute.mdl")
}

public 
client_connect(id)
{
    parachute_reset(id)
}

public 
client_disconnected(id)
{
    parachute_reset(id)
}

public 
death_event()
{
    new id read_data(2)
    parachute_reset(id)
}

parachute_reset(id)
{
    if(para_ent[id] > 0
    {
        if (is_valid_ent(para_ent[id])) 
        {
            remove_entity(para_ent[id])
        }
    }

    if(is_user_alive(id)) set_user_gravity(id1.0)
    para_ent[id] = 0
}

public 
newSpawn(id)
{
    if(para_ent[id] > 0
    {
        remove_entity(para_ent[id])
        set_user_gravity(id1.0)
        para_ent[id] = 0
    
}
}

public 
client_PreThink(id)
{
    if(!is_user_alive(id)) return
    
    
new Float:fallspeed 100 * -1.0
    
new Float:frame
    
new button get_user_button(id)
    new oldbutton get_user_oldbutton(id)
    new flags get_entity_flags(id)
    if(para_ent[id] > && (flags FL_ONGROUND)) 
    {
        if(get_user_gravity(id) == 0.1set_user_gravity(id1.0)
        {
            if(entity_get_int(para_ent[id],EV_INT_sequence) != 2
            {
                entity_set_int(para_ent[id], EV_INT_sequence2)
                entity_set_int(para_ent[id], EV_INT_gaitsequence1)
                entity_set_float(para_ent[id], EV_FL_frame0.0)
                entity_set_float(para_ent[id], EV_FL_fuser10.0)
                entity_set_float(para_ent[id], EV_FL_animtime0.0)
                entity_set_float(para_ent[id], EV_FL_framerate0.0)
                return
            }
            frame entity_get_float(para_ent[id],EV_FL_fuser1) + 2.0
            entity_set_float
(para_ent[id],EV_FL_fuser1,frame)
            entity_set_float(para_ent[id],EV_FL_frame,frame)
            if(frame 254.0
            {
                remove_entity(para_ent[id])
                para_ent[id] = 0
            
}
            else 
            {
                remove_entity(para_ent[id])
                set_user_gravity(id1.0)
                para_ent[id] = 0
            
}
            return
        }
    }
    if (button IN_USE
    {
        new Float:velocity[3]
        entity_get_vector(idEV_VEC_velocityvelocity)
        if(velocity[2] < 0.0
        {
            if(para_ent[id] <= 0
            {
                para_ent[id] = create_entity("info_target")
                if(para_ent[id] > 0
                {
                    entity_set_string(para_ent[id],EV_SZ_classname,"parachute")
                    entity_set_edict(para_ent[id], EV_ENT_aimentid)
                    entity_set_edict(para_ent[id], EV_ENT_ownerid)
                    entity_set_int(para_ent[id], EV_INT_movetypeMOVETYPE_FOLLOW)
                    entity_set_model(para_ent[id], "models/parachute.mdl")
                    entity_set_int(para_ent[id], EV_INT_sequence0)
                    entity_set_int(para_ent[id], EV_INT_gaitsequence1)
                    entity_set_float(para_ent[id], EV_FL_frame0.0)
                    entity_set_float(para_ent[id], EV_FL_fuser10.0)
                }
            }
            if(para_ent[id] > 0
            {
                entity_set_int(idEV_INT_sequence3)
                entity_set_int(idEV_INT_gaitsequence1)
                entity_set_float(idEV_FL_frame1.0)
                entity_set_float(idEV_FL_framerate1.0)
                set_user_gravity(id0.1)
                velocity[2] = (velocity[2] + 40.0 fallspeed) ? velocity[2] + 40.0 fallspeed
                entity_set_vector
(idEV_VEC_velocityvelocity)
                if(entity_get_int(para_ent[id],EV_INT_sequence) == 0
                {
                    frame entity_get_float(para_ent[id],EV_FL_fuser1) + 1.0
                    entity_set_float
(para_ent[id],EV_FL_fuser1,frame)
                    entity_set_float(para_ent[id],EV_FL_frame,frame)
                    if (frame 100.0
                    {
                        entity_set_float(para_ent[id], EV_FL_animtime0.0)
                        entity_set_float(para_ent[id], EV_FL_framerate0.4)
                        entity_set_int(para_ent[id], EV_INT_sequence1)
                        entity_set_int(para_ent[id], EV_INT_gaitsequence1)
                        entity_set_float(para_ent[id], EV_FL_frame0.0)
                        entity_set_float(para_ent[id], EV_FL_fuser10.0)
                    }
                }
            }
        }
        else if(para_ent[id] > 0
        {
            remove_entity(para_ent[id])
            set_user_gravity(id1.0)
            para_ent[id] = 0
        
}
    }
    else if((oldbutton IN_USE) && para_ent[id] > 
    {
        remove_entity(para_ent[id])
        set_user_gravity(id1.0)
        para_ent[id] = 0
    
}

Pawn Básico no critiquen xD  Approved

Responder
#2
if (get_user_team(id) === 2) {
entity_set_model(para_ent[id], "models/parachute1.mdl");
} else {
entity_set_model(para_ent[id], "models/parachute2.mdl");
}
[Imagen: zcsztw-4.png] [Imagen: 6u5fj2-4.png]
[Imagen: linkedin_thumb_image.png][Imagen: 76561198283253977.png][Imagen: linkedin_thumb_image.png]
Responder
#3
(21/09/2021, 01:23 AM)Hinami escribió: if (get_user_team(id) === 2) {
  entity_set_model(para_ent[id], "models/parachute1.mdl");
} else {
  entity_set_model(para_ent[id], "models/parachute2.mdl");
}

Gracias
Pawn Básico no critiquen xD  Approved

Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)