Raised This Month: $ Target: $400
 0% 

Help - Box


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ssanty
New Member
Join Date: Aug 2014
Old 09-09-2021 , 21:01   Help - Box
Reply With Quote #1

[en]
Hello good evening. My help is, I want the box to be in place when it is released and it only moves up and down again, always fulfilling the movement until it is picked up. Thanks!

[es]
Hola, buenas noches. Mi ayuda es, quiero que la caja al soltarla que este en el lugar y solamente se mueva hacia arriba y vuelva a bajar, siempre cumpliendo el movimiento hasta que sea recogida. Gracias!

PHP Code:
public dropear(id) {
    if(!
is_user_alive(id)) return PLUGIN_HANDLED
    
    
if(g_regalitos >= get_pcvar_num(cvar_limite)) {
        
set_hudmessage(255000.00.8016.012.0)
        
show_hudmessage(id"Limite de regalitos alcanzado")
        return 
PLUGIN_HANDLED
    
}
    if(
can_pickup[id] != false) {
        
can_pickup[id] = false
        set_task
(0.1"reset_pick"id)
        
        new 
Float:Speed[3]
        
velocity_by_aim(id0Speed)
        
dropear2(idSpeed)
        
g_regalitos++
        
        
set_hudmessage(025500.00.8016.012.0)
        
show_hudmessage(id"Regalitos en mapa: %d"g_regalitos)
    }
    return 
PLUGIN_HANDLED
}
public 
dropear2(idFloat:Speed[]) {
    new 
ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"))
    
    new 
Float:origin[3]
    
pev(idpev_originorigin)
    
set_pev(entpev_originorigin)
    
    
Speed[2] += 100.0
    set_pev
(entpev_velocitySpeed)
    
    new 
Float:angles[3]
    
pev(entpev_angles,angles)
    
angles[1] += random_num(1,360)
    
set_pev(entpev_anglesangles)
    
    
set_pev(entpev_classname"regalitos_volando")
    
engfunc(EngFunc_SetModelentMDL)
    
engfunc(EngFunc_SetSizeentFloat:{-0.00, -0.33, -100.0}, Float:{0.000.33100.0})
    
set_pev(entpev_solidSOLID_TRIGGER)
    
set_pev(entpev_movetypeMOVETYPE_NOCLIP)
    
engfunc(EngFunc_DropToFloorent)
    
    
colores(ent)    

Ssanty is offline
Reply



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 11:34.


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