Raised This Month: $ Target: $400
 0% 

[ES][ZP] Una duda con este code (SOLUCIONADO)


  
 
 
Thread Tools Display Modes
Author Message
XCristiaNX
Veteran Member
Join Date: Dec 2009
Old 01-09-2010 , 20:34   [ES][ZP] Una duda con este code (SOLUCIONADO)
#1

Hola...tenia una duda con este code xq me tira un error como q attacker no esta definido, lo defino como statico y no me tira mas error me lo compila y todo...pero entre a probarlo y cuando tiro la granada y mato a alguien se me clava y se me cierra el zp...alguien sabe xq puede ser?

aca el code...

PHP Code:
// Raptor Aniquilation Bomb
raptor_explode(ent)
{
    static 
Float:originF[3]
    
pev(entpev_originoriginF)
        
    
create_blast2(originF)
        
    
engfunc(EngFunc_EmitSoundentCHAN_WEAPONgrenade_fire[random_num(0sizeof grenade_fire 1)], 1.0ATTN_NORM0PITCH_NORM)

    static 
victimattacker
    victim 
= -1
        
    
// Esto se activara si la victima esta en el radio indicado en la constante
    
while ((victim engfunc(EngFunc_FindEntityInSpherevictimoriginFNADE_EXPLOSION_RADIUS)) != 0)
    {
        
// Le pongo las condiciones "si no esta viva o no es zombie" no prosigue
        
if (!is_user_alive(victim) || !g_zombie[victim])
            continue;

        
ExecuteHamB(Ham_Killedvictimattacker2)
    }

    
engfunc(EngFunc_RemoveEntityent)


Last edited by XCristiaNX; 01-22-2010 at 13:48.
XCristiaNX is offline
Old 01-09-2010, 20:42
01101101
This message has been deleted by 01101101. Reason: +
capostrike93
Veteran Member
Join Date: Feb 2009
Location: adios y??
Old 01-09-2010 , 20:43   Re: [ES][ZP] Una duda con este code...
#2

atacker = pev(ent,pev_owner)
__________________
capostrike93 is offline
capostrike93
Veteran Member
Join Date: Feb 2009
Location: adios y??
Old 01-09-2010 , 20:45   Re: [ES][ZP] Una duda con este code...
#3

PHP Code:
// Raptor Aniquilation Bomb
raptor_explode(ent)
{
    static 
Float:originF[3]
    
pev(entpev_originoriginF)
        
    
create_blast2(originF)
        
    
engfunc(EngFunc_EmitSoundentCHAN_WEAPONgrenade_fire[random_num(0sizeof grenade_fire 1)], 1.0ATTN_NORM0PITCH_NORM)
    static 
victimattacker
    victim 
= -1
   
    attacker 
pev(ent,pev_owner
        
    
// Esto se activara si la victima esta en el radio indicado en la constante
    
while ((victim engfunc(EngFunc_FindEntityInSpherevictimoriginFNADE_EXPLOSION_RADIUS)) != 0)
    {
        
// Le pongo las condiciones "si no esta viva o no es zombie" no prosigue
        
if (!is_user_alive(victim) || !g_zombie[victim])
            continue;
        
ExecuteHamB(Ham_Killedvictimattacker2)
    }
    
engfunc(EngFunc_RemoveEntityent)

__________________
capostrike93 is offline
XCristiaNX
Veteran Member
Join Date: Dec 2009
Old 01-09-2010 , 20:46   Re: [ES][ZP] Una duda con este code...
#4

Quote:
Originally Posted by capostrike93 View Post
atacker = pev(ent,pev_owner)
Gracias...me funciono ^^...te daria karma pero tengo entendido q no funciona? :S

EDIT: SI ya sabia donde ponerlo pero no sabia a q igualar attacker ;)
XCristiaNX is offline
kkvnn
BANNED
Join Date: Dec 2009
Old 01-09-2010 , 20:50   Re: [ES][ZP] Una duda con este code...
#5

Quote:
Originally Posted by capostrike93 View Post
atacker
:O
kkvnn is offline
TucanN#
Veteran Member
Join Date: May 2009
Location: Argentina, Mendoza
Old 01-09-2010 , 21:19   Re: [ES][ZP] Una duda con este code...
#6

de que sirve owner?
TucanN# is offline
Send a message via MSN to TucanN#
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viña del Mar, Chile
Old 01-09-2010 , 23:06   Re: [ES][ZP] Una duda con este code...
#7

Quote:
Originally Posted by TucanN# View Post
de que sirve owner?
El dueño de la entidad. Cuando lanzas una granada, su owner es el player.
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS 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 06:38.


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