View Single Post
Author Message
Raddish
BANNED
Join Date: Jul 2008
Location: Argentina
Old 09-13-2009 , 02:02   [ZP] Tutorial para agregar un modo!
#1

Como crear un mod [ZP] By Raddish v1.1

Primero agarramos un ZP Virgen

zp_plugin_42.zip (285.0 KB, 244 views) ( VIRGEN )

osea, virgen es que nunca lo tocaron, un ejemplo ideal seria Pw.- (Alexis) o Fraancooo, los 2 son virgen. bueno comensemos,

Primero, enseņare a hacer el modo wesker, que me ayudo a hacerlo FranckitowOw, El lo hiso en mi pc por teamviewer y yo con lo que me acuerdo hago el tutorial, ya hice varios modos. y ninguno con errores hasta ahora :E

1.vamos a
PHP Code:
// Player Models (randomly chosen if more than one) 
y abajo de
PHP Code:
new const model_admin_zombie[][] = { "zombie_source" // Admin (zombie) 
ponemos
PHP Code:
new const model_wesker[][] = { "leet" // wesker 
quedaria

PHP Code:
new const model_admin_zombie[][] = { "zombie_source" // Admin (zombie)
new const model_wesker[][] = { "leet" // wesker 
2.Ahora vamos a
PHP Code:
// Sounds (randomly chosen if more than one) 
y abajo de
PHP Code:
new const sound_swarm[][] = { "ambience/the_horror2.wav" 
ponemos
PHP Code:
new const sound_wesker[][] = { "zombie_plague/survivor1.wav" 
Querdaria
PHP Code:
new const sound_swarm[][] = { "ambience/the_horror2.wav" }
new const 
sound_wesker[][] = { "zombie_plague/survivor1.wav" 
3. Ahora vamos a
PHP Code:
// Dynamic Stuff Limiters (increase if needed) 
abajo de
PHP Code:
const MAX_MODELS_ADM_ZOMBIE 10 
ponemos
PHP Code:
const MAX_MODELS_WESKER 
quedaria
PHP Code:
const MAX_MODELS_ADM_ZOMBIE 10
const MAX_MODELS_WESKER 
4. Ahora vamos a
PHP Code:
// Game modes 
Donde dice
PHP Code:
MODE_PLAGUE 
Le agregamos una coma quedaria asi
PHP Code:
MODE_PLAGUE
ahora, abajo de el ponemos
PHP Code:
MODE_WESKER 
Quedaria
PHP Code:
    MODE_PLAGUE,
    
MODE_WESKER 
5.Ahora buscamos
PHP Code:
// Player vars 
y abajo de
PHP Code:
new g_survivor[33// is survivor 
ponemos
PHP Code:
new g_wesker[33// is wesker 
Quedaria
PHP Code:
new g_survivor[33// is surivor
new g_wesker[33// is wesker 
6.Ahora vamos a
PHP Code:
// Game vars 
buscamos
PHP Code:
new g_survround // survivor round 
y abajo de el ponemos
PHP Code:
new g_weskerround // wesker round 
quedaria
PHP Code:
new g_survround // survivor round
new g_weskerround // wesker round 
7.Ahora vamos a
PHP Code:
// Precached model indexes 
Buscamos
PHP Code:
new g_modelindex_survivor[MAX_MODELS_SURVIVOR
y abajo de el ponemos
PHP Code:
new g_modelindex_wesker[MAX_MODELS_WESKER
Quedaria
PHP Code:
new g_modelindex_survivor[MAX_MODELS_SURVIVOR]
new 
g_modelindex_wesker[MAX_MODELS_WESKER
8.Ahora vamos a
PHP Code:
// CVAR pointers 
Ojo, esto es lo mas complicado siempre puede tirar uno que otro error aca.
vamos a la ultima parte de las cvars
PHP Code:
cvar_nvgcolor[3], cvar_nemnvgcolor[3], cvar_humnvgcolor[3], cvar_flashcolor[3
Vallan ala primera cvar de esa linea
PHP Code:
cvar_nvgcolor 
y borren asta que quede en la linea de arriba asi.
PHP Code:
cvar_hudiconscvar_flashshowallcvar_nvgcolor[3], cvar_nemnvgcolor[3], cvar_humnvgcolor[3], cvar_flashcolor[3
Y le agregamos una coma al final y abrimos una linea para abajo y ponemos
PHP Code:
cvar_weskercvar_weskerchancecvar_weskerminplayerscvar_weskergravitycvar_weskerhpcvar_weskerspd 
Les quedaria
PHP Code:
cvar_hudiconscvar_flashshowallcvar_nvgcolor[3], cvar_nemnvgcolor[3], cvar_humnvgcolor[3], cvar_flashcolor[3],
cvar_weskercvar_weskerchancecvar_weskerminplayerscvar_weskergravitycvar_weskerhpcvar_weskerspd 
9 Parte 1/2.Vamos a
PHP Code:
// Player specific natives 
y abajo de
PHP Code:
    register_native("zp_get_user_survivor""native_get_user_survivor"1
ponemos
PHP Code:
    register_native("zp_get_user_wesker""native_get_user_wesker"1
Quedaria
PHP Code:
    register_native("zp_get_user_survivor""native_get_user_survivor"1)
    
register_native("zp_get_user_wesker""native_get_user_wesker"1
9 Parte 2/2. Buscamos mas abajo
PHP Code:
// Round natives 
y abajo de
PHP Code:
    register_native("zp_is_survivor_round""native_is_survivor_round"1
ponemos
PHP Code:
    register_native("zp_is_wesker_round""native_is_wesker_round"1
Quedaria
PHP Code:
    register_native("zp_is_survivor_round""native_is_survivor_round"1)
    
register_native("zp_is_wesker_round""native_is_wesker_round"1
10.Ahora vamos a
PHP Code:
// Custom player models 
abajo de
PHP Code:
    for (0sizeof model_survivori++)
    {
        
formatex(playermodelsizeof playermodel 1"models/player/%s/%s.mdl"model_survivor[i], model_survivor[i])
        
g_modelindex_survivor[i] = engfunc(EngFunc_PrecacheModelplayermodel)
    } 
Ponemos
PHP Code:
    for (0sizeof model_weskeri++)
    {
        
formatex(playermodelsizeof playermodel 1"models/player/%s/%s.mdl"model_wesker[i], model_wesker[i])
        
g_modelindex_wesker[i] = engfunc(EngFunc_PrecacheModelplayermodel)
    } 
Quedaria
PHP Code:
    for (0sizeof model_survivori++)
    {
        
formatex(playermodelsizeof playermodel 1"models/player/%s/%s.mdl"model_survivor[i], model_survivor[i])
        
g_modelindex_survivor[i] = engfunc(EngFunc_PrecacheModelplayermodel)
    }
    for (
0sizeof model_weskeri++)
    {
        
formatex(playermodelsizeof playermodel 1"models/player/%s/%s.mdl"model_wesker[i], model_wesker[i])
        
g_modelindex_wesker[i] = engfunc(EngFunc_PrecacheModelplayermodel)
    } 
11.Ahora vamos a
PHP Code:
// Custom sounds 
Abajo de
PHP Code:
    for (0sizeof sound_multii++)
        
engfunc(EngFunc_PrecacheSoundsound_multi[i]) 
Ponemos
PHP Code:
    for (0sizeof sound_weskeri++)
        
engfunc(EngFunc_PrecacheSoundsound_wesker[i]) 
Quedaria
PHP Code:
    for (0sizeof sound_multii++)
        
engfunc(EngFunc_PrecacheSoundsound_multi[i])
    for (
0sizeof sound_weskeri++)
        
engfunc(EngFunc_PrecacheSoundsound_wesker[i]) 
12. Ahora vamos a
PHP Code:
// Admin commands 
abajo de
PHP Code:
     register_concmd("zp_survivor""cmd_survivor"ACCESS_FLAG"<target> - Turn someone into a Survivor"
ponemos
PHP Code:
    register_concmd("zp_wesker""cmd_wesker"ACCESS_FLAG"<target> - Turn someone into a Wesker"
13. ahora vamos a
PHP Code:
    // CVARS - Survivor 
Y abajo de
PHP Code:
    // CVARS - Survivor
    
cvar_surv register_cvar("zp_surv_enabled""1")
    
cvar_survchance register_cvar("zp_surv_chance""20")
    
cvar_survminplayers register_cvar("zp_surv_min_players""0")
    
cvar_survhp register_cvar("zp_surv_health""0")
    
cvar_survbasehp register_cvar("zp_surv_base_health""0")
    
cvar_survspd register_cvar("zp_surv_speed""230")
    
cvar_survgravity register_cvar("zp_surv_gravity""1.25")
    
cvar_survglow register_cvar("zp_surv_glow""1")
    
cvar_survaura register_cvar("zp_surv_aura""1")
    
cvar_survpainfree register_cvar("zp_surv_painfree""1")
    
cvar_survignorefrags register_cvar("zp_surv_ignore_frags""1")
    
cvar_survignoreammo register_cvar("zp_surv_ignore_rewards""1")
    
cvar_survweapon register_cvar("zp_surv_weapon""weapon_m249"
Ponemos
PHP Code:
    // CVARS - Wesker
        
cvar_wesker register_cvar("zp_wesker_enabled""1")
        
cvar_weskerchance register_cvar("zp_wesker_chance""20")
        
cvar_weskerminplayers register_cvar("zp_wesker_min_players""0")
        
cvar_weskerhp register_cvar("zp_wesker_health""5000")
        
cvar_weskerspd register_cvar("zp_wesker_speed""300")
        
cvar_weskergravity register_cvar("zp_wesker_gravity""0.50"
Quedaria
PHP Code:
    // CVARS - Survivor
    
cvar_surv register_cvar("zp_surv_enabled""1")
    
cvar_survchance register_cvar("zp_surv_chance""20")
    
cvar_survminplayers register_cvar("zp_surv_min_players""0")
    
cvar_survhp register_cvar("zp_surv_health""0")
    
cvar_survbasehp register_cvar("zp_surv_base_health""0")
    
cvar_survspd register_cvar("zp_surv_speed""230")
    
cvar_survgravity register_cvar("zp_surv_gravity""1.25")
    
cvar_survglow register_cvar("zp_surv_glow""1")
    
cvar_survaura register_cvar("zp_surv_aura""1")
    
cvar_survpainfree register_cvar("zp_surv_painfree""1")
    
cvar_survignorefrags register_cvar("zp_surv_ignore_frags""1")
    
cvar_survignoreammo register_cvar("zp_surv_ignore_rewards""1")
    
cvar_survweapon register_cvar("zp_surv_weapon""weapon_m249")

    
// CVARS - Wesker
        
cvar_wesker register_cvar("zp_wesker_enabled""1")
        
cvar_weskerchance register_cvar("zp_wesker_chance""20")
        
cvar_weskerminplayers register_cvar("zp_wesker_min_players""0")
        
cvar_weskerhp register_cvar("zp_wesker_health""5000")
        
cvar_weskerspd register_cvar("zp_wesker_speed""300")
        
cvar_weskergravity register_cvar("zp_wesker_gravity""0.50"
14.Ahora vamos a
PHP Code:
// New round starting 
y abajo de
PHP Code:
    g_survround false 
ponemos
PHP Code:
    g_weskerround false 
quedaria
PHP Code:
    g_survround false
    g_weskerround 
false 
15.Vamos a
PHP Code:
    // Set Player MaxSpeed 
Y remplazamos todo lo de ahi abajo hasta
PHP Code:
    // Should Leap? 
Quedaria
PHP Code:
    // Set Player MaxSpeed
    
if (g_frozen[id])
    {
        
set_pev(idpev_velocityFloat:{0.0,0.0,0.0}) // stop motion
        
set_pev(idpev_maxspeed1.0// prevent from moving
    
}
    else if (!
g_freezetime)
    {
        if (
g_zombie[id])
        {
            if (
g_nemesis[id])
                
set_pev(idpev_maxspeedget_pcvar_float(cvar_nemspd))
            else
                
set_pev(idpev_maxspeedfloat(g_zclass_spd[g_zombieclass[id]]))
        }
        else
        {
            if (
g_wesker[id])
                
set_pev(idpev_maxspeedget_pcvar_float(cvar_weskerspd))
            else if (
g_survivor[id])
                
set_pev(idpev_maxspeedget_pcvar_float(cvar_survspd))
            else
                
set_pev(idpev_maxspeedget_pcvar_float(cvar_humanspd))
        }
    }
    
    
// Should Leap? 
16.Ya estamos por terminar, Vamos ahora a
PHP Code:
// zp_survivor [target] 
y abajo de
PHP Code:
// zp_survivor [target]
public cmd_survivor(idlevelcid)
{
    
// Check for access flag
    
if (!cmd_access(idlevelcid2))
        return 
PLUGIN_HANDLED;
    
    
// Retrieve arguments
    
static arg[32], player
    read_argv
(1argsizeof arg 1)
    
player cmd_target(idargCMDTARGET_ONLY_ALIVE CMDTARGET_ALLOW_SELF)
    
    
// Invalid target
    
if (!player) return PLUGIN_HANDLED;
    
    
// Target not allowed to be survivor
    
if (!allowed_survivor(player))
    {
        
client_print(idprint_console"[ZP] %L"id"CMD_NOT")
        return 
PLUGIN_HANDLED;
    }
    
    
command_survivor(idplayer)
    
    return 
PLUGIN_HANDLED;

Ponemos
PHP Code:
// zp_wesker [target]
public cmd_wesker(idlevelcid)
{
    
// Check for access flag
    
if (!cmd_access(idlevelcid2))
        return 
PLUGIN_HANDLED;
    
    
// Retrieve arguments
    
static arg[32], player
    read_argv
(1argsizeof arg 1)
    
player cmd_target(idargCMDTARGET_ONLY_ALIVE CMDTARGET_ALLOW_SELF)
    
    
// Invalid target
    
if (!player) return PLUGIN_HANDLED;
    
    
// Target not allowed to be survivor
    
if (!allowed_wesker(player))
    {
        
client_print(idprint_console"[ZP] %L"id"CMD_NOT")
        return 
PLUGIN_HANDLED;
    }
    
    
command_wesker(idplayer)
    
    return 
PLUGIN_HANDLED;

Quedaria
PHP Code:
// zp_survivor [target]
public cmd_survivor(idlevelcid)
{
    
// Check for access flag
    
if (!cmd_access(idlevelcid2))
        return 
PLUGIN_HANDLED;
    
    
// Retrieve arguments
    
static arg[32], player
    read_argv
(1argsizeof arg 1)
    
player cmd_target(idargCMDTARGET_ONLY_ALIVE CMDTARGET_ALLOW_SELF)
    
    
// Invalid target
    
if (!player) return PLUGIN_HANDLED;
    
    
// Target not allowed to be survivor
    
if (!allowed_survivor(player))
    {
        
client_print(idprint_console"[ZP] %L"id"CMD_NOT")
        return 
PLUGIN_HANDLED;
    }
    
    
command_survivor(idplayer)
    
    return 
PLUGIN_HANDLED;
}

// zp_wesker [target]
public cmd_wesker(idlevelcid)
{
    
// Check for access flag
    
if (!cmd_access(idlevelcid2))
        return 
PLUGIN_HANDLED;
    
    
// Retrieve arguments
    
static arg[32], player
    read_argv
(1argsizeof arg 1)
    
player cmd_target(idargCMDTARGET_ONLY_ALIVE CMDTARGET_ALLOW_SELF)
    
    
// Invalid target
    
if (!player) return PLUGIN_HANDLED;
    
    
// Target not allowed to be survivor
    
if (!allowed_wesker(player))
    {
        
client_print(idprint_console"[ZP] %L"id"CMD_NOT")
        return 
PLUGIN_HANDLED;
    }
    
    
command_wesker(idplayer)
    
    return 
PLUGIN_HANDLED;

17.Vamos a
PHP Code:
// Round starting 
Y abajo de
PHP Code:
    g_nemround false 
Ponemos
PHP Code:
    g_weskerround false 
quedaria
PHP Code:
    g_nemround false
    g_weskerround 
false 
18. Ahora vamos a
PHP Code:
        // Round start forward 
Y abajo de
PHP Code:
        // Round start forward
        
ExecuteForward(g_fwRoundStartg_fwDummyResultMODE_SURVIVORforward_id);
    } 
Ponemos
PHP Code:
    else if ((mode == MODE_NONE && (!preventconsecutive || g_lastmode != MODE_WESKER) && random_num(1get_pcvar_num(cvar_weskerchance)) == get_pcvar_num(cvar_wesker) && iPlayersnum >= get_pcvar_num(cvar_weskerminplayers)) || mode == MODE_WESKER)
    {
        
// wesker Mode
        
g_survround false
        g_weskerround 
true
        g_lastmode 
MODE_WESKER
    
        
// Choose player randomly?
        
id fnGetRandomAlive(random_num(1iPlayersnum))        
    
        
// Remember id for calling our forward later
        
forward_id id
    
        g_survivor
[id] = false
        g_wesker
[id] = true
        humanme
(id1)
    
        
fm_strip_user_weapons(id)
        
fm_give_item(id"weapon_knife")
        
fm_give_item(id"weapon_deagle")
        
        
fm_set_rendering(idkRenderFxGlowShell2522023kRenderNormal8)
        
        static 
weskerhealth
        weskerhealth 
get_pcvar_num(cvar_weskerhp)
        
fm_set_user_health(idweskerhealth)
    
        
set_pev(idpev_gravityget_pcvar_float(cvar_weskergravity))
    
        
// Turn the rest of players into a zombie
        
for (id 1id <= g_maxplayersid++)
        {
            
// Not alive
            
if (!is_user_alive(id))
                continue;
        
            
// Survivor or already a zombie
            
if (g_survivor[id] || g_zombie[id])
                continue;
        
            
// Turn into a zombie
            
zombieme(id001)
        }
    
        
// Play swarm sound
        
PlaySound(sound_wesker[random_num(0sizeof sound_wesker -1)]);
        
// Get player's name
        
get_user_name(forward_idnamesizeof name 1)
    
        
// Show wesker HUD notice
        
set_hudmessage(18513515HUD_EVENT_XHUD_EVENT_Y10.05.01.01.0, -1)
        
ShowSyncHudMsg(0g_MsgSync"%L"LANG_PLAYER"NOTICE_WESKER"name)
    
        
// Round start forward
        
ExecuteForward(g_fwRoundStartg_fwDummyResultMODE_WESKERforward_id);    
    } 
Quedaria
PHP Code:
        // Round start forward
        
ExecuteForward(g_fwRoundStartg_fwDummyResultMODE_SURVIVORforward_id);
    }
    else if ((
mode == MODE_NONE && (!preventconsecutive || g_lastmode != MODE_WESKER) && random_num(1get_pcvar_num(cvar_weskerchance)) == get_pcvar_num(cvar_wesker) && iPlayersnum >= get_pcvar_num(cvar_weskerminplayers)) || mode == MODE_WESKER)
    {
        
// wesker Mode
        
g_survround false
        g_weskerround 
true
        g_lastmode 
MODE_WESKER
    
        
// Choose player randomly?
        
id fnGetRandomAlive(random_num(1iPlayersnum))        
    
        
// Remember id for calling our forward later
        
forward_id id
    
        g_survivor
[id] = false
        g_wesker
[id] = true
        humanme
(id1)
    
        
fm_strip_user_weapons(id)
        
fm_give_item(id"weapon_knife")
        
fm_give_item(id"weapon_deagle")
        
        
fm_set_rendering(idkRenderFxGlowShell2522023kRenderNormal8)
        
        static 
weskerhealth
        weskerhealth 
get_pcvar_num(cvar_weskerhp)
        
fm_set_user_health(idweskerhealth)
    
        
set_pev(idpev_gravityget_pcvar_float(cvar_weskergravity))
    
        
// Turn the rest of players into a zombie
        
for (id 1id <= g_maxplayersid++)
        {
            
// Not alive
            
if (!is_user_alive(id))
                continue;
        
            
// Survivor or already a zombie
            
if (g_survivor[id] || g_zombie[id])
                continue;
        
            
// Turn into a zombie
            
zombieme(id001)
        }
    
        
// Play swarm sound
        
PlaySound(sound_wesker[random_num(0sizeof sound_wesker -1)]);
        
// Get player's name
        
get_user_name(forward_idnamesizeof name 1)
    
        
// Show wesker HUD notice
        
set_hudmessage(18513515HUD_EVENT_XHUD_EVENT_Y10.05.01.01.0, -1)
        
ShowSyncHudMsg(0g_MsgSync"%L"LANG_PLAYER"NOTICE_WESKER"name)
    
        
// Round start forward
        
ExecuteForward(g_fwRoundStartg_fwDummyResultMODE_WESKERforward_id);    
    } 
19. Falta poquitoo!!!!, Ahora vamos a
PHP Code:
// Reset Player Vars 
abajo de
PHP Code:
    g_survivor[id] = false 
ponemos
PHP Code:
    g_wesker[id] = false 
Quedaria
PHP Code:
    g_survivor[id] = false
    g_wesker
[id] = false 
20. Ahora vamos a
PHP Code:
    // Format the classname 
y remplazamos todo hasta
PHP Code:
     // Spectating someone else? 
por
PHP Code:
    // Format the classname
    
static class[32], redgreenblue
    
    
if (g_zombie[id]) // zombies
    
{
        
red 200
        green 
250
        blue 
0
        
        
if (g_nemesis[id])
            
formatex(class, sizeof class - 1"%L"ID_SHOWHUD,"CLASS_NEMESIS")
        else
            
copy(class, sizeof class - 1g_zclass_name[g_zombieclass[id]])
    }
    else 
// humans
    
{
        
red 0
        green 
0
        blue 
255
        
        
if (g_wesker[id])
            
formatex(class, sizeof class - 1"%L"ID_SHOWHUD,"CLASS_WESKER")
        else if (
g_survivor[id])
            
formatex(class, sizeof class - 1"%L"ID_SHOWHUD,"CLASS_SURVIVOR")
        else
            
formatex(class, sizeof class - 1"%L"ID_SHOWHUD,"CLASS_HUMAN")
    }
    
    
// Spectating someone else? 
21.Dos cosas mas y terminamos ;), Ahora vamos a
PHP Code:
// Checks if a player is allowed to be survivor 
y abajo de
PHP Code:
// Checks if a player is allowed to be survivor
allowed_survivor(id)
{
    if (
g_endround || !g_newround || !is_user_alive(id) || !get_pcvar_num(cvar_surv) || task_exists(TASK_WELCOMEMSG) || fnGetAlive() < get_pcvar_num(cvar_survminplayers))
        return 
false;
    
    return 
true;

ponemos
PHP Code:
// Checks if a player is allowed to be wesker
allowed_wesker(id)
{
    if (
g_endround || !g_newround || !is_user_alive(id) || !get_pcvar_num(cvar_wesker) || task_exists(TASK_WELCOMEMSG) || fnGetAlive() < get_pcvar_num(cvar_weskerminplayers))
        return 
false;
    
    return 
true;

Quedaria
PHP Code:
// Checks if a player is allowed to be survivor
allowed_survivor(id)
{
    if (
g_endround || !g_newround || !is_user_alive(id) || !get_pcvar_num(cvar_surv) || task_exists(TASK_WELCOMEMSG) || fnGetAlive() < get_pcvar_num(cvar_survminplayers))
        return 
false;
    
    return 
true;
}

// Checks if a player is allowed to be wesker
allowed_wesker(id)
{
    if (
g_endround || !g_newround || !is_user_alive(id) || !get_pcvar_num(cvar_wesker) || task_exists(TASK_WELCOMEMSG) || fnGetAlive() < get_pcvar_num(cvar_weskerminplayers))
        return 
false;
    
    return 
true;

22.Ahora vamos a
PHP Code:
// Admin Command. zp_survivor 
y abajo de
PHP Code:
// Admin Command. zp_survivor
command_survivor(idplayer)
{
    static 
name1[32], name2[32]
    
get_user_name(idname1sizeof name1 1)
    
get_user_name(playername2sizeof name2 1)
    
    
// Show activity?
    
switch (get_pcvar_num(cvar_showactivity))
    {
        case 
1client_print(0print_chat"ADMIN - %s %L"name2LANG_PLAYER"CMD_SURVIVAL")
        case 
2client_print(0print_chat"ADMIN %s - %s %L"name1name2LANG_PLAYER"CMD_SURVIVAL")
    }
    
     
// Log to Zombie Plague log file?
    
if (get_pcvar_num(cvar_logcommands))
    {
        static 
logdata[100], authid[32], ip[16]
        
get_user_authid(idauthidsizeof authid 1)
        
get_user_ip(idipsizeof ip 11)
        
formatex(logdatasizeof logdata 1"ADMIN %s <%s><%s> - %s %L (Players: %d/%d)"name1authidipname2LANG_SERVER,"CMD_SURVIVAL"fnGetPlaying(), g_maxplayers)
        
log_to_file("zombieplague.log"logdata)
    }
    
    
// Turn into a Survivor
    
remove_task(TASK_MAKEZOMBIE)
    
make_a_zombie(MODE_SURVIVORplayer)

ponemos
PHP Code:
// Admin Command. zp_wesker
command_wesker(idplayer)
{
    static 
name1[32], name2[32]
    
get_user_name(idname1sizeof name1 1)
    
get_user_name(playername2sizeof name2 1)
    
    
// Show activity?
    
switch (get_pcvar_num(cvar_showactivity))
    {
        case 
1client_print(0print_chat"ADMIN - %s %L"name2LANG_PLAYER"CMD_WESKER")
        case 
2client_print(0print_chat"ADMIN %s - %s %L"name1name2LANG_PLAYER"CMD_WESKER")
    }
    
     
// Log to Zombie Plague log file?
    
if (get_pcvar_num(cvar_logcommands))
    {
        static 
logdata[100], authid[32], ip[16]
        
get_user_authid(idauthidsizeof authid 1)
        
get_user_ip(idipsizeof ip 11)
        
formatex(logdatasizeof logdata 1"ADMIN %s <%s><%s> - %s %L (Players: %d/%d)"name1authidipname2LANG_SERVER,"CMD_WESKER"fnGetPlaying(), g_maxplayers)
        
log_to_file("zombieplague.log"logdata)
    }
    
    
// Turn into a Survivor
    
remove_task(TASK_MAKEZOMBIE)
    
make_a_zombie(MODE_WESKERplayer)

Quedaria
PHP Code:
// Admin Command. zp_survivor
command_survivor(idplayer)
{
    static 
name1[32], name2[32]
    
get_user_name(idname1sizeof name1 1)
    
get_user_name(playername2sizeof name2 1)
    
    
// Show activity?
    
switch (get_pcvar_num(cvar_showactivity))
    {
        case 
1client_print(0print_chat"ADMIN - %s %L"name2LANG_PLAYER"CMD_SURVIVAL")
        case 
2client_print(0print_chat"ADMIN %s - %s %L"name1name2LANG_PLAYER"CMD_SURVIVAL")
    }
    
     
// Log to Zombie Plague log file?
    
if (get_pcvar_num(cvar_logcommands))
    {
        static 
logdata[100], authid[32], ip[16]
        
get_user_authid(idauthidsizeof authid 1)
        
get_user_ip(idipsizeof ip 11)
        
formatex(logdatasizeof logdata 1"ADMIN %s <%s><%s> - %s %L (Players: %d/%d)"name1authidipname2LANG_SERVER,"CMD_SURVIVAL"fnGetPlaying(), g_maxplayers)
        
log_to_file("zombieplague.log"logdata)
    }
    
    
// Turn into a Survivor
    
remove_task(TASK_MAKEZOMBIE)
    
make_a_zombie(MODE_SURVIVORplayer)
}

// Admin Command. zp_wesker
command_wesker(idplayer)
{
    static 
name1[32], name2[32]
    
get_user_name(idname1sizeof name1 1)
    
get_user_name(playername2sizeof name2 1)
    
    
// Show activity?
    
switch (get_pcvar_num(cvar_showactivity))
    {
        case 
1client_print(0print_chat"ADMIN - %s %L"name2LANG_PLAYER"CMD_WESKER")
        case 
2client_print(0print_chat"ADMIN %s - %s %L"name1name2LANG_PLAYER"CMD_WESKER")
    }
    
     
// Log to Zombie Plague log file?
    
if (get_pcvar_num(cvar_logcommands))
    {
        static 
logdata[100], authid[32], ip[16]
        
get_user_authid(idauthidsizeof authid 1)
        
get_user_ip(idipsizeof ip 11)
        
formatex(logdatasizeof logdata 1"ADMIN %s <%s><%s> - %s %L (Players: %d/%d)"name1authidipname2LANG_SERVER,"CMD_WESKER"fnGetPlaying(), g_maxplayers)
        
log_to_file("zombieplague.log"logdata)
    }
    
    
// Turn into a Survivor
    
remove_task(TASK_MAKEZOMBIE)
    
make_a_zombie(MODE_WESKERplayer)

23. Ante ultima cosa vamos a
PHP Code:
// Native: zp_get_user_survivor 
Y abajo de
PHP Code:
// Native: zp_get_user_survivor
public native_get_user_survivor(id)
{
    return 
g_survivor[id];

Ponemos
PHP Code:
// Native: zp_get_user_wesker
public native_get_user_wesker(id)
{
    return 
g_wesker[id];

Quedaria
PHP Code:
// Native: zp_get_user_survivor
public native_get_user_survivor(id)
{
    return 
g_survivor[id];
}

// Native: zp_get_user_wesker
public native_get_user_wesker(id)
{
    return 
g_wesker[id];

24. ULTIMA Vamos a
PHP Code:
// Native: zp_is_survivor_round 
y abajo de
PHP Code:
// Native: zp_is_survivor_round
public native_is_survivor_round()
{
    return 
g_survround;

ponemos
PHP Code:
// Native: zp_is_wesker_round
public native_is_wesker_round()
{
    return 
g_weskerround;

Quedaria
PHP Code:
// Native: zp_is_survivor_round
public native_is_survivor_round()
{
    return 
g_survround;
}

// Native: zp_is_wesker_round
public native_is_wesker_round()
{
    return 
g_weskerround;

Fin, Tenemos nuestro MODO!! ;D
Si no pudieron o tienen algun error, aca se los dejo echo.
Attached Files
File Type: sma Get Plugin or Get Source (zpconmodwesker.sma - 2408 views - 254.1 KB)

Last edited by Raddish; 10-13-2009 at 14:11.
Raddish is offline