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

[ZP][Ayuda] Ayuda con menu de granadas


  
 
 
Thread Tools Display Modes
ChileScripting
BANNED
Join Date: Jan 2013
Old 02-28-2013 , 11:19   Re: [ZP][Ayuda] Ayuda con menu de granadas
#41

GokuX piensa lo que hablas ya llevas hablando estupideces durante muchos post, si seteo una variable de verdadera en una bomba y tiene 2 bombas el index las dos seran verdaderas.
ChileScripting is offline
GokuX
BANNED
Join Date: Jun 2011
Location: Quilpué , Chile
Old 03-01-2013 , 17:52   Re: [ZP][Ayuda] Ayuda con menu de granadas
#42

Quote:
Originally Posted by ChileScripting View Post
GokuX piensa lo que hablas ya llevas hablando estupideces durante muchos post, si seteo una variable de verdadera en una bomba y tiene 2 bombas el index las dos seran verdaderas.
No llevo hablando estupideces pero tu piensa: nunca hablamos de que tenga 2 cosas una variable yo hablo de 1 cosa ahi de la mismo y no te sobres tanto :s
GokuX is offline
Bernii
BANNED
Join Date: Feb 2013
Location: Weed Land *-*
Old 03-02-2013 , 15:28   Re: [ZP][Ayuda] Ayuda con menu de granadas
#43

[QUOTE]
PHP Code:
public fw_ThinkGrenade(entity

    
// Invalid entity 
    
if (!pev_valid(entity)) return HAM_IGNORED
     
    
// Get damage time of grenade 
    
static Float:dmgtimeFloat:current_time 
    pev
(entitypev_dmgtimedmgtime
    
current_time get_gametime() 
     
    
// Check if it's time to go off 
    
if (dmgtime current_time
        return 
HAM_IGNORED
     
    
// Check if it's one of our custom nades 
    
switch (pev(entityPEV_NADE_TYPE)) 
    { 
        case 
NADE_TYPE_INFECTION// Infection Bomb 
        

            
infection_explode(entity
            return 
HAM_SUPERCEDE
        } 
        case 
NADE_TYPE_NAPALM// Napalm Grenade 
        

            
fire_explode(entity
            return 
HAM_SUPERCEDE
        } 
        case 
NADE_TYPE_FROST// Frost Grenade 
        

            
frost_explode(entity
            return 
HAM_SUPERCEDE
        } 
                       case 
NADE_TYPE_CAMPO
        { 
                           static 
duration 
                    duration 
pev(entityPEV_FLARE_DURATION
             
                    
// Already went off, do lighting loop for the duration of PEV_FLARE_DURATION 
                    
if (duration 0
                    { 
                        
// Check whether this is the last loop 
                    
if (duration == 1
                    { 
                        
// Get rid of the flare entity 
                        
engfunc(EngFunc_RemoveEntityentity
                        return 
HAM_SUPERCEDE
                    } 
                 
                    
bubble_explode(entity)  
                 
                        
// Set time for next loop 
                    
set_pev(entityPEV_FLARE_DURATION, --duration
                    
set_pev(entitypev_dmgtimecurrent_time 5.0
                    } 
                    
// Light up when it's stopped on ground 
                    
else if ((pev(entitypev_flags) & FL_ONGROUND) && fm_get_speed(entity) < 10
                    { 
                    
// Flare sound 
                    
static sound[64
                    
ArrayGetString(grenade_flarerandom_num(0ArraySize(grenade_flare) - 1), soundcharsmax(sound)) 
                    
emit_sound(entityCHAN_WEAPONsound1.0ATTN_NORM0PITCH_NORM
                 
                    
// Set duration and start lightning loop on next think 
                    
set_pev(entityPEV_FLARE_DURATIONget_pcvar_num(cvar_flareduration)/5
                    
set_pev(entitypev_dmgtimecurrent_time 0.1
                    } 
                    else 
                    { 
                    
// Delay explosion until we hit ground 
                    
set_pev(entitypev_dmgtimecurrent_time 0.5
                    } 
        } 
        case 
NADE_TYPE_FLARE// Flare 
        

            
// Get its duration 
            
static duration 
            duration 
pev(entityPEV_FLARE_DURATION
             
            
// Already went off, do lighting loop for the duration of PEV_FLARE_DURATION 
            
if (duration 0
            { 
                
// Check whether this is the last loop 
                
if (duration == 1
                { 
                    
// Get rid of the flare entity 
                    
engfunc(EngFunc_RemoveEntityentity
                    return 
HAM_SUPERCEDE
                } 
                 
                
// Light it up! 
                
flare_lighting(entityduration
                 
                
// Set time for next loop 
                
set_pev(entityPEV_FLARE_DURATION, --duration
                
set_pev(entitypev_dmgtimecurrent_time 5.0
            } 
            
// Light up when it's stopped on ground 
            
else if ((pev(entitypev_flags) & FL_ONGROUND) && fm_get_speed(entity) < 10
            { 
                
// Flare sound 
                
static sound[64
                
ArrayGetString(grenade_flarerandom_num(0ArraySize(grenade_flare) - 1), soundcharsmax(sound)) 
                
emit_sound(entityCHAN_WEAPONsound1.0ATTN_NORM0PITCH_NORM
                 
                
// Set duration and start lightning loop on next think 
                
set_pev(entityPEV_FLARE_DURATIONget_pcvar_num(cvar_flareduration)/5
                
set_pev(entitypev_dmgtimecurrent_time 0.1
            } 
            else 
            { 
                
// Delay explosion until we hit ground 
                
set_pev(entitypev_dmgtimecurrent_time 0.5
            } 
        } 
    } 
     
    return 
HAM_IGNORED

[QUOTE]

OMG! Funcionar funciona pero a saber la de warnings que te manda. Se te debe llenar el compiler de
PHP Code:
Loose identation 
Mejora la tabulacion.
Bernii is offline
 



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 14:00.


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