[ZE] Ganancia en Zona de Escape
#1
Hola Amigos Descubri una nueva forma de hacer ganancias cuando llegen en respectivo lugar.
pd: Como no se cuantas lineas tienen su ze o zp solo dejare el code.
Código PHP:
// VARIABLES QUE USAREMOS
new const iClassName[] = { "entclas" }
new const 
ent_model2[] = { "models/w_kevlar.mdl" }

// Register Clcmds
register_clcmd("say /zonas""MenuZonas"ADMIN_RCON)

// EL PRINCIPAL
ReadFile()
{
    new 
szData[64], szX[13], szY[13], szZ[13], Origin[3]
    
    new 
File fopen(g_szDirFile"rt")
    
    while(!
feof(File))
    {
        
fgets(FileszDatacharsmax(szData))
        
        if(!
szData[0] || szData[0] == ';' || szData[0] == ' ' || (szData[0] == '/' && szData[1] == '/'))
            continue
            
        
parse(szDataszXcharsmax(szX), szYcharsmax(szY), szZcharsmax(szZ))
  
        
Origin[0] = str_to_num(szX)
        
Origin[1] = str_to_num(szY)
        
Origin[2] = str_to_num(szZ)
        
        
Create_Entity(Origin)
    }
    
    
fclose(File)
}

public 
MenuZonas(id){
    new 
menu menu_create("Menu Zonas","Handler")
    
    
menu_additem(menu,"Poner Zona")
    
menu_additem(menu,"Borrar Zona")
    
menu_additem(menu,"Guardar Zona")
    
    
menu_display(id,menu)
    return 
PLUGIN_HANDLED
}
public 
Handler(id,menu,item){
    if(
item == MENU_EXIT)
    return 
PLUGIN_HANDLED
    
    
switch(item){
        case 
0:{
            new 
iOrigin[3]
            
get_user_origin(idiOrigin2)
            
Create_Entity(iOrigin)
        }
        case 
1:{
            new 
ent = -1
            
while((ent find_ent_by_class(entiClassName)))
            
remove_entity(ent)
        }
        case 
2:Guardar(id)
    }
    
    
MenuZonas(id)
    return 
PLUGIN_HANDLED
}

public 
Create_Entity(iOrigin[3]) {
    new 
iEnt create_entity("info_target"// Creamos la entidad con un nombre

    
new Float:OriginF[3]
    
IVecFVec(iOriginOriginF)
    
entity_set_vector(iEnt,EV_VEC_originOriginF)

    
entity_set_string(iEntEV_SZ_classnameiClassName// Le asignamos el nombre creado a la entidad.
    
    
new Float:mins[3] = {-10.0, -10.00.0// Tamaño
    
new Float:maxs[3] = {10.010.0150.0// Tamaño
    
entity_set_size(iEntminsmaxs// Creamos el tamaño de la entidad (No el model)
    
    
entity_set_int(iEntEV_INT_solidSOLID_TRIGGER// La hacemos solida
    
entity_set_int(iEntEV_INT_movetypeMOVETYPE_STEP// Hacemos que no se mueva.
}

public 
Func_Touch(iEntiToucher
{
    if (!
is_valid_ent(iEnt) || !is_valid_ent(iToucher) || escape[iToucher]) return FMRES_IGNORED;
    
    if (!
is_user_alive(iToucher) || escape[iToucher]) return FMRES_IGNORED;
    
    
g_escape[iToucher]++
    
    if (
g_escape[iToucher] > 999999999)
    {
        
g_escape[iToucher] = 999999999
    
}    
    
    
escape[iToucher] = true
    
    
if (_hv 1g_experience[iToucher] += get_pcvar_num(cvar_xp_for_escape) * (_hv 1)
    else 
g_experience[iToucher] += get_pcvar_num(cvar_xp_for_escape)
        
    if (
g_experience[iToucher] > 999999999)
    {
        
g_experience[iToucher] = 999999999
    
}
    
    if (
_hv 1g_point[iToucher] += get_pcvar_num(cvar_pu_for_escape) * (_hv 1)
    else 
g_point[iToucher] += get_pcvar_num(cvar_pu_for_escape)
        
    if (
g_point[iToucher] > 999999999)
    {
        
g_point[iToucher] = 999999999
    
}
    
    
zp_colored_print(iToucher"^x04[ZE]^x01 Ganaste^x04 %d^x01 Exp por llegar a la zona de^x04 Escape!!"
    
_hv get_pcvar_num(cvar_xp_for_escape) * (_hv 1) : get_pcvar_num(cvar_xp_for_escape)),
    
zp_colored_print(iToucher"^x04[ZE]^x01 Ganaste^x04 %d^x01 de PU por llegar a la zona de^x04 Escape!!",
    
_hv get_pcvar_num(cvar_pu_for_escape) * (_hv 1) : get_pcvar_num(cvar_pu_for_escape))

    
update_level(iToucher)
}

public 
Posicion(id){
    new 
ent = -1,Float:Origin[3]
    
    while((
ent find_ent_by_class(entiClassName))){
        
        
entity_get_vector(entEV_VEC_originOrigin)
        
        
client_print(id,print_chat,"%f %f %f "Origin[0], Origin[1], Origin[2])
    }
}
public 
Guardar(id){
    new 
szData[64], ent = -1,  Float:Origin[3]
                        
    if(
file_exists(g_szDirFile))
        
delete_file(g_szDirFile)
                            
    new 
File fopen(g_szDirFile"at")
            
    
write_file(g_szDirFile"//Posicion En El Mapa De las Zonas de Escapes")
                        
    while((
ent find_ent_by_class(entiClassName)))
    {
        
entity_get_vector(entEV_VEC_originOrigin)
                                
        
formatex(szDatacharsmax(szData), "%f %f %f^n"Origin[0], Origin[1], Origin[2])
        
        
fputs(FileszData)
    }
            
    
fclose(File)
            
    
client_print(idprint_chat"Zonas de Escapes Guardados")
}
[/ 
php]
Zombie Escape Optimizando (98,5%)
Excitedeyes[Imagen: 76561198283469631.png]
Responder
#2
gracias por el aporte, aunque..
Código PHP:
public Func_Touch(iEntiToucher
{
    if (!
is_valid_ent(iEnt) || !is_valid_ent(iToucher) || escape[iToucher]) return FMRES_IGNORED;
    
    if (!
is_user_alive(iToucher) || escape[iToucher]) return FMRES_IGNORED;
    
    
g_escape[iToucher]++
    
    if (
g_escape[iToucher] > 999999999)
    {
        
g_escape[iToucher] = 999999999
    
}    
    
    
escape[iToucher] = true
    
    
if (_hv 1g_experience[iToucher] += get_pcvar_num(cvar_xp_for_escape) * (_hv 1)
    else 
g_experience[iToucher] += get_pcvar_num(cvar_xp_for_escape)
        
    if (
g_experience[iToucher] > 999999999)
    {
        
g_experience[iToucher] = 999999999
    
}
    
    if (
_hv 1g_point[iToucher] += get_pcvar_num(cvar_pu_for_escape) * (_hv 1)
    else 
g_point[iToucher] += get_pcvar_num(cvar_pu_for_escape)
        
    if (
g_point[iToucher] > 999999999)
    {
        
g_point[iToucher] = 999999999
    
}
    
    
zp_colored_print(iToucher"^x04[ZE]^x01 Ganaste^x04 %d^x01 Exp por llegar a la zona de^x04 Escape!!"
    
_hv get_pcvar_num(cvar_xp_for_escape) * (_hv 1) : get_pcvar_num(cvar_xp_for_escape)),
    
zp_colored_print(iToucher"^x04[ZE]^x01 Ganaste^x04 %d^x01 de PU por llegar a la zona de^x04 Escape!!",
    
_hv get_pcvar_num(cvar_pu_for_escape) * (_hv 1) : get_pcvar_num(cvar_pu_for_escape))

    
update_level(iToucher)


??

aparte ese code esta incompleto.

hice esto, sin testear.
Código PHP:
/* Script generated by Pawn Studio */

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>
#include <xs>
#include <engine>

new const iPlugin[][] = {"SetModel""0.1""Hypnotize" };

new const 
Model[] = "models/metasvl.mdl";
new const 
iEnt[] = "ZonaSegura";

new 
Float:fOrigin[3];

new 
Path[256];
new 
iMap[90]; 
new 
iRuta[900]; 

public 
plugin_init()
{
    
register_plugin(iPlugin[0], iPlugin[1], iPlugin[2])
    
// Add your own code here
    
register_clcmd("say /zona""f_Menu");
    
register_clcmd("say /leer""ReadPos");
    
get_mapname(iMapcharsmax(iMap));
    
get_configsdir(Pathcharsmax(Path));
    
formatex(iRutacharsmax(iRuta), "%s/%s.ini"PathiMap);
    
    
ReadPos();
}
public 
plugin_precache() precache_model(Model);

public 
f_Menu(id){
    new 
menu menu_create("Registrar Touch","hn_poner");
    
    
menu_additem(menu,"Registrar Entidad");
    
menu_additem(menu,"Borrar Entidad");
    
menu_additem(menu,"Guardar Entidad");
    
    
menu_display(idmenu);
    return 
PLUGIN_HANDLED;
}
public 
hn_poner(idmenuitem)
{
    if ( 
item == MENU_EXIT )
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED;
    }
    switch(
item){
        case 
0:{
            new 
iOrigin[3]; get_user_origin(idiOrigin3);
            
IVecFVec(iOriginfOrigin); CreateEnt(fOrigin);
        }
        case 
1:{ 
            new 
iEntity = -1;
            while((
iEntity find_ent_by_class(iEntityiEnt)) != 0remove_entityiEntity );
            }
        case 
2SaveEnt(fOrigin);
    }
    
f_Menu(id);
    return 
PLUGIN_HANDLED;  

CreateEnt(const Float:Origin[3])
{
    new 
ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"));  
    if(!
ent) return;
    
    
engfunc(EngFunc_SetModelentModel);
    
set_pev(entpev_solidSOLID_TRIGGER);
    
set_pev(entpev_classnameiEnt);
    
engfunc(EngFunc_SetSizeentFloat:{-150.0, -1.0, -150.0}, Float:{150.01.0150.0});
    
set_pev(entpev_minsFloat:{-150.0, -1.0, -150.0});
    
set_pev(entpev_maxsFloat:{150.01.0150.0});
    
engfunc(EngFunc_SetOriginentOrigin);
    
}
SaveEnt(const Float:Origin[3]){
    new 
iCoordenada[90]; formatex(iCoordenadacharsmax(iCoordenada),  "%.2f %.2f %.2f"Origin[0], Origin[1], Origin[2]);
    new 
szText[300];
    
    if(!
file_exists(iRuta)) {
        
log_amx("[ZE] Archivo '%s' No existe, pero lo creamos."iRuta);
        
write_file(iRuta"; Archivo creado automaticamente");
        
formatex(szTextcharsmax(szText), "; El mapa es %s:"iMap); write_file(iRutaszText);
        
write_file(iRuta"; Plugin Made By Hypnotize");
        
write_file(iRuta"; Las Coordenadas son:");
    }
    
write_file(iRutaiCoordenada);
}
public 
ReadPos(){
    if(!
file_exists(iRuta)) {
        
client_print(0print_chat"[ZE] Archivo '%s' NO Existe."iRuta);
        return;
    }
    new 
iDat[40], iDat2[40], iDat3[40];
    new 
szLine[700], Float:iPoss[3];
    
    new 
filefile fopen(iRuta"r");
    while(
file && !feof(file))
    {
        
fgets(fileszLinecharsmax(szLine));
        
        if(
szLine[0] == ';' || szLine[0] == '/' && szLine[1] == '/' || !szLine[0])
            continue;
        
        
parseszLineiDatcharsmax(iDat), iDat2charsmax(iDat2), iDat3charsmax(iDat3));
        
        
iPoss[0] = str_to_float(iDat);
        
iPoss[1] = str_to_float(iDat2);
        
iPoss[2] = str_to_float(iDat3);
        
        
CreateEnt(iPoss);
    }
    
fclose(file);

solo falta hacerle un touch

(09/01/2018, 01:16 AM)lucas escribió: tu proyecto se llama zombie escape editado por cloudest osea solo editas no creas ese plugin es sacado del ze publico de youtube primero cren sus plugin no copien y pegen Hypnotize tu ze es una mrd es solo una edicion del zp normal solo le pusistes sistema de cuentas que por sierto es recontra facil sistema de cuentas kikizon yle cambiastes el name odio alas personas que les gusta quitar credito

que PENDEJO, no uso el sistema de kikizon niño, que tu lo uses no significa que yo si JAJAJAJJAJA.
[Imagen: zcsztw-4.png] [Imagen: 6u5fj2-4.png]
[Imagen: linkedin_thumb_image.png][Imagen: 76561198283253977.png][Imagen: linkedin_thumb_image.png]
Responder
#3
Insecure
hasta ahora no enteni aunque ahí no veo faltar ningun code.
Ami me funciona de 100% todo el code que postie.
Proud
PERO TU CODE TAMBIEN ESTA MUY BUENO BRO.
Zombie Escape Optimizando (98,5%)
Excitedeyes[Imagen: 76561198283469631.png]
Responder
#4
Añadido el touch, obviamente dentro de tu ZE:

Código PHP:
// Variables necesarias:
new const Model[] = "models/w_kevlar.mdl";
new const 
iEnt[] = "Zona_Segura";

new 
Float:fOrigin[3];

new 
Path[256];
new 
iMap[90]; 
new 
iRuta[900]; 

public 
plugin_init()
{
    
    
// Add your own code here

    
register_concmd("menu_zona""f_Menu");
    
register_concmd("leer_zona""ReadPos");
    
get_mapname(iMapcharsmax(iMap));
    
get_configsdir(Pathcharsmax(Path));
    
formatex(iRutacharsmax(iRuta), "%s/%s.ini"PathiMap);

    
// Si un player tocó la entidad llamamos a touch_register:
    
register_touch("ZonaSegura""player""Touch_Register")

    
// Add your own code here

    
ReadPos();
}
public 
plugin_precache() precache_model(Model);

public 
f_Menu(id){
    new 
menu menu_create("Registrar Zona Segura en el Mapa","hn_poner");
    
    
menu_additem(menu,"Registrar Entidad");
    
menu_additem(menu,"Borrar Entidad");
    
menu_additem(menu,"Guardar Entidad");
    
    
menu_display(idmenu);
    return 
PLUGIN_HANDLED;
}

public 
hn_poner(idmenuitem)
{
    if ( 
item == MENU_EXIT )
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED;
    }
    switch(
item){
        case 
0:{
            new 
iOrigin[3]; get_user_origin(idiOrigin3);
            
IVecFVec(iOriginfOrigin); CreateEnt(fOrigin);
        }
        case 
1:{ 
            new 
iEntity = -1;
            while((
iEntity find_ent_by_class(iEntityiEnt)) != 0remove_entityiEntity );
            }
        case 
2SaveEnt(fOrigin);
    }
    
f_Menu(id);
    return 
PLUGIN_HANDLED;  

CreateEnt(const Float:Origin[3])
{
    new 
ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"));  
    if(!
ent) return;
    
    
engfunc(EngFunc_SetModelentModel);
    
set_pev(entpev_solidSOLID_TRIGGER);
    
set_pev(entpev_classnameiEnt);
    
engfunc(EngFunc_SetSizeentFloat:{-150.0, -1.0, -150.0}, Float:{150.01.0150.0});
    
set_pev(entpev_minsFloat:{-150.0, -1.0, -150.0});
    
set_pev(entpev_maxsFloat:{150.01.0150.0});
    
engfunc(EngFunc_SetOriginentOrigin);
    
}
SaveEnt(const Float:Origin[3]){
    new 
iCoordenada[90]; formatex(iCoordenadacharsmax(iCoordenada),  "%.2f %.2f %.2f"Origin[0], Origin[1], Origin[2]);
    new 
szText[300];
    
    if(!
file_exists(iRuta)) {
        
log_amx("[ZE] Archivo '%s' No existe, pero lo creamos."iRuta);
        
write_file(iRuta"; Archivo creado automaticamente");
        
formatex(szTextcharsmax(szText), "; El mapa es %s:"iMap); write_file(iRutaszText);
        
write_file(iRuta"; Las Coordenadas son:");
    }
    
write_file(iRutaiCoordenada);
}
public 
ReadPos(){
    if(!
file_exists(iRuta)) {
        
client_print(0print_chat"[ZE] Archivo '%s' NO Existe."iRuta);
        return;
    }
    new 
iDat[40], iDat2[40], iDat3[40];
    new 
szLine[700], Float:iPoss[3];
    
    new 
filefile fopen(iRuta"r");
    while(
file && !feof(file))
    {
        
fgets(fileszLinecharsmax(szLine));
        
        if(
szLine[0] == ';' || szLine[0] == '/' && szLine[1] == '/' || !szLine[0])
            continue;
        
        
parseszLineiDatcharsmax(iDat), iDat2charsmax(iDat2), iDat3charsmax(iDat3));
        
        
iPoss[0] = str_to_float(iDat);
        
iPoss[1] = str_to_float(iDat2);
        
iPoss[2] = str_to_float(iDat3);
        
        
CreateEnt(iPoss);
        
client_print(0print_chat"[ZE] Zona segura identificada."iRuta);
    }
    
fclose(file);


public 
Touch_Register(iEnt_Zonaindex)
{
    new 
name[33]
    
get_user_name(indexname32)
    new 
classname[8]
    
entity_get_string(iEnt_ZonaEV_SZ_classnameclassname7)

    if(
g_PartyData[index][In_Party])
    {
        
// Removido el CODE de Party
    
}
    else
    {
        
g_exp[index] += 10 * (_hv 1)  //  <-- añades EXP al user (puedes poner otro CODE como añadir niveles, etc )
        
g_Pupgrade[index] += * (_hv 1)  // <-- añades PUs al user (puedes poner otro CODE como añadir niveles, etc )
        
update_xp(index)  // <-- actualizas los niveles con los valores añadidos

        
zp_colored_print(index"^x04 [ZE]^x01 Ganaste^x04 %d^x01 de Exp por Llegar a la zona de^x04 Escape^x01!!",10 * (_hv 1))
        
zp_colored_print(index"^x04 [ZE]^x01 Ganaste^x04 %d^x01 de PU por Llegar a la zona de^x04 Escape^x01!!",* (_hv 1))
    }

Responder
#5
Eso no sirve Whatever
Hacía falta borrarme del autor ?

Y no hace falta adaptarlo usas natives y valió verga
[Imagen: zcsztw-4.png] [Imagen: 6u5fj2-4.png]
[Imagen: linkedin_thumb_image.png][Imagen: 76561198283253977.png][Imagen: linkedin_thumb_image.png]
Responder
#6
Pero mira ese robo de autor

(19/04/2018, 03:28 PM)freategui escribió: Añadido el touch, obviamente dentro de tu ZE:

Código PHP:
// Variables necesarias:
new const Model[] = "models/w_kevlar.mdl";
new const 
iEnt[] = "Zona_Segura";

new 
Float:fOrigin[3];

new 
Path[256];
new 
iMap[90]; 
new 
iRuta[900]; 

public 
plugin_init()
{
    
    
// Add your own code here

    
register_concmd("menu_zona""f_Menu");
    
register_concmd("leer_zona""ReadPos");
    
get_mapname(iMapcharsmax(iMap));
    
get_configsdir(Pathcharsmax(Path));
    
formatex(iRutacharsmax(iRuta), "%s/%s.ini"PathiMap);

    
// Si un player tocó la entidad llamamos a touch_register:
    
register_touch("ZonaSegura""player""Touch_Register")

    
// Add your own code here

    
ReadPos();
}
public 
plugin_precache() precache_model(Model);

public 
f_Menu(id){
    new 
menu menu_create("Registrar Zona Segura en el Mapa","hn_poner");
    
    
menu_additem(menu,"Registrar Entidad");
    
menu_additem(menu,"Borrar Entidad");
    
menu_additem(menu,"Guardar Entidad");
    
    
menu_display(idmenu);
    return 
PLUGIN_HANDLED;
}

public 
hn_poner(idmenuitem)
{
    if ( 
item == MENU_EXIT )
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED;
    }
    switch(
item){
        case 
0:{
            new 
iOrigin[3]; get_user_origin(idiOrigin3);
            
IVecFVec(iOriginfOrigin); CreateEnt(fOrigin);
        }
        case 
1:{ 
            new 
iEntity = -1;
            while((
iEntity find_ent_by_class(iEntityiEnt)) != 0remove_entityiEntity );
            }
        case 
2SaveEnt(fOrigin);
    }
    
f_Menu(id);
    return 
PLUGIN_HANDLED;  

CreateEnt(const Float:Origin[3])
{
    new 
ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"));  
    if(!
ent) return;
    
    
engfunc(EngFunc_SetModelentModel);
    
set_pev(entpev_solidSOLID_TRIGGER);
    
set_pev(entpev_classnameiEnt);
    
engfunc(EngFunc_SetSizeentFloat:{-150.0, -1.0, -150.0}, Float:{150.01.0150.0});
    
set_pev(entpev_minsFloat:{-150.0, -1.0, -150.0});
    
set_pev(entpev_maxsFloat:{150.01.0150.0});
    
engfunc(EngFunc_SetOriginentOrigin);
    
}
SaveEnt(const Float:Origin[3]){
    new 
iCoordenada[90]; formatex(iCoordenadacharsmax(iCoordenada),  "%.2f %.2f %.2f"Origin[0], Origin[1], Origin[2]);
    new 
szText[300];
    
    if(!
file_exists(iRuta)) {
        
log_amx("[ZE] Archivo '%s' No existe, pero lo creamos."iRuta);
        
write_file(iRuta"; Archivo creado automaticamente");
        
formatex(szTextcharsmax(szText), "; El mapa es %s:"iMap); write_file(iRutaszText);
        
write_file(iRuta"; Las Coordenadas son:");
    }
    
write_file(iRutaiCoordenada);
}
public 
ReadPos(){
    if(!
file_exists(iRuta)) {
        
client_print(0print_chat"[ZE] Archivo '%s' NO Existe."iRuta);
        return;
    }
    new 
iDat[40], iDat2[40], iDat3[40];
    new 
szLine[700], Float:iPoss[3];
    
    new 
filefile fopen(iRuta"r");
    while(
file && !feof(file))
    {
        
fgets(fileszLinecharsmax(szLine));
        
        if(
szLine[0] == ';' || szLine[0] == '/' && szLine[1] == '/' || !szLine[0])
            continue;
        
        
parseszLineiDatcharsmax(iDat), iDat2charsmax(iDat2), iDat3charsmax(iDat3));
        
        
iPoss[0] = str_to_float(iDat);
        
iPoss[1] = str_to_float(iDat2);
        
iPoss[2] = str_to_float(iDat3);
        
        
CreateEnt(iPoss);
        
client_print(0print_chat"[ZE] Zona segura identificada."iRuta);
    }
    
fclose(file);


public 
Touch_Register(iEnt_Zonaindex)
{
    new 
name[33]
    
get_user_name(indexname32)
    new 
classname[8]
    
entity_get_string(iEnt_ZonaEV_SZ_classnameclassname7)

    if(
g_PartyData[index][In_Party])
    {
        
// Removido el CODE de Party
    
}
    else
    {
        
g_exp[index] += 10 * (_hv 1)  //  <-- añades EXP al user (puedes poner otro CODE como añadir niveles, etc )
        
g_Pupgrade[index] += * (_hv 1)  // <-- añades PUs al user (puedes poner otro CODE como añadir niveles, etc )
        
update_xp(index)  // <-- actualizas los niveles con los valores añadidos

        
zp_colored_print(index"^x04 [ZE]^x01 Ganaste^x04 %d^x01 de Exp por Llegar a la zona de^x04 Escape^x01!!",10 * (_hv 1))
        
zp_colored_print(index"^x04 [ZE]^x01 Ganaste^x04 %d^x01 de PU por Llegar a la zona de^x04 Escape^x01!!",* (_hv 1))
    }


Vení mogolico ahora no te dejo mas con cadena, ahora te meto al galpón y no salís mas

Responder
#7
(20/04/2018, 12:34 PM)Skylar escribió: Pero mira ese robo de autor

(19/04/2018, 03:28 PM)freategui escribió: Añadido el touch, obviamente dentro de tu ZE:

Código PHP:
// Variables necesarias:
new const Model[] = "models/w_kevlar.mdl";
new const 
iEnt[] = "Zona_Segura";

new 
Float:fOrigin[3];

new 
Path[256];
new 
iMap[90]; 
new 
iRuta[900]; 

public 
plugin_init()
{
    
    
// Add your own code here

    
register_concmd("menu_zona""f_Menu");
    
register_concmd("leer_zona""ReadPos");
    
get_mapname(iMapcharsmax(iMap));
    
get_configsdir(Pathcharsmax(Path));
    
formatex(iRutacharsmax(iRuta), "%s/%s.ini"PathiMap);

    
// Si un player tocó la entidad llamamos a touch_register:
    
register_touch("ZonaSegura""player""Touch_Register")

    
// Add your own code here

    
ReadPos();
}
public 
plugin_precache() precache_model(Model);

public 
f_Menu(id){
    new 
menu menu_create("Registrar Zona Segura en el Mapa","hn_poner");
    
    
menu_additem(menu,"Registrar Entidad");
    
menu_additem(menu,"Borrar Entidad");
    
menu_additem(menu,"Guardar Entidad");
    
    
menu_display(idmenu);
    return 
PLUGIN_HANDLED;
}

public 
hn_poner(idmenuitem)
{
    if ( 
item == MENU_EXIT )
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED;
    }
    switch(
item){
        case 
0:{
            new 
iOrigin[3]; get_user_origin(idiOrigin3);
            
IVecFVec(iOriginfOrigin); CreateEnt(fOrigin);
        }
        case 
1:{ 
            new 
iEntity = -1;
            while((
iEntity find_ent_by_class(iEntityiEnt)) != 0remove_entityiEntity );
            }
        case 
2SaveEnt(fOrigin);
    }
    
f_Menu(id);
    return 
PLUGIN_HANDLED;  

CreateEnt(const Float:Origin[3])
{
    new 
ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"));  
    if(!
ent) return;
    
    
engfunc(EngFunc_SetModelentModel);
    
set_pev(entpev_solidSOLID_TRIGGER);
    
set_pev(entpev_classnameiEnt);
    
engfunc(EngFunc_SetSizeentFloat:{-150.0, -1.0, -150.0}, Float:{150.01.0150.0});
    
set_pev(entpev_minsFloat:{-150.0, -1.0, -150.0});
    
set_pev(entpev_maxsFloat:{150.01.0150.0});
    
engfunc(EngFunc_SetOriginentOrigin);
    
}
SaveEnt(const Float:Origin[3]){
    new 
iCoordenada[90]; formatex(iCoordenadacharsmax(iCoordenada),  "%.2f %.2f %.2f"Origin[0], Origin[1], Origin[2]);
    new 
szText[300];
    
    if(!
file_exists(iRuta)) {
        
log_amx("[ZE] Archivo '%s' No existe, pero lo creamos."iRuta);
        
write_file(iRuta"; Archivo creado automaticamente");
        
formatex(szTextcharsmax(szText), "; El mapa es %s:"iMap); write_file(iRutaszText);
        
write_file(iRuta"; Las Coordenadas son:");
    }
    
write_file(iRutaiCoordenada);
}
public 
ReadPos(){
    if(!
file_exists(iRuta)) {
        
client_print(0print_chat"[ZE] Archivo '%s' NO Existe."iRuta);
        return;
    }
    new 
iDat[40], iDat2[40], iDat3[40];
    new 
szLine[700], Float:iPoss[3];
    
    new 
filefile fopen(iRuta"r");
    while(
file && !feof(file))
    {
        
fgets(fileszLinecharsmax(szLine));
        
        if(
szLine[0] == ';' || szLine[0] == '/' && szLine[1] == '/' || !szLine[0])
            continue;
        
        
parseszLineiDatcharsmax(iDat), iDat2charsmax(iDat2), iDat3charsmax(iDat3));
        
        
iPoss[0] = str_to_float(iDat);
        
iPoss[1] = str_to_float(iDat2);
        
iPoss[2] = str_to_float(iDat3);
        
        
CreateEnt(iPoss);
        
client_print(0print_chat"[ZE] Zona segura identificada."iRuta);
    }
    
fclose(file);


public 
Touch_Register(iEnt_Zonaindex)
{
    new 
name[33]
    
get_user_name(indexname32)
    new 
classname[8]
    
entity_get_string(iEnt_ZonaEV_SZ_classnameclassname7)

    if(
g_PartyData[index][In_Party])
    {
        
// Removido el CODE de Party
    
}
    else
    {
        
g_exp[index] += 10 * (_hv 1)  //  <-- añades EXP al user (puedes poner otro CODE como añadir niveles, etc )
        
g_Pupgrade[index] += * (_hv 1)  // <-- añades PUs al user (puedes poner otro CODE como añadir niveles, etc )
        
update_xp(index)  // <-- actualizas los niveles con los valores añadidos

        
zp_colored_print(index"^x04 [ZE]^x01 Ganaste^x04 %d^x01 de Exp por Llegar a la zona de^x04 Escape^x01!!",10 * (_hv 1))
        
zp_colored_print(index"^x04 [ZE]^x01 Ganaste^x04 %d^x01 de PU por Llegar a la zona de^x04 Escape^x01!!",* (_hv 1))
    }


Vení mogolico ahora no te dejo mas con cadena, ahora te meto al galpón y no salís mas

Sos un forro alan RoflmaoRoflmao
Responder
#8
buena lancelot tu y strike si saven de esto yo se un poco pero no mucho hypnotyze no sos mas que un editor de mods tu mod ze de deadgaming no era mas que una editada del mod zp clasico y por cierto era feo tu mod editado >.<
Responder
#9
donde se pega ese code ?
Responder
#10
(04/05/2018, 05:09 PM)lucas escribió: donde se pega ese code ?

Lo tenés que adaptar a tú código ZE.

Saludos. Crab
Responder
#11
Alguna forma de que cuando el map explote en ese momento te puedan dar la exp ?
Responder
#12
(27/12/2017, 04:13 PM)Hypnotize escribió: gracias por el aporte, aunque..
Código PHP:
public Func_Touch(iEntiToucher
{
    if (!
is_valid_ent(iEnt) || !is_valid_ent(iToucher) || escape[iToucher]) return FMRES_IGNORED;
    
    if (!
is_user_alive(iToucher) || escape[iToucher]) return FMRES_IGNORED;
    
    
g_escape[iToucher]++
    
    if (
g_escape[iToucher] > 999999999)
    {
        
g_escape[iToucher] = 999999999
    
}    
    
    
escape[iToucher] = true
    
    
if (_hv 1g_experience[iToucher] += get_pcvar_num(cvar_xp_for_escape) * (_hv 1)
    else 
g_experience[iToucher] += get_pcvar_num(cvar_xp_for_escape)
        
    if (
g_experience[iToucher] > 999999999)
    {
        
g_experience[iToucher] = 999999999
    
}
    
    if (
_hv 1g_point[iToucher] += get_pcvar_num(cvar_pu_for_escape) * (_hv 1)
    else 
g_point[iToucher] += get_pcvar_num(cvar_pu_for_escape)
        
    if (
g_point[iToucher] > 999999999)
    {
        
g_point[iToucher] = 999999999
    
}
    
    
zp_colored_print(iToucher"^x04[ZE]^x01 Ganaste^x04 %d^x01 Exp por llegar a la zona de^x04 Escape!!"
    
_hv get_pcvar_num(cvar_xp_for_escape) * (_hv 1) : get_pcvar_num(cvar_xp_for_escape)),
    
zp_colored_print(iToucher"^x04[ZE]^x01 Ganaste^x04 %d^x01 de PU por llegar a la zona de^x04 Escape!!",
    
_hv get_pcvar_num(cvar_pu_for_escape) * (_hv 1) : get_pcvar_num(cvar_pu_for_escape))

    
update_level(iToucher)


??

aparte ese code esta incompleto.

hice esto, sin testear.
Código PHP:
/* Script generated by Pawn Studio */

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>
#include <xs>
#include <engine>

new const iPlugin[][] = {"SetModel""0.1""Hypnotize" };

new const 
Model[] = "models/metasvl.mdl";
new const 
iEnt[] = "ZonaSegura";

new 
Float:fOrigin[3];

new 
Path[256];
new 
iMap[90]; 
new 
iRuta[900]; 

public 
plugin_init()
{
    
register_plugin(iPlugin[0], iPlugin[1], iPlugin[2])
    
// Add your own code here
    
register_clcmd("say /zona""f_Menu");
    
register_clcmd("say /leer""ReadPos");
    
get_mapname(iMapcharsmax(iMap));
    
get_configsdir(Pathcharsmax(Path));
    
formatex(iRutacharsmax(iRuta), "%s/%s.ini"PathiMap);
    
    
ReadPos();
}
public 
plugin_precache() precache_model(Model);

public 
f_Menu(id){
    new 
menu menu_create("Registrar Touch","hn_poner");
    
    
menu_additem(menu,"Registrar Entidad");
    
menu_additem(menu,"Borrar Entidad");
    
menu_additem(menu,"Guardar Entidad");
    
    
menu_display(idmenu);
    return 
PLUGIN_HANDLED;
}
public 
hn_poner(idmenuitem)
{
    if ( 
item == MENU_EXIT )
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED;
    }
    switch(
item){
        case 
0:{
            new 
iOrigin[3]; get_user_origin(idiOrigin3);
            
IVecFVec(iOriginfOrigin); CreateEnt(fOrigin);
        }
        case 
1:{ 
            new 
iEntity = -1;
            while((
iEntity find_ent_by_class(iEntityiEnt)) != 0remove_entityiEntity );
            }
        case 
2SaveEnt(fOrigin);
    }
    
f_Menu(id);
    return 
PLUGIN_HANDLED;  

CreateEnt(const Float:Origin[3])
{
    new 
ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"));  
    if(!
ent) return;
    
    
engfunc(EngFunc_SetModelentModel);
    
set_pev(entpev_solidSOLID_TRIGGER);
    
set_pev(entpev_classnameiEnt);
    
engfunc(EngFunc_SetSizeentFloat:{-150.0, -1.0, -150.0}, Float:{150.01.0150.0});
    
set_pev(entpev_minsFloat:{-150.0, -1.0, -150.0});
    
set_pev(entpev_maxsFloat:{150.01.0150.0});
    
engfunc(EngFunc_SetOriginentOrigin);
    
}
SaveEnt(const Float:Origin[3]){
    new 
iCoordenada[90]; formatex(iCoordenadacharsmax(iCoordenada),  "%.2f %.2f %.2f"Origin[0], Origin[1], Origin[2]);
    new 
szText[300];
    
    if(!
file_exists(iRuta)) {
        
log_amx("[ZE] Archivo '%s' No existe, pero lo creamos."iRuta);
        
write_file(iRuta"; Archivo creado automaticamente");
        
formatex(szTextcharsmax(szText), "; El mapa es %s:"iMap); write_file(iRutaszText);
        
write_file(iRuta"; Plugin Made By Hypnotize");
        
write_file(iRuta"; Las Coordenadas son:");
    }
    
write_file(iRutaiCoordenada);
}
public 
ReadPos(){
    if(!
file_exists(iRuta)) {
        
client_print(0print_chat"[ZE] Archivo '%s' NO Existe."iRuta);
        return;
    }
    new 
iDat[40], iDat2[40], iDat3[40];
    new 
szLine[700], Float:iPoss[3];
    
    new 
filefile fopen(iRuta"r");
    while(
file && !feof(file))
    {
        
fgets(fileszLinecharsmax(szLine));
        
        if(
szLine[0] == ';' || szLine[0] == '/' && szLine[1] == '/' || !szLine[0])
            continue;
        
        
parseszLineiDatcharsmax(iDat), iDat2charsmax(iDat2), iDat3charsmax(iDat3));
        
        
iPoss[0] = str_to_float(iDat);
        
iPoss[1] = str_to_float(iDat2);
        
iPoss[2] = str_to_float(iDat3);
        
        
CreateEnt(iPoss);
    }
    
fclose(file);

solo falta hacerle un touch

(09/01/2018, 01:16 AM)lucas escribió: tu proyecto se llama zombie escape editado por cloudest osea solo editas no creas ese plugin es sacado del ze publico de youtube primero cren sus plugin no copien y pegen Hypnotize tu ze es una mrd es solo una edicion del zp normal solo le pusistes sistema de cuentas que por sierto es recontra facil sistema de cuentas kikizon yle cambiastes el name odio alas personas que les gusta quitar credito

que PENDEJO, no uso el sistema de kikizon niño, que tu lo uses no significa que yo si JAJAJAJJAJA.

Como agrego el touch? que funcione :/
Responder
#13
https://amxmodx-es.com/Thread-ZE-Experie...-a-la-meta

basate en ese
[Imagen: zcsztw-4.png] [Imagen: 6u5fj2-4.png]
[Imagen: linkedin_thumb_image.png][Imagen: 76561198283253977.png][Imagen: linkedin_thumb_image.png]
Responder
#14
(02/06/2019, 02:58 PM)Hypnotize escribió: https://amxmodx-es.com/Thread-ZE-Experie...-a-la-meta

basate en ese

podria hacerlo como meta? con un modelo de lllegada sin oprimir ningun boton, simplemente pasar por encima.
Responder
#15
Código PHP:
register_forward(FM_Touch"fw_Touch")

public 
fw_Touch(entvictim) {
    if (!
pev_valid(ent))
        return 
FMRES_IGNORED;

    new 
EntClassName[32]
    
entity_get_string(entEV_SZ_classnameEntClassNamecharsmax(EntClassName))
        
    if(
equal(EntClassName"meta") && is_user_alive(victim) && !g_touched[victim])
        
load_record(victim)
        
    return 
FMRES_IGNORED;


fijate en eso lo saque de metrikcz. es similar Whatever
[Imagen: zcsztw-4.png] [Imagen: 6u5fj2-4.png]
[Imagen: linkedin_thumb_image.png][Imagen: 76561198283253977.png][Imagen: linkedin_thumb_image.png]
Responder
#16
No lo encontraste. Y no te pertenece. Genius Original author lssj999. Insecure
[Zombie Escape] My Maps

ze_ATIX_panic_s2{100%}
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)