Raised This Month: $ Target: $400
 0% 

[ZP] Extra item sandbang


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
DJHD!
Veteran Member
Join Date: Dec 2009
Location: Santiago, Chile
Old 05-06-2013 , 00:39   Re: [ZP] Extra item sandbang
#26

Quote:
Originally Posted by YakumoHiratsuhi View Post
Dajajajaj que bruto pongale cero.

RegisterHamFromEntity() sirve para anclar entidades a una tabla virtual aunque estas no sean del motor del juego, pero tienes que dar como referencia una entidad para analizar su estructura y poder crear la tabla respectiva, al hacer esto todos los punteros de las entidades que tengan esa estructura seran pasados por la funcion virtual que creaste en la funcion place_palletwbags()

PHP Code:
#include <hamsandwich>

public place_palletwbags(id)
{
    
// Some random code..
    
    // create a new entity
    
new ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"func_wall"));
    
    
    
// set a name to the entity
    
set_pev(ent,pev_classname,"amxx_pallets");
    
    
// ...
    
    
    
static gotham
    
    
if(!gotham)
    {
        
RegisterHamFromEntity(Ham_TakeDamageent"fw_BagEntity_TakeDamage")
        
gotham true
    
}
    
}

public 
fw_BagEntity_TakeDamage(victimattackergibmode)
{
    
// DerP.
    
if(!is_user_connected(attacker) || !zp_get_user_zombie(attacker))
        return 
HAM_SUPERCEDE;
    
    return 
HAM_IGNORED;

No es necesario hacer eso para lo que el quiere hacer :z
__________________
Quote:
Originally Posted by XINLEI View Post
Porque rocccos trata de ser el metalicross que nunca va a poder ser.
DJHD! is offline
Send a message via MSN to DJHD!
 



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 20:04.


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