Raised This Month: $ Target: $400
 0% 

[TUT]Modulos y sus elementos


  
 
 
Thread Tools Display Modes
Author Message
gladius
Veteran Member
Join Date: Jul 2008
Location: Santiago, Chile
Old 02-17-2010 , 18:46   [TUT]Modulos y sus elementos
#1


Tutorial de Módulos.

General:
En este tutorial les explicare cada Funcion, Forward de los modulos mas importantes y mas usados por la comunidad partiendo de los básicos a los más complejos.

Ir a:
Fun
Cstrike
Hamsandwich
Fakemeta
Engine
Sockets
SQL
Vaults
Orpheu
Rage
Extras

Creditos:
MetaliCross - me dijo como podria usar set/get_clinet_listen



PHP Code:
#include <amxmodx>
#include <fun> 
PHP Code:
/* Establece quien escucha a quien. La funcion returnea 0 si por alguna razon esta configuracion no se realiza con exito.
* si por alguna razon esta configuracion no se realiza con exito. */
native set_client_listen(receiversenderlisten)

/* Returnea 1 si el que recibe escucha la voz del que envia. */
native get_client_listen(receiversender);

Ejemplo:
new 
g_maxplayers // con esta variable usaremos el get_maxplayers.
new SenderName[33// con esta variable guardaremos la ID del que envia(sender).

public plugin_init() {
    
register_plugin("Test Client Listen""Beta""GlaDiuS")
    
    
g_maxplayers get_maxplayers() // utilizamos la variable para que sea llamado una vez y evitar mas consumo de CPU.
    
    
register_event("HLTV""RoundStart","a""1=0""2=0"// registramos el inicio de ronda(freezetime).
    
    
register_clcmd("say /mute""TestMenu"// Hookeamos el comando que usaremos para abrir el menu.
}

public 
RoundStart()
{
    for(new 
indexindex <= g_maxplayersindex++) // detectamos la cantidad de players.
    
{
        new 
Name[32]; // variable que usaremos para detectar el nombre.
        
get_user_name(SenderName[index], Namesizeof(Name)-1// registramos el nombre del que envia la "voz".
        
if(!get_client_listen(indexSenderName[index])) // detectamos si el usuario NO escucha la voz del que envia.
            
client_print(indexprint_chat"Tienes bloqueado a %s , no puedes escucharlo."Name// manda un mensaje tipo chat que dice que el usuario no esta escuchando al que envia.
    
}
}

public 
TestMenu(index)
{
    new 
Menu // variable que usaremos para el menu.
    
Menu menu_create("\yMute Menu""TestHandler"// creamos el menu/titulo/donde registramos que hara cada boton del menu.
    
new Pos[3], Name[32// variable para detectar la cantidad de nombres y numeros que ncecesita el menu.
    
    
for (new 1<= g_maxplayersi++) // detectamos la cantidad de players.
    
{
        if (!
is_user_connected(i) || == index// si el player no esta conectado o el player es igual al usuario.
            
continue; // dejamos que continue la funcion.
        
        
num_to_str(iPossizeof(Pos)-1// pasamos los numeros a strings(palabras).
        
get_user_name(iNamesizeof(Name)-1// registramos el nombre del player.
        
        
menu_additem(MenuNamePos// creamos la cantidad de items que tendra el menu (en este caso de acuerdo a la cantidad de players).
    
}
    
menu_setprop(MenuMPROP_EXITMEXIT_ALL// setea una propiedad del menu. ( que tengo un boton de cerrar el menu).
    
menu_display(indexMenu0// abrimos el menu
}

public 
TestHandler(indexMenuitem)
{
    if (
item == MENU_EXIT// aqui registramos que si cierra el menu.
    
{
        
menu_destroy(Menu// destruimos el menu.
        
return PLUGIN_HANDLED // terminamos la funcion, no continua con lo demas abajo.
    
}
    
    new 
Data[6], Name[64// variables que usaremos para detectar la info del menu.
    
new AccessCallback // variables que usaremos para detectar la info del menu.
    
menu_item_getinfo(MenuitemAccessDatasizeof(Data)-1Namesizeof(Name)-1Callback// toda la informacion del menu.
    
    
new Key // variable que usaremos para el Data(menos consumo de CPU).
    
Key str_to_num(Data// Detectar que el numero que apretamos sera el que se usara.
    
SenderName[Key] = index // detectamos que el nombre del que envia es igual al usuario.
    
    
set_client_listen(indexSenderName[index], 0// seteamos que el usuario no escuche al que envia la "voz".
    
    
menu_destroy(Menu// destruimos el menu.
    
return PLUGIN_HANDLED // terminaos la funcion.

PHP Code:
/* Establece la Inmortalidad a un jugador. Si tu quieres desactivar "godmode" solo tienes que establecer el primer parametro. */
native set_user_godmode(indexgodmode 0);

/* Returnea 1 si se ha establecido "godmode". */
native get_user_godmode(index);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test Godmode""Beta""GlaDiuS")
    
    
register_clcmd("say /god""Funcion"// Hookeamos el comando que usare para el godmode.
}

public 
Funcion(index)
{
    if(!
get_user_godmode(index)) // detectamos si el player NO tiene godmode
        
set_user_godmode(index1// Seteamos 1, entonces el player obtiene inmortalidad.
    
    
else // lo contrario al if
        
set_user_godmode(index0// El player se vuelve mortal.

PHP Code:
/* Establece el Armor de un jugador. */
native set_user_armor(indexarmor);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test Armor""Beta""GlaDiuS")
    
    
register_clcmd("say /armor""Funcion"// Hookeamos el comando que usare para dar Armor
}

public 
Funcion(index)
    
set_user_armor(index100//s eteamos su armor, el player tiene 100 de armor. 
PHP Code:
/* Establece la Vida de un jugador. */
native set_user_health(indexhealth);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test Health""Beta""GlaDiuS")
    
    
register_clcmd("say /health""Funcion"// Hookeamos el comando que usare para dar vida
}

public 
Funcion(index)
    
set_user_health(index150// seteamos su vida, el player tiene 150 de vida. 
PHP Code:
/* Cambia la posicion de un Jugador. */
native set_user_origin(index, const origin[3]);

Ejemplo:
new 
teleOrigin[33][3// variable que usaremos para guardar/cargar la posicion.

public plugin_init() {
    
register_plugin("Test Origin""Beta""GlaDiuS")
    
    
register_clcmd("say /save""Funcion"// Hookeamos el comando que usare para guardar su posicion.
    
register_clcmd("say /load""Funcion2"// Hookeamos el comando que usare para que vuelva a la posicion que guardo.
}

public 
Funcion(index)
    
get_user_origin(indexteleOrigin[index]) // detectamos la posicion y la guardamos.

public Funcion2(index)
    
set_user_origin(indexteleOrigin[index]) // cargamos la posicion que guardamos anteriormente. 
PHP Code:
/* Establece al Jugador "rendering mode". */
native set_user_rendering(indexfx kRenderFxNone255255255render kRenderNormalamount 16);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test Rendering""Beta""GlaDiuS")
    
    
register_clcmd("say /rendering""Funcion"// Hookeamos el comando que usare para el rendering.
}

public 
Funcion(index)
{    
    
set_user_rendering(indexkRenderFxGlowShell255255255kRenderNormal50// Seteamos Glow.
    
set_user_rendering(index,kRenderFxNone0,0,0kRenderTransAdd150// Seteamos Invisibilidad.
    
    /*
    Rendering Constants:
    kRenderNormal = 0,        // src
    kRenderTransColor,        // c*a+dest*(1-a)
    kRenderTransTexture,        // src*a+dest*(1-a)
    kRenderGlow,            // src*a+dest -- No Z buffer checks
    kRenderTransAlpha,        // src*srca+dest*(1-srca)
    kRenderTransAdd,        // src*a+dest
    
    FX Constants:
    kRenderFxNone = 0,
    kRenderFxPulseSlow,
    kRenderFxPulseFast,
    kRenderFxPulseSlowWide,
    kRenderFxPulseFastWide,
    kRenderFxFadeSlow,
    kRenderFxFadeFast,
    kRenderFxSolidSlow,
    kRenderFxSolidFast,        
    kRenderFxStrobeSlow,
    kRenderFxStrobeFast,
    kRenderFxStrobeFaster,
    kRenderFxFlickerSlow,
    kRenderFxFlickerFast,
    kRenderFxNoDissipation,
    kRenderFxDistort,        // Distort/scale/translate flicker
    kRenderFxHologram,        // kRenderFxDistort + distance fade
    kRenderFxDeadPlayer,        // kRenderAmt is the player index
    kRenderFxExplode,        // Scale up really big!
    kRenderFxGlowShell,        // Glowing Shell
    kRenderFxClampMinScale,        // Keep this sprite from getting very small (SPRITES only!)
    */

PHP Code:
/* Le da un Item a un Jugador, el nombre del item puede empezar
* con weapon_ , ammo_ , item_ ... Este evento
* es anunciando de forma adecuada para todos los jugadores. */
native give_item(index, const item[]);

/* elimina toda las Armas del usuario. */
native strip_user_weapons(index);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test StripWeapon/Giveitem""Beta""GlaDiuS")
    
    
register_clcmd("say /entidad""Funcion"// Hookeamos el comando que usare para remover las entidades del player y darle una nueva
}

public 
Funcion(index)
{
    
strip_user_weapons(index// borra todas las entidades(armas) del usuario
    
    
give_item(index"weapon_usp"// le agregamos una entidad(arma) nueva al usuario - Usp
    
give_item(index"weapon_knife"// le agregamos una entidad(arma) nueva al usuario - Cuchillo

PHP Code:
/* Establece las sonas de daño a un jugador. */
native set_user_hitzones(index 0target 0body 255);

/* Obtener Zonas de Daño del uuario. */
native get_user_hitzones(indextarget);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test Hitzones""Beta""GlaDiuS")
    
    
register_clcmd("say /hitzone""Funcion"// Hookeamos el comando que usare para setear/detectar una parte del cuerpo(en este caso Head)
}

public 
Funcion(index)
{
    static 
target // este es el index de la persona afectada(victima)
    
if(get_user_hitzones(indextarget) != HIT_HEAD// detectamos si el hitzone es diferente a 2(Head)
        
set_user_hitzones(indextarget2// como vimos arriba, si era diferente a 2, le seteamos el 2
    
    
else // lo contradictorio al IF
        
client_print(indexprint_center"Modo HeadShot ya esta activado"// un mensaje que indica que ya se encuentra activaod el hitzone 2(Head)
    
    /* set/hitzones
    * Parts of body are as bits:
    * 1   - generic
    * 2   - head
    * 4   - chest
    * 8   - stomach
    * 16  - left arm
    * 32  - right arm
    * 64  - left leg
    * 128 - right leg
    * 255 - body
    
    get/hitzones
    Hitzone Constants:
    HIT_GENERIC        0
    HIT_HEAD        1
    HIT_CHEST        2
    HIT_STOMACH        3
    HIT_LEFTARM        4
    HIT_RIGHTARM        5
    HIT_LEFTLEG        6
    HIT_RIGHTLEG        7
    */
    

PHP Code:
/* Establece la velocidad del usuario. */
native set_user_maxspeed(indexFloat:speed = -1.0);

/* Returnea a la velocidad maxima del usuario. */
native Float:get_user_maxspeed(index);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test MaxSpeed""Beta""GlaDiuS")
    
    
register_clcmd("say /speed""Funcion"// Hookeamos el comando que usare para el Speed
}

public 
Funcion(index)
{
    new 
Weapon get_user_weapon(index// detectamos el arma que esta usando el usuario
    
if(get_user_maxspeed(index) == Weapon// detectamos la maxspeed de el arma que tiene el usuario
    
{
        
set_user_maxspeed(indexWeapon 30.0// seteamos la velocidad maxima del arma (velocidad del arma + 30)
    
}    

PHP Code:
/* Establece la gravedad de un usuario. */
native set_user_gravity(indexFloat:gravity 1.0);

/* Returnea a la gravedad del usuario. */
native Float:get_user_gravity(index);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test Gravity""Beta""GlaDiuS")
    
    
register_clcmd("say /gravity""Funcion"// Hookeamos el comando que usare para la gravedad
}

public 
Funcion(index)
{
    
// gravedad que quieres / gravedad estandar == gravity
    // ejemplo ( 400 / 800 = 0.5 )
    
if(get_user_gravity(index) == 1.0// detectamos la gravedad del usuario ( 1.0 = 800)
    
{
        
set_user_gravity(index0.5// seteamos la gravedad del player
    
}    

PHP Code:
/* establece la entidad(un jugador). */
native spawn(index);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test Spawn""Beta""GlaDiuS")
}

public 
client_putinserver(index)
    
set_task(10.0"Funcion"index// con esto hacemos que despues de 10 segundos de haberse llamo esta funcion, se llame a la otra funcion

public Funcion(index)
    
spawn(index// con esto el player respawneara 
PHP Code:
/* Sets player noclip. If you want to disable noclip set only first parameter. */
native set_user_noclip(indexnoclip 0);

/* Returnea 1 si se establece el noclip. */
native get_user_noclip(index);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test Noclip""Beta""GlaDiuS")
    
    
register_clcmd("say /noclip""Funcion"// Hookeamos el comando que usare para el noclip
}

public 
Funcion(index)
{
    if(!
get_user_noclip(index)) // detectamos si NO tiene noclip
        
set_user_noclip(index1// le seteamos noclip
    
    
else // lo contrario al IF
        
set_user_noclip(index0// le sacamos el noclip

PHP Code:
/* Returnea 1 si el player tenia pasos silenciosos, 0 si los pasos establecidos son normales */
native get_user_footsteps(index);

/* Le da a un jugador pasos silenciosos.
* Si esta establecido en 0 este returneara a los pasos normales */
native set_user_footsteps(indexset 1);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test Footsteps""Beta""GlaDiuS")
    
    
register_clcmd("say /footsteps""Funcion"// Hookeamos el comando que usare para el footsteps
}

public 
Funcion(index)
{
    if(!
get_user_footsteps(index)) // detectamos si NO hace pasos silenciosos
        
set_user_footsteps(index1// le seteamos footsteps
    
    
else // lo contrario al IF
        
set_user_footsteps(index0// le sacamos el footsteps

PHP Code:
/* Establece los frag a un jugador. */
native set_user_frags(indexfrags);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test Set Frags""Beta""GlaDiuS")
    
    
register_clcmd("say /frags""Funcion"// Hookeamos el comando que usare para dar frags
}

public 
Funcion(index)
    
set_user_frags(indexget_user_frags(index) + 5// le seteamos los frags (frags actuales + 5) 



PHP Code:
#include <amxmodx>
#include <cstrike> 
PHP Code:
/* Returnea a las Muertes que tiene el jugador. */
native cs_get_user_deaths(index);

/* Establece las muertes del jugador. */
native cs_set_user_deaths(indexnewdeaths);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test Deaths""Beta""GlaDiuS")
    
    
register_clcmd("say /deaths""Funcion"// hookeamos el comand para los Deaths
}

public 
Funcion(index)
{
    if(
cs_get_user_deaths(index) < 0// detectamos si tienes menos de 0 muertes
        
cs_set_user_deaths(index0// le seteamos 0 muertes

PHP Code:
/* Returnea al index de la entidad( no tiene que ser un jugador necesariamente) cuando un rehen esta siguiendo a un jugador. 0 el rehen no esta siguiendo a nadie.
* Nota: Esta native no funciona en CZ, tiene un rehen diferente a CS. */
native cs_get_hostage_foll(index);

/* Establece al rehen para que siga a una entidad especificada en followedindex. No tiene que ser un player necesariamente. Si el followedindex esta en 0 para de seguir a la entidad
* Nota: Esta native no funciona en CZ, tiene un rehen diferente a CS. */
native cs_set_hostage_foll(indexfollowedindex 0);

/* Obtener una unica ID para el rehen. */
native cs_get_hostage_id(index);

/* Obtiene el número de rehenes que un usuario ha matado. */
native cs_get_user_hostagekills(index);

/* Establece el número de rehenes que un usuario ha matado. */
native cs_set_user_hostagekills(indexvalue);

/* Obtiene el tiempo que el ultimo rehen fue usado */
native Float:cs_get_hostage_lastuse(index);

/* establece el tiempo que el ultimo rehen fue usado */
native cs_set_hostage_lastuse(indexFloat:value);

/* Obtiene el tiempo que el rehen siguiente se puede utilizar */
native Float:cs_get_hostage_nextuse(index);

/* Establece el tiempo que el rehen siguiente se puede utilizar */
native cs_set_hostage_nextuse(indexFloat:value);

Ejemplo:
#include <engine> // engine module

public plugin_init() {
    
register_plugin("Test Hostages""Beta""GlaDiuS")
    
    
register_clcmd("say /hostage""Funcion"// hookeamos el comand para los Rehenes.
}

public 
Funcion(index)
{
    new 
entity = -// variable para detectar la entidad
    
while((entity find_ent_by_class(entity"hostage_entity")) > 0// obetenemos la entidad del rehen
        
    
if(cs_get_hostage_foll(entity)) // detectamos si los rehenes lo siguen
    
{
        if(
get_user_health(index) < 20// native de amxmodx :)
        
{
            
cs_set_hostage_foll(entity// quitamos el seguimiento al jugador y el hostage queda parado.
            
if(cs_get_hostage_lastuse(entity) > 10.0// detectamos si el tiempo que uso al ultimo rehen es mayor a 10
            
{
                new 
hostageluse cs_set_hostage_lastuse(entitycs_get_hostage_lastuse(entity) - 5// seteamos el tiempo del ultimo rehen que uso
                
client_print(indexprint_chat"El ultimo Hostage se uso hace[%d]"hostageluse// mandamos un mensaje tipo chat que dice cuando uso al ultmo rehen
            
}
            else 
// contrario al if
                
client_print(indexprint_chat"El ultimo Hostage se uso hace[%d]"cs_get_hostage_lastuse(entity)) // mandamos un mensaje tipo chat que dice cuando uso al ultmo rehen
        
}
        
        else 
// contrario al if
        
{
            if(
cs_get_hostage_nextuse(entity) < 1// detectamos si el tiempo para usar al proximo rehen es menor a 1
                
cs_set_hostage_nextuse(entity5.0// mandamos un mensaje tipo chat que dice cuando usara al siguiente rehen
                
            
new hostageid cs_get_hostage_id(entity// obtenemos la id del rehen
            
new hostagekills cs_get_user_hostagekills(index// obtenemos las veces que un jugador ha matado a un rehen
            
client_print(indexprint_chat"Hostage id[%d] - Hostage matados[%d]"hostageidhostagekills// // mandamos un mensaje tipo chat que dice el id del rehen y a cuantos rehenes a matado el jugador.
        
}
    }

PHP Code:
/* Obtienes la cantidad de balas que hay en las recargas en el arma especifica del usuario.
* puedes mirar en amxconst.inc para ver los tipos de armas: CSW_*.
* Las armas en la misma linea, usan los mismos tipos de balas:
* awm
* scout, ak, g3
* para
* famas, m4a1, aug, sg550, galil, sg552
* m3, xm
* usp, ump, mac
* fiveseven, p90
* deagle
* p228
* glock, mp5, tmp, elites
* flash
* he
* smoke */
native cs_get_user_bpammo(indexweapon);

/* Recuperar/remover balas de las recargas de un usuario. */
native cs_set_user_bpammo(indexweaponamount);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test BPammo""Beta""GlaDiuS")
    
    
register_clcmd("say /bpammo""Funcion"// hookeamos el comando para las recargas
}

public 
Funcion(index)
{
    if(
cs_get_user_bpammo(indexCSW_USP) == 0// detectamos si la usp tiene 0 balas
        
cs_set_user_bpammo(indexCSW_USP100// le seteamos 100 balas en las recargas

PHP Code:
/* Returnea 1 si el usuario tiene defuse. */
native cs_get_user_defuse(index);

/* Si el defuse esta en 1, el usuario tendra un defuse.
* Tu puedes especificar el color deel Hud que muestra del defuse. Default es le verde green.
* Tu puede especificar un icono. Default es el "defuser". Puedes poner el flash en 1 si quieres ver un flash rojo en el icono. */
native cs_set_user_defuse(indexdefusekit 101600icon[] = "defuser"flash 0);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test Defuse""Beta""GlaDiuS")
    
    
register_clcmd("say /defuse""Funcion"// hookeamos el comando para el defuse
}

public 
Funcion(index)
{
    if(!
cs_get_user_defuse(index)) // detectamos si NO tiene defuse
        
cs_set_user_defuse(index1255255255// le seteamos defuse, de color blanco

PHP Code:
/* El usuario esta en la zona de compra? Returnea 1 si es verdad, 0 si es falso. */
native cs_get_user_buyzone(index);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test Buyzone""Beta""GlaDiuS")
    
    
register_clcmd("say /buyzone""Funcion"// hookeamos el comando para el buyzone
}

public 
Funcion(index)
{
    if(
cs_get_user_buyzone(index)) // detectamos si esta en la zona de compra
        
client_print(indexprint_chat"estas en la zona de compra"// mensaje tipo chat que diga que estamos en zona de compra
    
    
else // contrario al if
        
client_print(indexprint_chat"NO estas en la zona de compra"// mensaje tipo chat que diga que NO estamos en zona de compra

PHP Code:
/* Returnea 1 si el usuario tiene un arma primaria o un escudo, de lo contrario 0. */
native cs_get_user_hasprim(index);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test Has Primary""Beta""GlaDiuS")
    
    
register_clcmd("say /primary""Funcion"// hookeamos el comando para el has primary
}

public 
Funcion(index)
{
    if(!
cs_get_user_hasprim(index)) // detectamos si el usuario no tiene arma primaria
    
client_print(indexprint_chat"No tienes arma primaria"// mensaje tipo chat diciendo que no tiene arma priamria

PHP Code:
/* obtienes el model del usuario. */
native cs_get_user_model(indexmodel[], len);

/* estableces un model al usuario. */
native cs_set_user_model(index, const model[]);

/* Reseteas al model por defecto. */
native cs_reset_user_model(index);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test Models""Beta""GlaDiuS")
    
    
register_clcmd("say /sas""Funcion"// hookeamos el comando para el model
    
register_clcmd("say /reset""Funcion2"// hookeamos el comando para resetear los model
}

public 
Funcion(index)
{
    
cs_set_user_model(index"sas"// establecemos el model sas
    
    
new model[32// variable para el model
    
if(cs_get_user_model(indexmodelcharsmax(model))) // detectamos el model del usuario
        
if(equali(model,"sas")) // con este detectaremos si el player esta usando el model sas
            
client_print(indexprint_chat"tienes el model sas"// mensaje tipo chat
}

public 
Funcion2(index)
    
cs_reset_user_model(index
PHP Code:
/* returnea la plata del jugador. */
native cs_get_user_money(index);

/* le das/quitas dinero a un jugador. Si el Flash es 1, Podras ver la money que tenias y la que se te fue dada con el flash en verde o rojo. */
native cs_set_user_money(indexmoneyflash 1);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test Money""Beta""GlaDiuS")
    
    
register_clcmd("say /money""Funcion"// hookeamos el comando para el money
}

public 
Funcion(index)
{
    if(
cs_get_user_money(index) <= 1000// detectamos si tiene menos o igual a $1000
    
{
        
cs_set_user_money(index150001// le establecemos $15000
        
client_print(indexprint_chat"dinero actual %d"cs_get_user_money(index)) // mensaje tipo chat
    
}

PHP Code:
/* Obtienes si el usuario tiene NVG */
native cs_get_user_nvg(index);

/* Estableces NVG en 1 para darle vision nocturna a un jugador. Establece este en 0 para remover la NVG. */
native cs_set_user_nvg(indexnvgoggles 1);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test Nightvision""Beta""GlaDiuS")
    
    
register_clcmd("say /nvg""Funcion"// hookeamos el comando para la Nightvision
}

public 
Funcion(index)
{
    if(!
cs_get_user_nvg(index)) // detectamos si NO tiene Nvg
        
cs_set_user_nvg(index1// le damos NVG

PHP Code:
/* Returnea 1 si el usuario "Habilidad" para plantar la bomba, de lo contrario 0. Normalmente este podria solo ser verdad para los terroristas que llevan una bomba(C4). */
native cs_get_user_plant(index);

/* Si plant esta en 1, un usuario podra plantar la bomba sin estar en la zona de bomba, solo si tiene 1.
* Tu podrias usar este para dar una weapon_c4(C4) a un jugador, o el no podra plantar esta.
* Sin botar este y recoger de nuevo ( solo posible para los terroristas).
* Si showbombicon esta en 1, el icono de la C4 se mostrara enverde el HUD del usuario (si plant esta activado). */
native cs_set_user_plant(indexplant 1showbombicon 1);

Ejemplo:
#include <engine> // module

public plugin_init() {
    
register_plugin("Test Plant""Beta""GlaDiuS")
    
    
register_clcmd("say c4bomb""Funcion"// Hookeamos el comando para la C4
}

public 
Funcion(index)
{
    new 
bombent find_ent_by_class(0"weapon_c4"); // detectamos la entidad de la bomba
    
new entity entity_get_edict(bombentEV_ENT_owner); // variable el id del usuario que tiene la bomba
    
    
if (cs_get_user_plant(entity)) // detectamos el usuario que tiene la bomba
        
client_print(indexprint_chat"No puedes robar la bomba ya que se esta plantando"); // mensaje tipo chat

PHP Code:
/* Establece el equipo del jugador, sin matarlo.
* Si el model es diferente a CS_DONTCHANGE, se establecera como model del jugador. */
enum CsInternalModel {
    
CS_DONTCHANGE 0,
    
CS_CT_URBAN 1,
    
CS_T_TERROR 2,
    
CS_T_LEET 3,
    
CS_T_ARCTIC 4,
    
CS_CT_GSG9 5,
    
CS_CT_GIGN 6,
    
CS_CT_SAS 7,
    
CS_T_GUERILLA 8,
    
CS_CT_VIP 9,
    
CZ_T_MILITIA 10,
    
CZ_CT_SPETSNAZ 11
};
native cs_set_user_team(index, {CsTeams,_}:team, {CsInternalModel,_}:model CS_DONTCHANGE);

/* Obtiene el equipo directamente del jugador.
* 1 = Terrorista
* 2 = Anti-Terrorista
* 3 = Epectador */
enum CsTeams {
    
CS_TEAM_UNASSIGNED 0,
    
CS_TEAM_T 1,
    
CS_TEAM_CT 2,
    
CS_TEAM_SPECTATOR 3
};
native CsTeams:cs_get_user_team(index, &{CsInternalModel,_}:model CS_DONTCHANGE);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test Team""Beta""GlaDiuS")
    
    
register_clcmd("say /team""Funcion"// Hookeamos el comando para el team
}

public 
Funcion(index)
{    
    if (
cs_get_user_team(index) == CS_TEAM_T// detectamos si el equipo del usuario es el terrorista
        
cs_set_user_team(indexCS_TEAM_CT// lo cambiamos al team CT
    
    
else // contrario al if
        
cs_set_user_team(indexCS_TEAM_T// lo cambiamos al team TT

PHP Code:
/* el usuario es un VIP? Returnea 1 si es verdad, de lo contrario 0 si es falso. */
native cs_get_user_vip(index);

/* si es vip = 1, el usuario es establecido como Vip.
* Si el model = 1, entonces al usuario se le cambiara el model al Vip model o un model aleatorio de CT si vip es = 0.
* Si el scoreboard = 1, entonces la tabla de puntaje del usuario sera modificado y mostrara al usuario como VIP.
* Este no puede ser usado en usuarios que no sean cT.*/
native cs_set_user_vip(indexvip 1model 1scoreboard 1);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test VIP""Beta""GlaDiuS")
    
    
register_clcmd("say /vip""Funcion"// Hookeamos el comando para el team
}

public 
Funcion(index)
{    
    if (!
cs_get_user_vip(index))
        
cs_set_user_vip(index111// lo cambiamos a un Vip
    
    
else // contrario al if
        
cs_set_user_vip(index// lo cambiamos a un ct normal

PHP Code:
/* Returnea 1 si el usuario especificado tiene TKed(mata a un compañero). */
native cs_get_user_tked(index);

/* Returnea 1 si el usuario especificado tiene TKed.
* tk = 1: jugador tiene TKed
* tk = 0: jugador no tiene TKed
* Establece una resta de sus frags.Establece subtract negativo para que que sus frags sean cambiados. */
native cs_set_user_tked(indextk 1subtract 1);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test Team Killed""Beta""GlaDiuS")
    
    
register_event "DeathMsg" "Funcion" "a" ); // evento de cuando matan a alguien, para el Team Killed
}

public 
Funcion()
{    
    new 
index read_data (1// detectamos el atacante
    
if (cs_get_user_tked(index)) // detectamos si mato a un compañero
        
cs_set_user_tked(index15// le restamos 5 frag por matar a un compañero

PHP Code:
/* Returnea diferente valor dependiendo si el usuario esta manejando un vehiculo - y en caso de que sea verdad a que velocidad.
* 0: no esta manejando
* 1: manejando, pero aun de pie(sin andar)
* 2-4: manejando, diferente velocidad positiva
* 5: manejando, velocidad negativa (reversa) */
native cs_get_user_driving(index);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test Driving""Beta""GlaDiuS")
    
    
register_clcmd("say /driving""Funcion"// hookeamos el comando para el driving
}

public 
Funcion(index)
{    
    if (
cs_get_user_driving(index) == 1// detectamos si esta manejando
        
client_print(indexprint_chat"Estas en el auto pero aun no avanzas"// mensaje tipo chat

PHP Code:
/* Returnea 1 si el usuario tiene un escudo, de lo contrario 0. */
native cs_get_user_shield(index);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test Shield""Beta""GlaDiuS")
    
    
register_clcmd("say /shield""Funcion"// hookeamos el comando para el shield
}

public 
Funcion(index)
{    
    if (
cs_get_user_shield(index)) // detectamos si tiene escudo
        
client_print(indexprint_chat"tienes escudo"// mensaje tipo chat

PHP Code:
/* Returnea 1 si el usuario esta usando un arma que no se pueda recoger, de lo contrario 0. */
native cs_get_user_stationary(index);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test Stationary""Beta""GlaDiuS")
    
    
register_clcmd("say /stationary""Funcion"// hookeamos el comando para el stationary
}

public 
Funcion(index)
{    
    if(
cs_get_user_stationary(index)) // detectamos si usa un arma que no se puede tomar(fija)
        
client_print(indexprint_chat"estas usando la ametralladora del mapa"// mensaje tipo chat

PHP Code:
/* Returnea el armor del jugador y establece una referencia al tipo de armor en el segundo parametro. */
enum CsArmorType {
    
CS_ARMOR_NONE 0// no armor
    
CS_ARMOR_KEVLAR 1// armor
    
CS_ARMOR_VESTHELM // armor y helmet
};
native cs_get_user_armor(index, &CsArmorType:armortype);

/* Usa este en vez del set_user_armor de fun
* Se enviara el mensaje adecuado para cambiar el Hud del usuario para saber que tipo de armor es, si es kevlar o helmet. */
native cs_set_user_armor(indexarmorvalueCsArmorType:armortype);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test Armor""Beta""GlaDiuS")
    
    
register_clcmd("say /armor""Funcion"// hookeamos el comando para el armor
}

public 
Funcion(index)
{    
    new 
CsArmorType:armortype // variable para las partes del armor (kevlar o helmet)
    
if(cs_get_user_armor(indexarmortype) == 0// detectamos si No tiene armor
        
cs_set_user_armor(index100CS_ARMOR_VESTHELM// le damos 100 de armor + helmet

PHP Code:
/* Returnea 1 si el arma especificada del usuario esta en burst mode. */
native cs_get_weapon_burst(index);

/* si burstmode = 1, el arma sera cambiada a burst mode, 0 y el arma volvera a la normalidad (semiautomatica/automatica).
* solo GLOCK y FAMAS puede tener/quitar burst mode. */
native cs_set_weapon_burst(indexburstmode 1);

/* Returnea 1 si el arma tiene silenciador, de lo contrario 0. */
native cs_get_weapon_silen(index);

/* si silence = 1, el arma tendra silenciador, 0 y el silenciador sera removido. Solo USP y M4A1 pueden tener silenciador. */
native cs_set_weapon_silen(indexsilence 1draw_animation 1);

/* Returnea a la cantidad de balas que tiene ese cargador. */
native cs_get_weapon_ammo(index);

/* establece la cantidad de balas que tiene ese cargador. */
native cs_set_weapon_ammo(indexnewammo);

/* obtiene el tipo de arma. Correspondiente a CSW_* en amxconst.inc */
native cs_get_weapon_id(index);

Ejemplo:
#include <engine>

public plugin_init() {
    
register_plugin("Test Weapon""Beta""GlaDiuS")
    
    
register_clcmd("say /wpn""Funcion"// hookeamos el comando para weapon :)
}

public 
Funcion(index)
{    
    static 
WpnName[32// variable para la entidad del arma
    
get_weaponname(get_user_weapon(index), WpnNamesizeof WpnName 1// pasamos de nombre csw_ a weapon_
    
new wpnindex find_ent_by_owner(-1WpnNameindex// obtenemos la index del arma
    
    
if(get_user_weapon(index) == CSW_GLOCK18 && !cs_get_weapon_burst(wpnindex)) // si tiene la glock y NO tiene burst mode
        
cs_set_weapon_burst(wpnindex1// el colocamos burst mode
    
    
if(get_user_weapon(index) == CSW_USP && !cs_get_weapon_silen(wpnindex)) // si tiene usp y NO tiene silenciador
        
cs_set_weapon_silen(wpnindex11// le colocamos silenciador
    
    
if(cs_get_weapon_id(wpnindex) == CSW_USP || cs_get_weapon_id(wpnindex) == CSW_GLOCK18 && cs_get_weapon_ammo(wpnindex) == 0// si el ID de las armas es el de la Usp o Glock y no tiene balas
        
cs_set_weapon_ammo(wpnindex10// le ponenos 10 balas

PHP Code:
/* Returnea 1 si el no knives mode esta activado, de lo contrario 0. */
native cs_get_no_knives();

/* activa el no knives mode establiendo este en 1. Desactivar con 0.
* No knives mode significa que el jugador no recibe una cuchilla al espawnear
* todavia puede tener cuchilla utilizando give_item. */
native cs_set_no_knives(noknives 0);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test No Knives""Beta""GlaDiuS")
    
    
register_clcmd("say /nokv""Funcion"// hookeamos el comando para el no knives
}

public 
Funcion()
{    
    if(!
cs_get_no_knives()) // detectamos si NO tiene "no knives"
        
cs_set_no_knives(1// le seteamos no knives
    
    
else // contrario al if
        
cs_set_no_knives(0// le removemos el no knives

PHP Code:
/* espawnea un player */
native cs_user_spawn(player);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test No Knives""Beta""GlaDiuS")
    
    
register_event "DeathMsg" "Funcion" "a" // evento cuando uno mata a otro
}

public 
Funcion()
{    
    new 
index read_data(2// registramos la victima
    
    
set_task(3.0"Funcion2"index// llamamos a otra funcion pero con un retraso de 3 segundos.
}

public 
Funcion2(index)
    
cs_user_spawn(index// el jugador espawnea 
PHP Code:
/* obtiene el tipo de arma (CSW_*) es una armoury_entity. */
native cs_get_armoury_type(index);

/* Establece una armoury_entity de un tipo especificado. Tienes que establecer el model apropiado.
* el segundo argumento, type, podria ser una CSW_* constante. No todas las armas de CS son soportadas.
* Armas/items soportadas: CSW_MP5NAVY, CSW_TMP, CSW_P90, CSW_MAC10, CSW_AK47, CSW_SG552, CSW_M4A1, CSW_AUG, CSW_SCOUT
* CSW_G3SG1, CSW_AWP, CSW_M3, CSW_XM1014, CSW_M249, CSW_FLASHBANG, CSW_HEGRENADE, CSW_VEST, CSW_VESTHELM, CSW_SMOKEGRENADE
*/
native cs_set_armoury_type(indextype);

Ejemplo:
#include <engine>

public plugin_init() {
    
register_plugin("Test Armoury Entity""Beta""GlaDiuS")
    
    
register_touch"armoury_entity""player""Funcion" // al tocar la entidad del suelo
}

public 
Funcion(Entityindex)
{    
    if(
cs_get_armoury_type(Entity) == CSW_VESTHELM// detectamos si la entidad es helmet
        
cs_set_armoury_type(indexCSW_VEST// lo seteamos en kevlar
    
    
if(cs_get_armoury_type(Entity) == CSW_VEST// detectamos si la entidad es kevlar
        
cs_set_user_armor(index100CS_ARMOR_KEVLAR// le damos 100 de armor

PHP Code:
#define CS_MAPZONE_BUY             (1<<0)
#define CS_MAPZONE_BOMBTARGET         (1<<1)
#define CS_MAPZONE_HOSTAGE_RESCUE     (1<<2)
#define CS_MAPZONE_ESCAPE        (1<<3)
#define CS_MAPZONE_VIP_SAFETY         (1<<4)

/* Returnea en la zona especifica donde este el usuario.
* NOTA: si el usuario no puede plantar(cs_get_user_plant(index) esta en 0) entonces cs_get_user_mapzones(index) & CS_MAPZONE_BOMBTARGET returneara en 0 tambien */
native cs_get_user_mapzones(index);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test Mapzone""Beta""GlaDiuS")
    
    
register_clcmd("say /map""Funcion"// hookeamos el comando para el mapzone
}

public 
Funcion(index)
{    
    if(
cs_get_user_mapzones(index) == CS_MAPZONE_BOMBTARGET// detectamos si esta en la zona de bomba
        
client_print(indexprint_chat"estas en la zona de bomba"// mensaje tipo chat

PHP Code:
/* enum de los tipos de zoom. usados para get/set_user_zoom() natives. */
enum {
CS_RESET_ZOOM 0,        // Resetea cualquier zoom(cuando el usuario tiene este, no tiene efecto)
CS_SET_NO_ZOOM,            // desactiva cualquier zoom
CS_SET_FIRST_ZOOM,        // primer zoom (estilo awp) 
CS_SET_SECOND_ZOOM,        // segundo zoom (estilo awp)
CS_SET_AUGSG552_ZOOM,        // establece aug/sg552 zoom
};
/* Establece zoom a un player, cualquier tipo de zoom funciona con todas las armas, entonces tu puedes ponerle zoom a las pistolas :D
* El segundo parameto tiene que ver con los tipos de zoom en el enum. Mode solo puede ser 1 o 0.
* si el mode=0 (mode bloqueado), el usuario estara forzado a usar el tipo de zoom establecido por la native, y no podra cambiarlo (incluso al cambiar de arma)
* hasta que la native resetee el zoom con CS_RESET_ZOOM.
* si mode=1 el usuario podra regresar a la vision normal por el cambio de arma. */
native cs_set_user_zoom(indextypemode);

/* returnea el zoom que tiene un jugador. valor correspondiente al enum, este returneara 0 si hay algun error. */
native cs_get_user_zoom(index);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test Zoom""Beta""GlaDiuS")
    
    
register_clcmd("say /zoom""Funcion"// hookeamos el comando para el zoom
}

public 
Funcion(index)
{    
    if(
cs_get_user_zoom(index) == CS_SET_AUGSG552_ZOOM// detectamos si esta usando el aug/sg552 zoom
        
cs_set_user_zoom(indexCS_SET_FIRST_ZOOM1// le seteamos el primer zoom de la awp

PHP Code:
/* Returnea el valor del submodel del player.
* si este es 1, entonces el usuario tiene una mochila o defuse en su modelo(dependiendo del equipo) */
native cs_get_user_submodel(index);

/* establece el valor del submodel del player.
* si este es 1, entonces el usuario tiene una mochila o defuse en su modelo(dependiendo del equipo)
* 0 lo remueve. */
native cs_set_user_submodel(indexvalue);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test SubModel""Beta""GlaDiuS")
    
    
register_clcmd("say /smodel""Funcion"// hookeamos el comando para el submodel
}

public 
Funcion(index)
{    
    if(!
cs_get_user_submodel(index// detectamos si NO tiene el submodel
        
cs_set_user_submodel(index 1// le otorgamos el submodel

PHP Code:
/* Obtiene/establece el tiempo del ultimo movimiento del jugador. Este es el tiempo usado para el afk kicker
* chequea para ver quien ha estado afk mucho tiempo. */
native Float:cs_get_user_lastactivity(index);

native cs_set_user_lastactivity(indexFloat:value);

Ejemplo:
public 
plugin_init() {
    
register_plugin("Test Last Activity""Beta""GlaDiuS")
    
    
register_clcmd("say /lactivity""Funcion"// hookeamos el comando para la Last Activity
}

public 
Funcion(index)
{    
    if(
cs_get_user_lastactivity(index) > 30.0)
    {
        
client_print(indexprint_chat"Llevas mucho tiempo AFK")
        
cs_set_user_lastactivity(index0.0)
    }

PHP Code:
/* Obtiene/establece el tiempo en que la C4 explota. */
native Float:cs_get_c4_explode_time(index);

native cs_set_c4_explode_time(indexFloat:value);

/* Obtiene/establece si la C4 esta siendo defusada */
native bool:cs_get_c4_defusing(c4index);

native cs_set_c4_defusing(c4indexbool:defusing);
Ejemplo:
#include <engine>

public plugin_init() {
    
register_plugin("Test Explode/Defuse C4""Beta""GlaDiuS")
    
    
register_clcmd("say /c4bomb2""Funcion"// hookeamos el comando para la C4
}

public 
Funcion(index)
{    
    new 
bombent find_ent_by_class(0"weapon_c4"); // entidad de la C4
    
    
if(cs_get_c4_explode_time(bombent) < 5// detectamos si quedan menos de 5 para explotar
        
client_print(indexprint_chat"Explotara pronto, alejate"// mensaje tipo chat
        
    
if(cs_get_c4_defusing(bombent)) // detectamos si se esta defuseando.
        
client_print(indexprint_chat"Defusando..."// mensaje tipo chat

PHP Code:
/**
* es llamada cuando en el CS internamente lanza un comando a un player. esto se hace para 
* algunas funciones, sobre todo la funcionalidad rebuy/autobuy. esto tambien es usado para
* pasar comandos internamente a los Bots.
*
* @param id            index del usuario.
* @param cmd            Command string.
* @return                PLUGIN_HANDLED para bloquear, PLUGIN_CONTINUE para una operacion normal. */
forward CS_InternalCommand(id, const cmd[]);

ejemplo:
public 
plugin_init() {
    
register_plugin("Test Forward Internal Command""Beta""GlaDiuS")
    
    
register_clcmd("say /internalc""Funcion"// hookeamos el comando para Internal Command
}

public 
Funcion(index)
{    
    
CS_InternalCommand(index"rebuy")

__________________
Proyects
Kreedz Chile Mod [100%] (Fixing some details).


Last edited by gladius; 12-28-2012 at 19:14.
gladius is offline
Send a message via MSN to gladius Send a message via Skype™ to gladius
gladius
Veteran Member
Join Date: Jul 2008
Location: Santiago, Chile
Old 02-17-2010 , 18:47   Re: [TUT]Modulos basicos [Fun, Cstrike, Engine, Fakemeta, Hamsandwich]
#2


Hamsandwich - incompleto(falta traducir)

Regresar Arriba

PHP Code:
/* Hookea la tabla virtual para la clase de entidad especifica.
 * Mira en los Ham num en la lista de parametros.
 *
 * @param function        La funcion que se hookeara
 * @param EntityClass    El nombre de la entidad a Hookear
 * @param callback        La forward que sera llamada.
 * @param post            Whether or not to forward this in post.
 * @return                 Returns a handle to the forward.  Use EnableHamForward/DisableHamForward to toggle the forward on or off.
 */
native HamHook:RegisterHam(Ham:function, const EntityClass[], const Callback[], Post=0);

/* Hookea la tabla virtual para la clase de entidad especifica.
 * Mira en los Ham num en la lista de parametros.
 *
 * @param function        La funcion que se hookeara
 * @param EntityId        El nombre de la entidad a Hookear
 * @param callback        La forward que sera llamada.
 * @param post            Whether or not to forward this in post.
 * @return                 Returns a handle to the forward.  Use EnableHamForward/DisableHamForward to toggle the forward on or off.
 */
native HamHook:RegisterHamFromEntity(Ham:function, EntityId, const Callback[], Post=0);

Ejemplo:
#include <engine> // modulo

public plugin_init() {
    
register_plugin("Test RegisterHam""Beta""GlaDiuS")
    
    
RegisterHam(Ham_Spawn"player""Funcion_Post"1// forward, cuando un jugador espawnea. (1 = despues de haber espawneado)
    
RegisterHam(Ham_Weapon_SecondaryAttack"weapon_usp""Funcion2_Post"1// forward, cuando un jugador apreta el boton secundario. (1 = despues de haber apretado el boton)
    
    
new entity create_entity("player"// creamos la entidad
    
RegisterHamFromEntity(Ham_Killedentity"Funcion3"// forward, cuando la entidad muere.
}

public 
Funcion_Post(index)
    
client_print(indexprint_chat"Comienza la ronda. ¿Estas listo para matar?"// mensaje tipo chat

public Funcion2_Post(entity)
{
    new 
index // variable para detectar al index
    
index entity_get_edict(entityEV_ENT_owner// detectamos al jugador que tiene la entidad.
    
    
client_print(indexprint_chat"usaste el boton secundario con la USP"// mensaje tipo chat
}
    
public 
Funcion3(indexattacker)
{
    new 
aName[32// variable que usaremos para le nombre del atacante
    
new idName[32// variable que usaremos para le nombre de la victima
    
    
get_user_name(attackeraNamecharsmax(aName)) // detectamos el nombre del atacante
    
get_user_name(indexidNamecharsmax(idName)) // detectamos el nombre de la victima
    
    
client_print(indexprint_chat"te ha matado %s"aName// mensaje tipo chat
    
client_print(attackerprint_chat"mataste a %s"idName// mensaje tipo chat

PHP Code:
/* Stops a ham forward from triggering.
 * Use the return value from RegisterHam as the parameter here!
 *
 * @param fwd            The forward to stop.
 */
native DisableHamForward(HamHook:fwd);

/* Starts a ham forward back up.
 * Use the return value from RegisterHam as the parameter here!
 *
 * @param fwd            The forward to re-enable.
 */
native EnableHamForward(HamHook:fwd);

/* Executes the virtual function on the entity.
 * Look at the Ham enum for parameter lists.
 *
 * @param function        The function to call.
 * @param id            The id of the entity to execute it on.
 */
native ExecuteHam(Ham:function, thisany:...);

/* Executes the virtual function on the entity, this will trigger all hooks on that function.
 * Be very careful about recursion!
 * Look at the Ham enum for parameter lists.
 *
 * @param function        The function to call.
 * @param id            The id of the entity to execute it on.
 */
native ExecuteHamB(Ham:function, thisany:...);

Ejemplo:
#include <engine> // modulo

const EXTRAOFFSET_INDEX // offset para el player
const OFFSET_ActiveItem 373 // ofset del item que tiene en mano

new HamHook:ResetMaxSpeed // variable que saremos en enable/disable forward

public plugin_init()
{
    
register_plugin("Test Enable/Disable Forward & ExecuteHam/HamB""Beta""GlaDiuS")
    
    
ResetMaxSpeed RegisterHam(Ham_Item_PreFrame"player""Funcion_ResetMaxSpeed"// Ham hook que usaremos para la Maxspeed
    
RegisterHam(Ham_Killed"player""Funcion_Killed"// forward, cuando el jugador muere.
    
    
register_event("HLTV""Funcion_NewRound""a""1=0""2=0"// evento que es llamado cuando un playe esta con el freeze time
    
register_logevent("Funcion_RoundStart"2"1=Round_Start"// evento llamado cuando se acaba el freeze tiem y puede moverse.
}

public 
Funcion_Killed(index)
{
    
ExecuteHamB(Ham_CS_RoundRespawnindex);
}

public 
Funcion_NewRound()
{
    
EnableHamForward(ResetMaxSpeed// activamos la forward Ham_Item_PreFrame
}

public 
Funcion_RoundStart()
{
    
DisableHamForward(ResetMaxSpeed// paramos la llamada a la forward Ham_Item_PreFrame
}

public 
Funcion_ResetMaxSpeed(index)
{
    if( 
is_user_connected(index) && get_user_team(index) == 1// detectamos si el jugador esta conectado y si es del team TT
    
{
        new 
Float:MaxSpeed // variable para la speed
        
        
new ActiveItem get_pdata_cbase(indexOFFSET_ActiveItemEXTRAOFFSET_INDEX// detectamos el item que tenga el player
        
if( ActiveItem // si el item es mayor a 0
        
{
            
ExecuteHam(Ham_CS_Item_GetMaxSpeedActiveItemMaxSpeed// le seteamos el maxspeed que tenga el arma
        
}
        else 
// contrario al if
        
{
            
MaxSpeed 250.0 // si el player no tiene arma le seteamos 250 a la variable
        
}
        
        
entity_set_float(indexEV_FL_maxspeedMaxSpeed// le seteamos la velocidad
        
        
return HAM_SUPERCEDE // el plugin termina
    
}
    return 
HAM_IGNORED // el plugin continua

PHP Code:
/* Gets the return status of the current hook.
 * This is useful to determine what return natives to use.
 *
 * @return                The current status of the hook (such as HAM_SUPERCEDE).
 */
native GetHamReturnStatus();

/* Gets the return value of a hook for hooks that return integers or booleans.
 *
 * @param output        The variable to store the value in.
 */
native GetHamReturnInteger(&output);

/* Gets the return value of a hook for hooks that return float.
 *
 * @param output        The variable to store the value in.
 */
native GetHamReturnFloat(&Float:output);

/* Gets the return value of a hook for hooks that return Vectors.
 *
 * @param output        The variable to store the value in.
 */
native GetHamReturnVector(Float:output[3]);

/* Gets the return value of a hook for hooks that return entities.
 *
 * @param output        The variable to store the value in. Will be -1 on null.
 */
native GetHamReturnEntity(&output);

/* Gets the return value of a hook for hooks that return strings.
 *
 * @param output        The buffer to store the string in.
 * @param size            The string size of the buffer.
 */
native GetHamReturnString(output[], size);

/* Gets the original return value of a hook for hooks that return integers or booleans.
 *
 * @param output        The variable to store the value in.
 */
native GetOrigHamReturnInteger(&output);

/* Gets the original return value of a hook for hooks that return floats.
 *
 * @param output        The variable to store the value in.
 */
native GetOrigHamReturnFloat(&Float:output);

/* Gets the original return value of a hook for hooks that return Vectors.
 *
 * @param output        The variable to store the value in.
 */
native GetOrigHamReturnVector(Float:output[3]);

/* Gets the original return value of a hook for hooks that return entities.
 *
 * @param output        The variable to store the value in. -1 on null.
 */
native GetOrigHamReturnEntity(&output);

/* Gets the original return value of a hook for hooks that return strings.
 *
 * @param output        The buffer to store the string in.
 * @param size            The size of the buffer.
 */
native GetOrigHamReturnString(output[], size);


/* Sets the return value of a hook that returns an integer or boolean.
 * This needs to be used in conjunction with HAM_OVERRIDE or HAM_SUPERCEDE.
 *
 * @param value                The value to set the return to.
 */
native SetHamReturnInteger(value);

/* Sets the return value of a hook that returns a float.
 * This needs to be used in conjunction with HAM_OVERRIDE or HAM_SUPERCEDE.
 *
 * @param value                The value to set the return to.
 */
native SetHamReturnFloat(Float:value);

/* Sets the return value of a hook that returns a Vector.
 * This needs to be used in conjunction with HAM_OVERRIDE or HAM_SUPERCEDE.
 *
 * @param value                The value to set the return to.
 */
native SetHamReturnVector(const Float:value[3]);

/* Sets the return value of a hook that returns an entity.  Set to -1 for null.
 * This needs to be used in conjunction with HAM_OVERRIDE or HAM_SUPERCEDE.
 *
 * @param value                The value to set the return to.
 */
native SetHamReturnEntity(value);

/* Sets the return value of a hook that returns a string.
 * This needs to be used in conjunction with HAM_OVERRIDE or HAM_SUPERCEDE.
 *
 * @param value                The value to set the return to.
 */
native SetHamReturnString(const value[]);


Ejemplo:
public 
plugin_init()
{
    
register_plugin("Test GetOrigHam/Get/SetHamReturnStatus/Integer/Float/Vector/Entity/String""Beta""GlaDiuS")
    
    
RegisterHam(Ham_TeamId"player""Funcion_Teamid")
    
RegisterHam(Ham_BloodColor"player""Funcion_BloodColor")
}

public 
Funcion_Teamid(index)
{    
    
SetHamReturnString("Revolucion"// creamos un nombre al team
    
    
new string[30// variable para detectar el nombre del team
    
new origstring[30// variable para detectar el nombre original del team
    
    
GetHamReturnString(stringcharsmax(string)) // detectamos el nombre que tiene el team
    
GetOrigHamReturnString(origstringcharsmax(origstring)) // detectamos el nombre original del team
    
    
client_print(indexprint_chat"tu team es: %s , tu team original es"stringorigstring// mensaje tipo chat
}

public 
Funcion_BloodColor(index)
{    
    
SetHamReturnInteger(30// creamos un numero para la sangre
    
    
new integer // variable para detectar el valor de la sangre (hexadecimal)
    
new originteger // variable para detectar el valor original de la sangre (hexadecimal)
    
    
GetHamReturnInteger(integer) // detectamos el valor de la sangre
    
GetOrigHamReturnInteger(originteger// detectamos el valor original de la sangre
    
    
client_print(0print_chat"El color (en formato HEX) de la sangre es: %d - color original %d"integeroriginteger// mensaje tipo chat

PHP Code:
/* Sets a parameter on the fly of the current hook.  This has no effect in post hooks.
 * Use this on parameters that are integers.
 *
 * @param which                Which parameter to change.  Starts at 1, and works up from the left to right.  1 is always "this".
 * @param value                The value to change it to.
 */
native SetHamParamInteger(whichvalue);

/* Sets a parameter on the fly of the current hook.  This has no effect in post hooks.
 * Use this on parameters that are floats.
 *
 * @param which                Which parameter to change.  Starts at 1, and works up from the left to right.  1 is always "this".
 * @param value                The value to change it to.
 */
native SetHamParamFloat(whichFloat:value);

/* Sets a parameter on the fly of the current hook.  This has no effect in post hooks.
 * Use this on parameters that are Vectors.
 *
 * @param which                Which parameter to change.  Starts at 1, and works up from the left to right.  1 is always "this".
 * @param value                The value to change it to.
 */
native SetHamParamVector(which, const Float:value[3]);

/* Sets a parameter on the fly of the current hook.  This has no effect in post hooks.
 * Use this on parameters that are entities.
 *
 * @param which                Which parameter to change.  Starts at 1, and works up from the left to right.  1 is always "this".
 * @param value                The value to change it to.
 */
native SetHamParamEntity(whichvalue);

/* Sets a parameter on the fly of the current hook.  This has no effect in post hooks.
 * Use this on parameters that are strings.
 *
 * @param which                Which parameter to change.  Starts at 1, and works up from the left to right.  1 is always "this".
 * @param value                The value to change it to.
 */
native SetHamParamString(which, const output[]);

/* Sets a parameter on the fly of the current hook.  This has no effect in post hooks.
 * Use this on parameters that are trace result handles.
 *
 * @param which                Which parameter to change.  Starts at 1, and works up from the left to right.  1 is always "this".
 * @param value                The value to change it to.
 */
native SetHamParamTraceResult(whichtr_handle);


Ejemplo:
public 
plugin_init()
{
    
register_plugin("Test SetHamParamInteger/Float/Vector/Entity/String/TraceResult""Beta""GlaDiuS")
    
    
RegisterHam(Ham_TakeDamage"player""Funcion_TakeDamage"// forward del takedamage
}

public 
Funcion_TakeDamage(indexinflictorattackerFloat:damagedamagebits)    
    
SetHamParamFloat(4damage 0.5// le cambiamos el daño a todas las armas(daño del arma * 0.5) 
PHP Code:
/* Returns whether or not the function for the specified Ham is valid.
 * Things that would make it invalid would be bounds (an older module version
 *  may not have all of the functions), and the function not being found in
 *  the mod's hamdata.ini file.
 *
 * @param function        The function to look up.
 * @return                true if the function is valid, false otherwise.
 */
native bool:IsHamValid(Ham:function);

Ejemplo:
public 
plugin_init()
{
    
register_plugin("Test HamIsValid""Beta""GlaDiuS")
    
    if(
IsHamValid(Ham_Spawn)) // detectamos si la forward es valida
    
{
        
RegisterHam(Ham_Spawn"player""Funcion_Spawn"// forward cuando  un player espawnea
    
}
}

public 
Funcion_Spawn(index)    
    
client_print(indexprint_chat"ronda esta comenzado, ¿Listo para luchar?"// mensaje tipo chat 
PHP Code:
/* This is used to compliment fakemeta's {get,set}_pdata_{int,float,string}.
 * This requires the mod to have the pev and base fields set in hamdata.ini.
 * Note this dereferences memory! Improper use of this will crash the server.
 * This will return an index of the corresponding cbase field in private data.
 * Returns -1 on a null entry.
 *
 * @param id            The entity to examine the private data.
 * @param offset        The windows offset of the data.
 * @param linuxdiff        The linux difference of the data.
 * @return                The index of the corresponding pdata field. -1 for none set.
 */
native get_pdata_cbase(idoffsetlinuxdiff=5);

/* This is used to compliment fakemeta's {get,set}_pdata_{int,float,string}.
 * This requires the mod to have the pev and base fields set in hamdata.ini.
 * This will set the corresponding cbase field in private data with the index.
 * Pass -1 to null the entry.
 *
 * @param id            The entity to examine the private data.
 * @param offset        The windows offset of the data.
 * @param value            The index to store, -1 for invalid
 * @param linuxdiff        The linux difference of the data.
 */
native set_pdata_cbase(idoffsetvaluelinuxdiff=5);

/* This is similar to the get_pdata_cbase, however it does not dereference memory.
 * This is many times slower than get_pdata_cbase, and this should only be used 
 * for testing and finding of offsets, not actual release quality plugins.
 * This will return an index of the corresponding cbase field in private data.
 * Returns -1 on a null entry. -2 on an invalid entry.
 *
 * @param id            Entry to examine the private data.
 * @param offset        The windows offset of the data.
 * @param linuxdiff        The linux difference of the data.
 * @return                The index of the corresponding pdata field, -1 for null, -2 for invalid.
 */
native get_pdata_cbase_safe(idoffsetlinuxdiff=5);

Ejemplo:
#include <engine>
#include <fakemeta>

const m_pPlayer 41
const m_flNextPrimaryAttack 46
const m_flNextSecondaryAttack 47
const LINUX_OFFSET_WEAPONS 4

const m_iRadiosLeft 192

public plugin_init() {
    
register_plugin"Test Get/Set_pdata_cbase/cbase_safe""Beta""GlaDiuS" );
    
    
// get_pdata_cbase
    
RegisterHam(Ham_Item_Deploy"weapon_knife""Funcion_KnifeDeploy"1); // forward , cuando obtiene un arma en este caso un knife
    
    // set_pdata_cbase
    
RegisterHam(Ham_Spawn"player""Funcion_Spawn"); // forward, cuando espawnea
    
    
new const Radio[3][] = { "radio1""radio2""radio3" // registramos los tipos de radios que debemos bloquear
    
for(new i<= 3i++) // creamos un loop con las radios
        
register_clcmd(Radio[i], "Radios"// aqui ponemos los comandos para ser bloqueados
        
    
get_pdata_cbase_safe(index
}

// set_pdata_cbase
public Radios()
    return 
PLUGIN_HANDLED // no dejas que la funcion siga, se termina.

public Funcion_Spawn(index)
{
    
set_pdata_cbase(indexm_iRadiosLeft0// con este bloqueamos la radio
}
//

// get_pdata_cbase - Creditos a Exolent
public Funcion_KnifeDeploy(Entity) {
    new 
index get_pdata_cbase(Entitym_pPlayer)
    
entity_set_string(indexEV_SZ_viewmodel"")
    
entity_set_string(indexEV_SZ_weaponmodel"")
    
set_pdata_float(Entitym_flNextPrimaryAttack9999.0LINUX_OFFSET_WEAPONS)
    
set_pdata_float(Entitym_flNextSecondaryAttack9999.0LINUX_OFFSET_WEAPONS)

PHP Code:
// This is the callback from the module, this handles any fatal errors.
// This will in turn call the "HamFilter(Ham:id, HamError:err, const reason[])" public, if it exists.
// Return PLUGIN_HANDLED from within the HamFilter to stop the plugin from failing.
// Any other return value will fail the plugin.
// You do not need to have a HamFilter, if there is none, all fatal errors will fail the plugin.
// Do not modify this!
public __fatal_ham_error(Ham:idHamError:err, const reason[])
{
    
    new 
func=get_func_id("HamFilter", -1);
    new 
bool:fail=true;
    
    if (
func != -&& callfunc_begin_i(func, -1)==1)
    {
        
callfunc_push_int(_:id);
        
callfunc_push_int(_:err);
        
callfunc_push_str(reasonfalse);
        if (
callfunc_end()==PLUGIN_HANDLED)
        {
            
fail=false;
        }
    }
    if (
fail)
    {
        
set_fail_state(reason);
    }
    

Ham Constant
PHP Code:
enum Ham
{
    
/**
     * Description:     This is typically called whenever an entity is created. 
     *                    It is the virtual equivilent of spawn from the engine.
     *                    Some mods call this on player spawns too.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_Spawn, this);
     */
    
Ham_Spawn 0
                        
    
/**
     * Description:     This is typically called on map change.
     *                    This will typically precache all assets required by the entity.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_Precache, this);
     */
    
Ham_Precache,
    
    
/**
     * Description:        Typically this is similar to an engine keyvalue call.
     *                    Use the kvd natives from fakemeta to handle the kvd_handle passed.
     *                    NOTE: Do not pass handle 0 to this! Use get_kvd_handle(0) from fakemeta instead!
     * Forward params:    function(this, kvd_handle);
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_Keyvalue, this, kvd_handle);
     */
    
Ham_Keyvalue,
    
    
/**
     * Description:        Returns flags for how an entity can be used (FCAP_* constants in hlsdk_const.inc)
     * Forward params:    function(this)
     * Return type:        Integer.
     * Execute params:    ExecuteHam(Ham_ObjectCaps, this);
     */
    
Ham_ObjectCaps,
    
    
/**
     * Description:        Usually called to activate some objects.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_Activate, this);
     */
    
Ham_Activate,
    
    
/**
     * Description:        Usually called after the engine call with the same name.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_SetObjectCollisionBox, this);
     */
    
Ham_SetObjectCollisionBox,
    
    
/**
     * Description:        Returns an integer number that corresponds with what type of entity this is.
     * Forward params:    function(this)
     * Return type:        Integer.
     * Execute params:    ExecuteHam(Ham_Classify, this);
     */
    
Ham_Classify,
    
    
/**
     * Description:        Typically called when an entity dies to notify any children entities about the death.
     * Forward params:    function(this, idchild)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_DeathNotice, this, idchild)
     */
    
Ham_DeathNotice,
    
    
/**
     * Description:        Usually called whenever an entity gets attacked by a hitscan (such as a gun) weapon.
     *                    Use the get/set tr2 natives in fakemeta to handle the traceresult data.
     *                    Do not use a handle of 0 as a traceresult in execution, use create_tr2() from Fakemeta
     *                    to pass a custom handle instead.  (Don't forget to free the handle when you're done.)
     * Forward params:    function(this, idattacker, Float:damage, Float:direction[3], traceresult, damagebits)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_TraceAttack, this, idattacker, Float:damage, Float:direction[3], tracehandle, damagebits);
     */
    
Ham_TraceAttack,
    
    
/**
     * Description:        Usually called whenever an entity takes any kind of damage.
     *                    Inflictor is the entity that caused the damage (such as a gun).
     *                    Attacker is the entity that tirggered the damage (such as the gun's owner).
     * Forward params:    function(this, idinflictor, idattacker, Float:damage, damagebits);
     * Return type:        Integer.
     * Execute params:    ExecuteHam(Ham_TakeDamage, this, idinflictor, idattacker, Float:damage, damagebits);
     */
    
Ham_TakeDamage,
    
    
/**
     * Description:        Usually called whenever an entity gets a form of a heal.
     * Forward params:    function(this, Float:health, damagebits);
     * Return type:        Integer.
     * Execute params:    ExecuteHam(Ham_TakeHealth, this, Float:health, damagebits);
     */
    
Ham_TakeHealth,
    
    
/**
     * Description:        Normally called whenever an entity dies.
     * Forward params:    function(this, idattacker, shouldgib)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_Killed, this, idattacker, shouldgib);
     */
    
Ham_Killed,
    
    
/**
     * Description:        Normally returns the blood color of the entity.
     * Forward params:    function(this)
     * Return type:        Integer.
     * Execute params:    ExecuteHam(Ham_BloodColor, this)
     */
    
Ham_BloodColor,
    
    
/**
     * Description:        Traces where blood should appear.
     * Forward params:    function(this, Float:Damage, Float:Direction[3], trace_handle, damagebits);
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_TraceBleed, this, Float:damage, Float:direction[3], trace_handle, damagebits);
     */
    
Ham_TraceBleed,
    
    
/**
     * Description:        Returns whether an entity is activated.
     * Forward params:    function(this, idActivator);
     * Return type:        Integer.
     * Execute params:    ExecuteHam(Ham_IsTriggered, this, idActivator);
     */
    
Ham_IsTriggered,
    
    
/**
     * Description:        Returns the id of the entity if its class is derived off of CBaseMonster, -1 otherwise.
     * Forward params:    function(this)
     * Return type:        Entity.
     * Execute params:    ExecuteHam(Ham_MyMonsterPointer, this);
     */
    
Ham_MyMonsterPointer,
    
    
/**
     * Description:        Returns the id of the entity if its class is derived off of CBaseSquadMonster, -1 otherwise.
     * Forward params:    function(this)
     * Return type:        Entity.
     * Execute params:    ExecuteHam(Ham_MySquadMonsterPointer, this);
     */
    
Ham_MySquadMonsterPointer,
    
    
/**
     * Description:        Returns the toggle state of the entity.
     * Forward params:    function(this)
     * Return type:        Integer.
     * Execute params:    ExecuteHam(Ham_GetToggleState, this);
     */
    
Ham_GetToggleState,
    
    
/**
     * Description:        Typically adds points to the entity.
     * Forward params:    function(this, points, bool:cangonegative);
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_AddPoints, this, points, bool:cangonegative);
     */
    
Ham_AddPoints,

    
/**
     * Description:        Typically adds points to everybody on the entity's team.
     * Forward params:    function(this, points, bool:cangonegative);
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_AddPointsToTeam, this, points, bool:cangonegative);
     */
    
Ham_AddPointsToTeam,
    
    
/**
     * Description:        Adds an item to the player's inventory.
     * Forward params:    function(this, idother);
     * Return type:        Integer.
     * Execute params:    ExecuteHam(Ham_AddPlayerItem, this, idother);
     */
    
Ham_AddPlayerItem,
    
    
/**
     * Description:        Removes an item to the player's inventory.
     * Forward params:    function(this, idother);
     * Return type:        Integer.
     * Execute params:    ExecuteHam(Ham_RemovePlayerItem, this, idother);
     */
    
Ham_RemovePlayerItem,
    
    
/**
     * Description:        Gives ammo to the entity.
     * Forward params:    function(this, Amount, const Name[], Max)
     * Return type:        Integer.
     * Execute params:    ExecuteHam(Ham_GiveAmmo, this, amount, "type", max);
     */
    
Ham_GiveAmmo,
    
    
/**
     * Description:        Unsure, I believe this is the delay between activation for an entity.
     * Forward params:    function(this)
     * Return type:        Float.
     * Execute params:    ExecuteHam(Ham_GetDelay, this, Float:output)
     */
    
Ham_GetDelay,
    
    
/** 
     * Description:        Whether or not the entity is moving.
     * Forward params:    function(this);
     * Return type:        Integer.
     * Execute params:    ExecuteHam(Ham_IsMoving, this);
     */
    
Ham_IsMoving,
    
    
/**
     * Description:        Unsure.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_OverrideReset, this)
     */
    
Ham_OverrideReset,
    
    
/**
     * Description:        Returns the damage decal of the entity for the damage type.
     * Forward params:    function(this, damagebits)
     * Return type:        Integer.
     * Execute params:    ExecuteHam(Ham_DamageDecal, this);
     */
    
Ham_DamageDecal,
    
    
/**
     * Description:        Sets the toggle state of the entity.
     * Forward params:    function(this, state)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_SetToggleState, this, state);
     */
    
Ham_SetToggleState,
    
    
/**
     * Description:        Not entirely sure what this does.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_StartSneaking, this);
     */
    
Ham_StartSneaking,

    
/**
     * Description:        Not entirely sure what this does.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_StopSneaking, this);
     */
    
Ham_StopSneaking,
    
    
/**
     * Description:        Not entirely sure.
     * Forward params:    function(this, idOn)
     * Return type:        Integer (boolean).
     * Execute params:    ExecuteHam(Ham_OnControls, this, idOn);
     */
    
Ham_OnControls,
    
    
/** 
     * Description:        Whether or not the entity is sneaking.
     * Forward params:    function(this);
     * Return type:        Integer (boolean).
     * Execute params:    ExecuteHam(Ham_IsSneaking, this);
     */
    
Ham_IsSneaking,
    
    
/** 
     * Description:        Whether or not the entity is alive.
     * Forward params:    function(this);
     * Return type:        Integer (boolean).
     * Execute params:    ExecuteHam(Ham_IsAlive, this);
     */
    
Ham_IsAlive,
    
    
/** 
     * Description:        Whether or not the entity uses a BSP model.
     * Forward params:    function(this);
     * Return type:        Integer (boolean).
     * Execute params:    ExecuteHam(Ham_IsBSPModel, this);
     */
    
Ham_IsBSPModel,
    
    
/** 
     * Description:        Whether or not the entity can reflect gauss shots..
     * Forward params:    function(this);
     * Return type:        Integer (boolean).
     * Execute params:    ExecuteHam(Ham_ReflectGauss, this);
     */
    
Ham_ReflectGauss,
    
    
/**
     * Description:        Whether or not the target is the same as the one passed.
     *                    Note the strindex parameter is a string passed that has been allocated by the engine.
     *                    Use fakemeta's EngFunc_SzFromIndex to convert to a normal string, or fakemeta's
     *                    EngFunc_AllocString to create a new string.
     * Forward params:    function(this, strindex).
     * Return type:        Integer (boolean).
     * Execute params:    ExecuteHam(Ham_HasTarget, this, strindex);
     */
    
Ham_HasTarget,
    
    
/** 
     * Description:        Whether or not the entity is in the world.
     * Forward params:    function(this);
     * Return type:        Integer (boolean).
     * Execute params:    ExecuteHam(Ham_IsInWorld, this);
     */
    
Ham_IsInWorld,
    
    
/** 
     * Description:        Whether or not the entity is a player.
     * Forward params:    function(this);
     * Return type:        Integer (boolean).
     * Execute params:    ExecuteHam(Ham_IsPlayer, this);
     */
    
Ham_IsPlayer,

    
/** 
     * Description:        Whether or not the entity is a net client.
     * Forward params:    function(this);
     * Return type:        Integer (boolean).
     * Execute params:    ExecuteHam(Ham_IsNetClient, this);
     */
    
Ham_IsNetClient,

    
/** 
     * Description:        Get the entity's team id.
     * Forward params:    function(this);
     * Return type:        String (string length returned and string byref'd in ExecuteHam).
     * Execute params:    ExecuteHam(Ham_TeamId, this, buffer[], size);
     */
    
Ham_TeamId,
    
    
/**
     * Description:        Returns the next target of this.
     * Forward params:    function(this);
     * Return type:        Entity.
     * Execute params:    ExecuteHam(Ham_GetNextTarget, this);
     */
    
Ham_GetNextTarget,
    
    
/**
     * Description:        Called whenever an entity thinks.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_Think, this);
     */
    
Ham_Think,
    
    
/**
     * Description:        Called whenever two entities touch.
     * Forward params:    function(this, idother);
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_Touch, this, idother);
     */
    
Ham_Touch,
    
    
/**
     * Description:        Called whenver one entity uses another.
     * Forward params:    function(this, idcaller, idactivator, use_type, Float:value)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_Use, this, idcaller, idactivator, use_type, Float:value);
     */
    
Ham_Use,
    
    
/**
     * Description:        Normally called whenever one entity blocks another from moving.
     * Forward params:    function(this, idother);
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_Blocked, this, idother);
     */
    
Ham_Blocked,
    
    
/**
     * Description:        Normally called when a map-based item respawns, such as a health kit or something.
     * Forward params:    function(this);
     * Return type:        Entity.
     * Execute params:    ExecuteHam(Ham_Respawn, this);
     */
    
Ham_Respawn,
    
    
/**
     * Description:        Used in Half-Life to update a monster's owner.
     * Forward params:    function(this);
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_UpdateOwner, this);
     */
    
Ham_UpdateOwner,
    
    
/**
     * Description:        Normally called whenever a barnacle grabs the entity.
     * Forward params:    function(this);
     * Return type:        Integer.
     * Execute params:    ExecuteHam(Ham_FBecomeProne, this);
     */
    
Ham_FBecomeProne,
    
    
/**
     * Description:        Returns the center of the entity.
     * Forward params:    function(this);
     * Return type:        Vector (byref'd in Execute).
     * Execute params:    ExecuteHam(Ham_Center, this, Float:output[3]);
     */
    
Ham_Center,
    
    
/**
     * Description:        Returns the eye position of the entity.
     * Forward params:    function(this);
     * Return type:        Vector (byref'd in Execute).
     * Execute params:    ExecuteHam(Ham_EyePosition, this, Float:output[3]);
     */
    
Ham_EyePosition,

    
/**
     * Description:        Returns the ear position of the entity.
     * Forward params:    function(this);
     * Return type:        Vector (byref'd in Execute).
     * Execute params:    ExecuteHam(Ham_EarPosition, this, Float:output[3]);
     */
    
Ham_EarPosition,
    
    
/**
     * Description:        Position to shoot at.
     * Forward params:    function(this, Float:srcvector[3]);
     * Return type:        Vector (byref'd in Execute).
     * Execute params:    ExecuteHam(Ham_BodyTarget, Float:srcvector[3], Float:returnvector[3])
     */
    
Ham_BodyTarget,
    
    
/**
     * Description:        Returns the illumination of the entity.
     * Forward params:    function(this)
     * Return type:        Integer.
     * Execute params:    ExecuteHam(Ham_Illumination, this);
     */
    
Ham_Illumination,
    
    
/**
     * Description:        Unsure, I assume it is whether or not the other entity is visible to this entity.
     * Forward params:    function(this, idOther);
     * Return type:        Integer (boolean).
     * Execute params:    ExecuteHam(Ham_FVisible, this, idOther);
     */
    
Ham_FVisible,
    
    
/**
     * Description:        Unsure, I assume it is whether or not the target vector is visible to this entity.
     * Forward params:    function(this, const Float:origin[3]);
     * Return type:        Integer (boolean).
     * Execute params:    ExecuteHam(Ham_FVecVisible, this, const Float:origin[3]);
     */
    
Ham_FVecVisible,

    
    
/**
     * Players have all the attributes of normal entities, in addition to these.
     */
     
    /**
     * Description:        Typically called every frame when a player has jump held.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_Player_Jump, this);
     */
    
Ham_Player_Jump,

    
/**
     * Description:        Typically called every frame when a player has duck held.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_Player_Duck, this);
     */
    
Ham_Player_Duck,
    
    
/**
     * Description:        Typically called every frame during PlayerPreThink engine call.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_Player_PreThink, this);
     */
    
Ham_Player_PreThink,

    
/**
     * Description:        Typically called every frame during PlayerPostThink engine call.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_Player_PostThink, this);
     */
    
Ham_Player_PostThink,
    
    
/**
     * Description:        Returns a vector that tells the gun position.
     * Forward params:    function(this)
     * Return type:        Vector, byreffed in execute.
     * Execute params:    ExecuteHam(Ham_Player_GetGunPosition, this, Float:output[3]);
     */
    
Ham_Player_GetGunPosition,
    
    
/**
     * Description:        Whether or not the player should fade on death.
     * Forward param:    function(this)
     * Return type:        Integer (boolean).
     * Execute params:    ExecuteHam(Ham_Player_ShouldFadeOnDeath, this);
     */
    
Ham_Player_ShouldFadeOnDeath,

    
/**
     * Description:        Called whenever an impulse command is executed.
     * Forward param:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_Player_ImpulseComands, this);
     */
    
Ham_Player_ImpulseCommands,
    
    
/**
     * Description:        Updates the client's data for hud changes (such as ammo).  Usually called every frame.
     * Forward param:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_Player_UpdateClientData, this);
     */
    
Ham_Player_UpdateClientData,
    
    
/**
     * Items have all the attributes of normal entities in addition to these.
     */
     
    /**
     * Description:        Adds the item to the player.
     * Forward params:    function(this, idPlayer);
     * Return type:        Integer (boolean).
     * Execute params:    ExecuteHam(Ham_Item_AddToPlayer, this, idPlayer);
     */
    
Ham_Item_AddToPlayer,

    
/**
     * Description:        Unsure.
     * Forward params:    function(this, idOriginal);
     * Return type:        Integer (boolean).
     * Execute params:    ExecuteHam(Ham_Item_AddDuplicate, this, idOriginal);
     */
    
Ham_Item_AddDuplicate,
    
    
/**
     * Description:        Whether or not this entity can be deployed.
     * Forward params:    function(this);
     * Return type:        Integer (boolean).
     * Execute params:    ExecuteHam(Ham_Item_CanDeploy, this);
     */
    
Ham_Item_CanDeploy,
    
    
/**
     * Description:        Deploys the entity (usually a weapon).
     * Forward params:    function(this);
     * Return type:        Integer (boolean).
     * Execute params:    ExecuteHam(Ham_Item_Deploy, this);
     */
    
Ham_Item_Deploy,
    
    
/**
     * Description:        Whether or not the entity can be holstered.
     * Forward params:    function(this);
     * Return type:        Integer (boolean).
     * Execute params:    ExecuteHam(Ham_Item_CanHolster, this);
     */
    
Ham_Item_CanHolster,
    
    
/**
     * Description:        Whether or not the entity (usually weapon) can be holstered.
     * Forward params:    function(this)
     * Return type:        Integer (boolean).
     * Execute params:    ExecuteHam(Ham_Item_Holster, this);
     */
    
Ham_Item_Holster,
    
    
/**
     * Description:        Updates the HUD info about this item.
     * Forward params:    function(this);
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_UpdateItemInfo, this);
     */
    
Ham_Item_UpdateItemInfo,
    
    
/**
     * Description:        Called each frame for an item, normally only on active items.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_Item_PreFrame, this);
     */
    
Ham_Item_PreFrame,
    
    
/**
     * Description:        Called each frame for an item, normally only on active items.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_Item_PostFrame, this);
     */
    
Ham_Item_PostFrame,
    
    
/**
     * Description:        Called when an item gets dropped, normally on death only.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_Item_Drop, this);
     */
    
Ham_Item_Drop,
    
    
/**
     * Description:        Normally called when an item gets deleted.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_Item_Drop, this);
     */
    
Ham_Item_Kill,
    
    
/**
     * Description:        Called when an entity starts being attached to (normally invisible and "following") a player.
     * Forward params:    function(this, idPlayer)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_Item_AttachToPlayer, this, idPlayer)
     */
    
Ham_Item_AttachToPlayer,
    
    
/**
     * Description:        Returns the ammo index of the item.
     * Forward params:    function(this)
     * Return type:        Integer.
     * Execute params:    ExecuteHam(Ham_Item_PrimaryAmmoIndex, this);
     */
    
Ham_Item_PrimaryAmmoIndex,
    
    
/**
     * Description:        Returns the secondary ammo index of the item.
     * Forward params:    function(this)
     * Return type:        Integer.
     * Execute params:    ExecuteHam(Ham_Item_SecondaryAmmoIndex, this);
     */
    
Ham_Item_SecondaryAmmoIndex,

    
/**
     * Description:        Updates item data for the client.
     * Forward params:    function(this, idPlayer)
     * Return type:        Integer.
     * Execute params:    ExecuteHam(Ham_Item_UpdateClientData, this, idPlayer);
     */
    
Ham_Item_UpdateClientData,
    
    
/**
     * Description:        Returns the entity index if the item is a weapon, -1 otherwise.
     * Forward params:    function(this)
     * Return type:        Entity.
     * Execute Params:    ExecuteHam(Ham_Item_GetWeaponPtr, this)
     */
    
Ham_Item_GetWeaponPtr,
    
    
/**
     * Description:        Returns the item slot for the item.
     * Forward params:    function(this)
     * Return type:        Integer.
     * Execute Params:    ExecuteHam(Ham_Item_ItemSlot, this)
     */
    
Ham_Item_ItemSlot,
    
    
    
/**
     * Weapons have all the attributes to Ham_Item_*, in addition to these.
     */
     
    /**
     * Description:        Gets ammo from the target weapon.
     * Forward params:    function(this, idTarget)
     * Return type:        Integer.
     * Execute Params:    ExecuteHam(Ham_Weapon_ExtractAmmo, this, idTarget)
     */
    
Ham_Weapon_ExtractAmmo,

    
/**
     * Description:        Gets clip ammo from the target weapon.
     * Forward params:    function(this, idTarget)
     * Return type:        Integer.
     * Execute Params:    ExecuteHam(Ham_Weapon_ExtractAmmo, this, idTarget)
     */
    
Ham_Weapon_ExtractClipAmmo,
    
    
/**
     * Description:        Unsure.
     * Forward params:    function(this)
     * Return type:        Integer (boolean).
     * Execute params:    ExecuteHam(Ham_Weapon_AddWeapon, this);
     */
    
Ham_Weapon_AddWeapon,
    
    
/**
     * Description:        Plays the weapon's empty sound.
     * Forward params:    function(this)
     * Return type:        Integer (boolean).
     * Execute params:    ExecuteHam(Ham_Weapon_PlayEmptySound, this);
     */
    
Ham_Weapon_PlayEmptySound,

    
/**
     * Description:        Sets the weapon so that it can play empty sound again.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_Weapon_ResetEmptySound, this);
     */
    
Ham_Weapon_ResetEmptySound,
    
    
/**
     * Description:        Sends an animation event for the weapon.
     * Forward params:    function(this, iAnim, skiplocal, body);
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_Weapon_SendWeaponAnim, this, iAnim, skiplocal, body);
     */
    
Ham_Weapon_SendWeaponAnim,
    
    
/**
     * Description:        Whether or not the weapon is usable (has ammo, etc.)
     * Forward params:    function(this)
     * Return type:        Integer (boolean).
     * Execute params:    ExecuteHam(Ham_Weapon_IsUsable, this)
     */
    
Ham_Weapon_IsUsable,
    
    
/**
     * Description:        Called when the main attack of a weapon is triggered.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_Weapon_PrimaryAttack, this);
     */
    
Ham_Weapon_PrimaryAttack,
    
    
/**
     * Description:        Called when the secondary attack of a weapon is triggered.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_Weapon_SecondaryAttack, this);
     */
    
Ham_Weapon_SecondaryAttack,
    
    
/**
     * Description:        Called when the weapon is reloaded.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_Weapon_Reload, this);
     */
    
Ham_Weapon_Reload,
    
    
/**
     * Description:        Displays the idle animation for the weapon.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_Weapon_WeaponIdle, this);
     */
    
Ham_Weapon_WeaponIdle,
    
    
/**
     * Description:        There is no more ammo for this gun, so switch to the next best one.
     * Forward params:    function(this)
     * Return type:        None.
     * ExecuteParams:    ExecuteHam(Ham_Weapon_RetireWeapon, this)
     */
    
Ham_Weapon_RetireWeapon,
    
    
/**
     * Description:        Whether or not the weapon should idle.
     * Forward params:    function(this)
     * Return type:        Integer (boolean).
     * Execute Params:    ExecuteHam(Ham_Weapon_ShouldWeaponIdle, this)
     */
    
Ham_Weapon_ShouldWeaponIdle,
    
    
/**
     * Description:        Not sure.
     * Forward params:    function(this)
     * Return type:        Integer (boolean).
     * Execute params:    ExecuteHam(Ham_Weapon_UseDecrement, this);
     */
    
Ham_Weapon_UseDecrement,
     
    
/**
     * Description:        -
     * Forward params:    function(this, someboolvalue)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_TS_BreakableRespawn, this, someboolvalue);
     */
    
Ham_TS_BreakableRespawn,
    
    
/**
     * Description:        -
     * Forward params:    function(this)
     * Return type:        Integer (boolean)
     * Execute params:    ExecuteHam(Ham_TS_CanUsedThroughWalls, this);
     */
    
Ham_TS_CanUsedThroughWalls,
    
    
/**
     * Description:        Unsure - this was removed in TS 3.0 (and thus is deprecated).
     * Forward params:    function(this)
     * Return type:        Integer (I think...)
     * Execute params:    ExecuteHam(Ham_TS_RespawnWait, this);
     */
    
Ham_TS_RespawnWait,

    
/**
     * Description:        This is called on a map reset for most map based entities.
     * Forward params:    function(this);
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_CS_Restart, this);
     */
    
Ham_CS_Restart,
    
    
/**
     * Description:        Respawn function for players/bots only! Do not use this on non player/bot entities!
     * Forward params:    function(this);
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_CS_RoundRespawn, this);
     */
    
Ham_CS_RoundRespawn,
    
/**
     * Description:        Whether or not the player can drop the specified item.
     * Forward params:    function(this)
     * Return type:        Integer
     * Execute params:    ExecuteHam(Ham_CS_Item_CanDrop, this);
     */
    
Ham_CS_Item_CanDrop,
    
    
/**
     * Description:        Gets the maximum speed for whenever a player has the item deployed.
     * Forward params:    function(this);
     * Return type:        Float, byrefed in execute.
     * Execute params:    ExecuteHam(Ham_CS_Item_GetMaxSpeed, this, Float:output);
     */
    
Ham_CS_Item_GetMaxSpeed,

    
/**
     * Description:        I assume this spawns players at the start of a new round.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute Params:    ExecuteHam(Ham_DOD_RoundRespawn, this);
     */
    
Ham_DOD_RoundRespawn,

    
/**
     * Description:        I assume this spawns entities (like func_breakables) at the start of a new round.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute Params:    ExecuteHam(Ham_DOD_RoundRespawnEnt, this);
     */
    
Ham_DOD_RoundRespawnEnt,
    
    
/**
     * Description:        Unsure.
     * Forward params:    function(this)
     * Return type:        None, I think...
     * Execute params:    ExecuteHam(Ham_DOD_RoundStore, this);
     */
    
Ham_DOD_RoundStore,
    
    
/**
     * Description:        Unsure.
     * Forward params:    function(this, someintegervalue)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_DOD_AreaSetIndex, this, someintegervalue)
     */
    
Ham_DOD_AreaSetIndex,
    
    
/**
     * Description:        Unsure
     * Forward params:    function(this, idPlayer)
     * Return type:        None.
     * Execute Params:    ExecuteHam(Ham_DOD_AreaSendStatus, this, idPlayer);
     */
    
Ham_DOD_AreaSendStatus,
    
    
/**
     * Description:        Unsure.
     * Forward params:    function(this)
     * Return type:        Integer.
     * Execute Params:    ExecuteHam(Ham_DOD_GetState, this);
     */
    
Ham_DOD_GetState,
    
    
/**
     * Description:        Unsure.
     * Forward params:    function(this, idtarget)
     * Return type:        Integer.
     * Execute Params:    ExecuteHam(Ham_DOD_GetStateEnt, this, idtarget);
     */
    
Ham_DOD_GetStateEnt,
    
    
/**
     * Description:        Whether or not a player can drop this item.
     * Forward params:    function(this)
     * Return type:        Integer (boolean).
     * Execute Params:    ExecuteHam(Ham_DOD_Item_CanDrop, this);
     */
    
Ham_DOD_Item_CanDrop,

    
/**
     * Description:        Unsure.
     * Forward params:    function(this, iduser)
     * Return type:        Integer.
     * Execute params:    ExecuteHam(Ham_TFC_EngineerUse, this, iduser)
     */
    
Ham_TFC_EngineerUse,
    
    
/**
     * Description:        Unsure.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_TFC_Finished, this);
     */
    
Ham_TFC_Finished,
    
    
/**
     * Description:        Unsure.
     * Forward params:    function(this, entityid, Float:floata, Float:floatb)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_TFC_EmpExplode, this, entityid, Float:floata, Float:floatb)
     */
    
Ham_TFC_EmpExplode,

    
/**
     * Description:        Unsure.
     * Forward params:    function(this, Float:floata, Float:floatb)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_TFC_CalcEmpDmgRad, this, Float:floata, Float:floatb)
     */
    
Ham_TFC_CalcEmpDmgRad,
    
    
/**
     * Description:        Unsure.
     * Forward params:    function(this, entityid)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_TFC_TakeEmpBlast, this, entityid);
     */
    
Ham_TFC_TakeEmpBlast,
    
    
/**
     * Description:        Unsure.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_TFC_EmpRemove, this);
     */
    
Ham_TFC_EmpRemove,
    
    
    
/**
     * Description:        Unsure.
     * Forward params:    function(this, entityid, Float:floata)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_TFC_TakeConcussionBlast, this, entityid, Float:floata);
     */
    
Ham_TFC_TakeConcussionBlast,
    
    
/**
     * Description:        Unsure.
     * Forward params:    function(this, entityid)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_TFC_Concuss, this, entityid);
     */
    
Ham_TFC_Concuss,

    
    
/**
     * Description:        Unsure.
     *                    Is only in ESF Open Beta.
     * Forward params:    function(this)
     * Return type:        Integer (boolean).
     * Execute params:    ExecuteHam(Ham_ESF_IsEnvModel, this);
     */
    
Ham_ESF_IsEnvModel
    
    
/**
     * Description:        Unsure.
     *                    Is only in ESF Open Beta.
     * Forward params:    function(this, entityida, entityidb, Float:floata, Float:floatb, dmgbits)
     * Return type:        Integer.
     * Execute params:    ExecuteHam(Ham_ESF_TakeDamage2, this, entityida, entityidb, Float:floata, Float:floatb, dmgbits);
     */
    
Ham_ESF_TakeDamage2,

    
/**
     * Description:        Returns how many points each entity is worth.
     * Forward params:    function(this)
     * Return type:        Integer.
     * Execute params:    ExecuteHam(Ham_NS_GetPointValue, this);
     */
    
Ham_NS_GetPointValue,
    
    
/**
     * Description:        Unsure.  Probably awards this with the killing of idvictim.
     * Forward params:    function(this, idvictim)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_NS_AwardKill, this, idvictim);
     */
    
Ham_NS_AwardKill,
    
    
/**
     * Description:        Unsure, probably whenever an entity resets after a new round.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_NS_ResetEntity, this);
     */
    
Ham_NS_ResetEntity,
    
    
/**
     * Description:        Unsure.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_NS_UpdateOnRemove, this)
     */
    
Ham_NS_UpdateOnRemove,


    
/** Virtual functions added to TS in TS 3 */
    
    /**
     * Description:        Unsure.
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_TS_GiveSlowMul, this)
     */
    
Ham_TS_GiveSlowMul,
    
    
/**
     * Description:        Unsure.  The second paramater is actually a char.
     * Forward params:    function(this, Float:someval, someotherval)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_TS_GoSlow, this, Float:someval, someotherval)
     */
    
Ham_TS_GoSlow,
    
    
/**
     * Description:        Probably returns true if the user is in slow mo.
     * Forward params:    function(this)
     * Return type:        Integer (boolean).
     * Execute params:    ExecuteHam(Ham_TS_InSlow, this)
     */
    
Ham_TS_InSlow,
    
    
/**
     * Description:        Returns true if the entity is an objective.
     * Forward params:    function(this)
     * Return type:        Integer (boolean).
     * Execute params:    ExecuteHam(Ham_TS_IsObjective, this)
     */
    
Ham_TS_IsObjective,
    
    
/**
     * Description:        Unsure.
     * Forward params:    function(this, bool:someval)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_TS_EnableObjective, this, bool:someval)
     */
    
Ham_TS_EnableObjective,
    
    
/**
     * Description:        Probably called when the engine call to OnEntFreePrivateData is called (the entity destructor.)
     * Forward params:    function(this)
     * Return type:        None.
     * Execute params:    ExecuteHam(Ham_TS_OnEntFreePrivateData, this)
     */
    
Ham_TS_OnFreeEntPrivateData,
    
    
/**
     * Description:        Probably called when the engine call to ShouldCollide is called.
     * Forward params:    function(this, otherEntity)
     * Return type:        Integer (boolean).
     * Execute params:    ExecuteHam(Ham_TS_ShouldCollide, this, otherEntity)
     */
    
Ham_TS_ShouldCollide,


    
/**
     * DONT USE ME LOL
     */
    
HAM_LAST_ENTRY_DONT_USE_ME_LOL
};

enum HamError
{
    
HAM_OK 0,
    
    
HAM_INVALID_FUNC,            // The function is not valid
    
HAM_FUNC_NOT_CONFIGURED,    // This function is not configured in hamdata.ini
    
    
HAM_ERR_END
}; 


__________________
Proyects
Kreedz Chile Mod [100%] (Fixing some details).


Last edited by gladius; 12-28-2012 at 19:00.
gladius is offline
Send a message via MSN to gladius Send a message via Skype™ to gladius
gladius
Veteran Member
Join Date: Jul 2008
Location: Santiago, Chile
Old 02-17-2010 , 18:47   Re: [TUT]Modulos basicos [Fun, Cstrike, Engine, Fakemeta, Hamsandwich]
#3

__________________
Proyects
Kreedz Chile Mod [100%] (Fixing some details).


Last edited by gladius; 12-28-2012 at 19:03.
gladius is offline
Send a message via MSN to gladius Send a message via Skype™ to gladius
gladius
Veteran Member
Join Date: Jul 2008
Location: Santiago, Chile
Old 02-17-2010 , 18:48   Re: [TUT]Modulos basicos [Fun, Cstrike, Engine, Fakemeta, Hamsandwich]
#4

__________________
Proyects
Kreedz Chile Mod [100%] (Fixing some details).


Last edited by gladius; 12-28-2012 at 19:07.
gladius is offline
Send a message via MSN to gladius Send a message via Skype™ to gladius
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 02-17-2010 , 18:49   Re: [TUT]Modulos basicos [Fun, Cstrike, Engine, Fakemeta, Hamsandwich] - Incompleto
#5

we 3 reservados oka .



buen tutorial , pero creo (pienso yo) que tendrias que obtener en varios lugares si el player esta vivo o no..
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
gladius
Veteran Member
Join Date: Jul 2008
Location: Santiago, Chile
Old 02-17-2010 , 18:50   Re: [TUT]Modulos basicos [Fun, Cstrike, Engine, Fakemeta, Hamsandwich] - Incompleto
#6

son ejemplos simple
__________________
Proyects
Kreedz Chile Mod [100%] (Fixing some details).

gladius is offline
Send a message via MSN to gladius Send a message via Skype™ to gladius
Kiske
Veteran Member
Join Date: May 2009
Old 02-17-2010 , 19:18   Re: [TUT]Modulos basicos [Fun, Cstrike, Engine, Fakemeta, Hamsandwich] - En Construcc
#7

Reservaste 3 y son 5 los Modulos qe pusiste..

Vas a tener qe usar un Mensaje para 2 Modulos :E

Te doy un por el esfuerzo si es qe lo escribiste todo vos.
__________________

Kiske is offline
Send a message via Skype™ to Kiske
gladius
Veteran Member
Join Date: Jul 2008
Location: Santiago, Chile
Old 02-17-2010 , 19:19   Re: [TUT]Modulos basicos [Fun, Cstrike, Engine, Fakemeta, Hamsandwich] - En Construcc
#8

reserve 3 porque fun y cstrike son los mas cortos y los hare juntos asique ahi queda el espacio para los demas

y si todo escrito por mi

ahora estoy haciendo cstrike y lo mas probable es que lo ponga hoy
__________________
Proyects
Kreedz Chile Mod [100%] (Fixing some details).

gladius is offline
Send a message via MSN to gladius Send a message via Skype™ to gladius
MouseSplash!
Veteran Member
Join Date: Dec 2009
Location: En Tu Mente!
Old 02-17-2010 , 23:37   Re: [TUT]Modulos basicos [Fun, Cstrike, Engine, Fakemeta, Hamsandwich] - En Construcc
#9

+

me ayudo en una cosita y me dio ideas
MouseSplash! is offline
gladius
Veteran Member
Join Date: Jul 2008
Location: Santiago, Chile
Old 02-18-2010 , 02:46   Re: [TUT]Modulos basicos [Fun, Cstrike, Engine, Fakemeta, Hamsandwich] - En Construcc
#10

actualizado, agregue cstrike... hay ejemplos que no he probado como el del forward internalcommand... porfavor confirmar si funciona
__________________
Proyects
Kreedz Chile Mod [100%] (Fixing some details).

gladius is offline
Send a message via MSN to gladius Send a message via Skype™ to gladius
 



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 01:07.


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