Mensajes: 167
Temas: 42
Registro en: Dec 2016
Reputación:
0
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 ( File , szData , charsmax ( szData )) if(! szData [ 0 ] || szData [ 0 ] == ';' || szData [ 0 ] == ' ' || ( szData [ 0 ] == '/' && szData [ 1 ] == '/' )) continue parse ( szData , szX , charsmax ( szX ), szY , charsmax ( szY ), szZ , charsmax ( 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 ( id , iOrigin , 2 ) Create_Entity ( iOrigin ) } case 1 :{ new ent = - 1 while(( ent = find_ent_by_class ( ent , iClassName ))) 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 ( iOrigin , OriginF ) entity_set_vector ( iEnt , EV_VEC_origin , OriginF ) entity_set_string ( iEnt , EV_SZ_classname , iClassName ) // Le asignamos el nombre creado a la entidad. new Float : mins [ 3 ] = {- 10.0 , - 10.0 , 0.0 } // Tamaño new Float : maxs [ 3 ] = { 10.0 , 10.0 , 150.0 } // Tamaño entity_set_size ( iEnt , mins , maxs ) // Creamos el tamaño de la entidad (No el model) entity_set_int ( iEnt , EV_INT_solid , SOLID_TRIGGER ) // La hacemos solida entity_set_int ( iEnt , EV_INT_movetype , MOVETYPE_STEP ) // Hacemos que no se mueva. } public Func_Touch ( iEnt , iToucher ) { 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 ? 2 : 1 ) g_experience [ iToucher ] += get_pcvar_num ( cvar_xp_for_escape ) * ( _hv ? 2 : 1 ) else g_experience [ iToucher ] += get_pcvar_num ( cvar_xp_for_escape ) if ( g_experience [ iToucher ] > 999999999 ) { g_experience [ iToucher ] = 999999999 } if ( _hv ? 2 : 1 ) g_point [ iToucher ] += get_pcvar_num ( cvar_pu_for_escape ) * ( _hv ? 2 : 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 ? 2 : 1 ? get_pcvar_num ( cvar_xp_for_escape ) * ( _hv ? 2 : 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 ? 2 : 1 ? get_pcvar_num ( cvar_pu_for_escape ) * ( _hv ? 2 : 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 ( ent , iClassName ))){ entity_get_vector ( ent , EV_VEC_origin , Origin ) 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 ( ent , iClassName ))) { entity_get_vector ( ent , EV_VEC_origin , Origin ) formatex ( szData , charsmax ( szData ), "%f %f %f^n" , Origin [ 0 ], Origin [ 1 ], Origin [ 2 ]) fputs ( File , szData ) } fclose ( File ) client_print ( id , print_chat , "Zonas de Escapes Guardados" ) } [/
php]
Zombie Escape Optimizando (98,5%)
Mensajes: 7,178
Temas: 93
Registro en: Aug 2014
Reputación:
63
27/12/2017, 04:13 PM
(Última modificación: 13/01/2018, 03:02 PM por Hinami .)
gracias por el aporte, aunque..
Código PHP:
public Func_Touch ( iEnt , iToucher ) { 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 ? 2 : 1 ) g_experience [ iToucher ] += get_pcvar_num ( cvar_xp_for_escape ) * ( _hv ? 2 : 1 ) else g_experience [ iToucher ] += get_pcvar_num ( cvar_xp_for_escape ) if ( g_experience [ iToucher ] > 999999999 ) { g_experience [ iToucher ] = 999999999 } if ( _hv ? 2 : 1 ) g_point [ iToucher ] += get_pcvar_num ( cvar_pu_for_escape ) * ( _hv ? 2 : 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 ? 2 : 1 ? get_pcvar_num ( cvar_xp_for_escape ) * ( _hv ? 2 : 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 ? 2 : 1 ? get_pcvar_num ( cvar_pu_for_escape ) * ( _hv ? 2 : 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 ( iMap , charsmax ( iMap )); get_configsdir ( Path , charsmax ( Path )); formatex ( iRuta , charsmax ( iRuta ), "%s/%s.ini" , Path , iMap ); 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 ( id , menu ); return PLUGIN_HANDLED ; } public hn_poner ( id , menu , item ) { if ( item == MENU_EXIT ) { menu_destroy ( menu ) return PLUGIN_HANDLED ; } switch( item ){ case 0 :{ new iOrigin [ 3 ]; get_user_origin ( id , iOrigin , 3 ); IVecFVec ( iOrigin , fOrigin ); CreateEnt ( fOrigin ); } case 1 :{ new iEntity = - 1 ; while(( iEntity = find_ent_by_class ( iEntity , iEnt )) != 0 ) remove_entity ( iEntity ); } case 2 : SaveEnt ( fOrigin ); } f_Menu ( id ); return PLUGIN_HANDLED ; } CreateEnt (const Float : Origin [ 3 ]) { new ent = engfunc ( EngFunc_CreateNamedEntity , engfunc ( EngFunc_AllocString , "info_target" )); if(! ent ) return; engfunc ( EngFunc_SetModel , ent , Model ); set_pev ( ent , pev_solid , SOLID_TRIGGER ); set_pev ( ent , pev_classname , iEnt ); engfunc ( EngFunc_SetSize , ent , Float :{- 150.0 , - 1.0 , - 150.0 }, Float :{ 150.0 , 1.0 , 150.0 }); set_pev ( ent , pev_mins , Float :{- 150.0 , - 1.0 , - 150.0 }); set_pev ( ent , pev_maxs , Float :{ 150.0 , 1.0 , 150.0 }); engfunc ( EngFunc_SetOrigin , ent , Origin ); } SaveEnt (const Float : Origin [ 3 ]){ new iCoordenada [ 90 ]; formatex ( iCoordenada , charsmax ( 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 ( szText , charsmax ( szText ), "; El mapa es %s:" , iMap ); write_file ( iRuta , szText ); write_file ( iRuta , "; Plugin Made By Hypnotize" ); write_file ( iRuta , "; Las Coordenadas son:" ); } write_file ( iRuta , iCoordenada ); } public ReadPos (){ if(! file_exists ( iRuta )) { client_print ( 0 , print_chat , "[ZE] Archivo '%s' NO Existe." , iRuta ); return; } new iDat [ 40 ], iDat2 [ 40 ], iDat3 [ 40 ]; new szLine [ 700 ], Float : iPoss [ 3 ]; new file ; file = fopen ( iRuta , "r" ); while( file && ! feof ( file )) { fgets ( file , szLine , charsmax ( szLine )); if( szLine [ 0 ] == ';' || szLine [ 0 ] == '/' && szLine [ 1 ] == '/' || ! szLine [ 0 ]) continue; parse ( szLine , iDat , charsmax ( iDat ), iDat2 , charsmax ( iDat2 ), iDat3 , charsmax ( 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.
Mensajes: 167
Temas: 42
Registro en: Dec 2016
Reputación:
0
hasta ahora no enteni aunque ahí no veo faltar ningun code.
Ami me funciona de 100% todo el code que postie.
PERO TU CODE TAMBIEN ESTA MUY BUENO BRO.
Zombie Escape Optimizando (98,5%)
Mensajes: 7
Temas: 1
Registro en: Jan 2017
Reputación:
0
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 ( iMap , charsmax ( iMap )); get_configsdir ( Path , charsmax ( Path )); formatex ( iRuta , charsmax ( iRuta ), "%s/%s.ini" , Path , iMap ); // 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 ( id , menu ); return PLUGIN_HANDLED ; } public hn_poner ( id , menu , item ) { if ( item == MENU_EXIT ) { menu_destroy ( menu ) return PLUGIN_HANDLED ; } switch( item ){ case 0 :{ new iOrigin [ 3 ]; get_user_origin ( id , iOrigin , 3 ); IVecFVec ( iOrigin , fOrigin ); CreateEnt ( fOrigin ); } case 1 :{ new iEntity = - 1 ; while(( iEntity = find_ent_by_class ( iEntity , iEnt )) != 0 ) remove_entity ( iEntity ); } case 2 : SaveEnt ( fOrigin ); } f_Menu ( id ); return PLUGIN_HANDLED ; } CreateEnt (const Float : Origin [ 3 ]) { new ent = engfunc ( EngFunc_CreateNamedEntity , engfunc ( EngFunc_AllocString , "info_target" )); if(! ent ) return; engfunc ( EngFunc_SetModel , ent , Model ); set_pev ( ent , pev_solid , SOLID_TRIGGER ); set_pev ( ent , pev_classname , iEnt ); engfunc ( EngFunc_SetSize , ent , Float :{- 150.0 , - 1.0 , - 150.0 }, Float :{ 150.0 , 1.0 , 150.0 }); set_pev ( ent , pev_mins , Float :{- 150.0 , - 1.0 , - 150.0 }); set_pev ( ent , pev_maxs , Float :{ 150.0 , 1.0 , 150.0 }); engfunc ( EngFunc_SetOrigin , ent , Origin ); } SaveEnt (const Float : Origin [ 3 ]){ new iCoordenada [ 90 ]; formatex ( iCoordenada , charsmax ( 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 ( szText , charsmax ( szText ), "; El mapa es %s:" , iMap ); write_file ( iRuta , szText ); write_file ( iRuta , "; Las Coordenadas son:" ); } write_file ( iRuta , iCoordenada ); } public ReadPos (){ if(! file_exists ( iRuta )) { client_print ( 0 , print_chat , "[ZE] Archivo '%s' NO Existe." , iRuta ); return; } new iDat [ 40 ], iDat2 [ 40 ], iDat3 [ 40 ]; new szLine [ 700 ], Float : iPoss [ 3 ]; new file ; file = fopen ( iRuta , "r" ); while( file && ! feof ( file )) { fgets ( file , szLine , charsmax ( szLine )); if( szLine [ 0 ] == ';' || szLine [ 0 ] == '/' && szLine [ 1 ] == '/' || ! szLine [ 0 ]) continue; parse ( szLine , iDat , charsmax ( iDat ), iDat2 , charsmax ( iDat2 ), iDat3 , charsmax ( iDat3 )); iPoss [ 0 ] = str_to_float ( iDat ); iPoss [ 1 ] = str_to_float ( iDat2 ); iPoss [ 2 ] = str_to_float ( iDat3 ); CreateEnt ( iPoss ); client_print ( 0 , print_chat , "[ZE] Zona segura identificada." , iRuta ); } fclose ( file ); } public Touch_Register ( iEnt_Zona , index ) { new name [ 33 ] get_user_name ( index , name , 32 ) new classname [ 8 ] entity_get_string ( iEnt_Zona , EV_SZ_classname , classname , 7 ) if( g_PartyData [ index ][ In_Party ]) { // Removido el CODE de Party } else { g_exp [ index ] += 10 * ( _hv ? 2 : 1 ) // <-- añades EXP al user (puedes poner otro CODE como añadir niveles, etc ) g_Pupgrade [ index ] += 1 * ( _hv ? 2 : 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 ? 2 : 1 )) zp_colored_print ( index , "^x04 [ZE]^x01 Ganaste^x04 %d^x01 de PU por Llegar a la zona de^x04 Escape^x01!!" , 1 * ( _hv ? 2 : 1 )) } }
Mensajes: 7,178
Temas: 93
Registro en: Aug 2014
Reputación:
63
19/04/2018, 06:03 PM
(Última modificación: 19/04/2018, 06:06 PM por Hinami .)
Eso no sirve
Hacía falta borrarme del autor ?
Y no hace falta adaptarlo usas natives y valió verga
Mensajes: 3,238
Temas: 47
Registro en: Feb 2015
Reputación:
34
20/04/2018, 12:34 PM
(Última modificación: 20/04/2018, 12:35 PM por Skylar .)
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 ( iMap , charsmax ( iMap )); get_configsdir ( Path , charsmax ( Path )); formatex ( iRuta , charsmax ( iRuta ), "%s/%s.ini" , Path , iMap ); // 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 ( id , menu ); return PLUGIN_HANDLED ; } public hn_poner ( id , menu , item ) { if ( item == MENU_EXIT ) { menu_destroy ( menu ) return PLUGIN_HANDLED ; } switch( item ){ case 0 :{ new iOrigin [ 3 ]; get_user_origin ( id , iOrigin , 3 ); IVecFVec ( iOrigin , fOrigin ); CreateEnt ( fOrigin ); } case 1 :{ new iEntity = - 1 ; while(( iEntity = find_ent_by_class ( iEntity , iEnt )) != 0 ) remove_entity ( iEntity ); } case 2 : SaveEnt ( fOrigin ); } f_Menu ( id ); return PLUGIN_HANDLED ; } CreateEnt (const Float : Origin [ 3 ]) { new ent = engfunc ( EngFunc_CreateNamedEntity , engfunc ( EngFunc_AllocString , "info_target" )); if(! ent ) return; engfunc ( EngFunc_SetModel , ent , Model ); set_pev ( ent , pev_solid , SOLID_TRIGGER ); set_pev ( ent , pev_classname , iEnt ); engfunc ( EngFunc_SetSize , ent , Float :{- 150.0 , - 1.0 , - 150.0 }, Float :{ 150.0 , 1.0 , 150.0 }); set_pev ( ent , pev_mins , Float :{- 150.0 , - 1.0 , - 150.0 }); set_pev ( ent , pev_maxs , Float :{ 150.0 , 1.0 , 150.0 }); engfunc ( EngFunc_SetOrigin , ent , Origin ); } SaveEnt (const Float : Origin [ 3 ]){ new iCoordenada [ 90 ]; formatex ( iCoordenada , charsmax ( 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 ( szText , charsmax ( szText ), "; El mapa es %s:" , iMap ); write_file ( iRuta , szText ); write_file ( iRuta , "; Las Coordenadas son:" ); } write_file ( iRuta , iCoordenada ); } public ReadPos (){ if(! file_exists ( iRuta )) { client_print ( 0 , print_chat , "[ZE] Archivo '%s' NO Existe." , iRuta ); return; } new iDat [ 40 ], iDat2 [ 40 ], iDat3 [ 40 ]; new szLine [ 700 ], Float : iPoss [ 3 ]; new file ; file = fopen ( iRuta , "r" ); while( file && ! feof ( file )) { fgets ( file , szLine , charsmax ( szLine )); if( szLine [ 0 ] == ';' || szLine [ 0 ] == '/' && szLine [ 1 ] == '/' || ! szLine [ 0 ]) continue; parse ( szLine , iDat , charsmax ( iDat ), iDat2 , charsmax ( iDat2 ), iDat3 , charsmax ( iDat3 )); iPoss [ 0 ] = str_to_float ( iDat ); iPoss [ 1 ] = str_to_float ( iDat2 ); iPoss [ 2 ] = str_to_float ( iDat3 ); CreateEnt ( iPoss ); client_print ( 0 , print_chat , "[ZE] Zona segura identificada." , iRuta ); } fclose ( file ); } public Touch_Register ( iEnt_Zona , index ) { new name [ 33 ] get_user_name ( index , name , 32 ) new classname [ 8 ] entity_get_string ( iEnt_Zona , EV_SZ_classname , classname , 7 ) if( g_PartyData [ index ][ In_Party ]) { // Removido el CODE de Party } else { g_exp [ index ] += 10 * ( _hv ? 2 : 1 ) // <-- añades EXP al user (puedes poner otro CODE como añadir niveles, etc ) g_Pupgrade [ index ] += 1 * ( _hv ? 2 : 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 ? 2 : 1 )) zp_colored_print ( index , "^x04 [ZE]^x01 Ganaste^x04 %d^x01 de PU por Llegar a la zona de^x04 Escape^x01!!" , 1 * ( _hv ? 2 : 1 )) } }
Vení mogolico ahora no te dejo mas con cadena, ahora te meto al galpón y no salís mas
Mensajes: 3,077
Temas: 33
Registro en: May 2017
Reputación:
34
(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 ( iMap , charsmax ( iMap )); get_configsdir ( Path , charsmax ( Path )); formatex ( iRuta , charsmax ( iRuta ), "%s/%s.ini" , Path , iMap ); // 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 ( id , menu ); return PLUGIN_HANDLED ; } public hn_poner ( id , menu , item ) { if ( item == MENU_EXIT ) { menu_destroy ( menu ) return PLUGIN_HANDLED ; } switch( item ){ case 0 :{ new iOrigin [ 3 ]; get_user_origin ( id , iOrigin , 3 ); IVecFVec ( iOrigin , fOrigin ); CreateEnt ( fOrigin ); } case 1 :{ new iEntity = - 1 ; while(( iEntity = find_ent_by_class ( iEntity , iEnt )) != 0 ) remove_entity ( iEntity ); } case 2 : SaveEnt ( fOrigin ); } f_Menu ( id ); return PLUGIN_HANDLED ; } CreateEnt (const Float : Origin [ 3 ]) { new ent = engfunc ( EngFunc_CreateNamedEntity , engfunc ( EngFunc_AllocString , "info_target" )); if(! ent ) return; engfunc ( EngFunc_SetModel , ent , Model ); set_pev ( ent , pev_solid , SOLID_TRIGGER ); set_pev ( ent , pev_classname , iEnt ); engfunc ( EngFunc_SetSize , ent , Float :{- 150.0 , - 1.0 , - 150.0 }, Float :{ 150.0 , 1.0 , 150.0 }); set_pev ( ent , pev_mins , Float :{- 150.0 , - 1.0 , - 150.0 }); set_pev ( ent , pev_maxs , Float :{ 150.0 , 1.0 , 150.0 }); engfunc ( EngFunc_SetOrigin , ent , Origin ); } SaveEnt (const Float : Origin [ 3 ]){ new iCoordenada [ 90 ]; formatex ( iCoordenada , charsmax ( 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 ( szText , charsmax ( szText ), "; El mapa es %s:" , iMap ); write_file ( iRuta , szText ); write_file ( iRuta , "; Las Coordenadas son:" ); } write_file ( iRuta , iCoordenada ); } public ReadPos (){ if(! file_exists ( iRuta )) { client_print ( 0 , print_chat , "[ZE] Archivo '%s' NO Existe." , iRuta ); return; } new iDat [ 40 ], iDat2 [ 40 ], iDat3 [ 40 ]; new szLine [ 700 ], Float : iPoss [ 3 ]; new file ; file = fopen ( iRuta , "r" ); while( file && ! feof ( file )) { fgets ( file , szLine , charsmax ( szLine )); if( szLine [ 0 ] == ';' || szLine [ 0 ] == '/' && szLine [ 1 ] == '/' || ! szLine [ 0 ]) continue; parse ( szLine , iDat , charsmax ( iDat ), iDat2 , charsmax ( iDat2 ), iDat3 , charsmax ( iDat3 )); iPoss [ 0 ] = str_to_float ( iDat ); iPoss [ 1 ] = str_to_float ( iDat2 ); iPoss [ 2 ] = str_to_float ( iDat3 ); CreateEnt ( iPoss ); client_print ( 0 , print_chat , "[ZE] Zona segura identificada." , iRuta ); } fclose ( file ); } public Touch_Register ( iEnt_Zona , index ) { new name [ 33 ] get_user_name ( index , name , 32 ) new classname [ 8 ] entity_get_string ( iEnt_Zona , EV_SZ_classname , classname , 7 ) if( g_PartyData [ index ][ In_Party ]) { // Removido el CODE de Party } else { g_exp [ index ] += 10 * ( _hv ? 2 : 1 ) // <-- añades EXP al user (puedes poner otro CODE como añadir niveles, etc ) g_Pupgrade [ index ] += 1 * ( _hv ? 2 : 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 ? 2 : 1 )) zp_colored_print ( index , "^x04 [ZE]^x01 Ganaste^x04 %d^x01 de PU por Llegar a la zona de^x04 Escape^x01!!" , 1 * ( _hv ? 2 : 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
Mensajes: 17
Temas: 4
Registro en: Sep 2017
Reputación:
0
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 >.<
Mensajes: 17
Temas: 4
Registro en: Sep 2017
Reputación:
0
Mensajes: 3,077
Temas: 33
Registro en: May 2017
Reputación:
34
(04/05/2018, 05:09 PM) lucas escribió: donde se pega ese code ?
Lo tenés que adaptar a tú código ZE.
Saludos.
Mensajes: 6
Temas: 2
Registro en: Aug 2015
Reputación:
0
Alguna forma de que cuando el map explote en ese momento te puedan dar la exp ?
Mensajes: 65
Temas: 21
Registro en: Aug 2014
Reputación:
0
(27/12/2017, 04:13 PM) Hypnotize escribió: gracias por el aporte, aunque..
Código PHP:
public Func_Touch ( iEnt , iToucher ) { 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 ? 2 : 1 ) g_experience [ iToucher ] += get_pcvar_num ( cvar_xp_for_escape ) * ( _hv ? 2 : 1 ) else g_experience [ iToucher ] += get_pcvar_num ( cvar_xp_for_escape ) if ( g_experience [ iToucher ] > 999999999 ) { g_experience [ iToucher ] = 999999999 } if ( _hv ? 2 : 1 ) g_point [ iToucher ] += get_pcvar_num ( cvar_pu_for_escape ) * ( _hv ? 2 : 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 ? 2 : 1 ? get_pcvar_num ( cvar_xp_for_escape ) * ( _hv ? 2 : 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 ? 2 : 1 ? get_pcvar_num ( cvar_pu_for_escape ) * ( _hv ? 2 : 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 ( iMap , charsmax ( iMap )); get_configsdir ( Path , charsmax ( Path )); formatex ( iRuta , charsmax ( iRuta ), "%s/%s.ini" , Path , iMap ); 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 ( id , menu ); return PLUGIN_HANDLED ; } public hn_poner ( id , menu , item ) { if ( item == MENU_EXIT ) { menu_destroy ( menu ) return PLUGIN_HANDLED ; } switch( item ){ case 0 :{ new iOrigin [ 3 ]; get_user_origin ( id , iOrigin , 3 ); IVecFVec ( iOrigin , fOrigin ); CreateEnt ( fOrigin ); } case 1 :{ new iEntity = - 1 ; while(( iEntity = find_ent_by_class ( iEntity , iEnt )) != 0 ) remove_entity ( iEntity ); } case 2 : SaveEnt ( fOrigin ); } f_Menu ( id ); return PLUGIN_HANDLED ; } CreateEnt (const Float : Origin [ 3 ]) { new ent = engfunc ( EngFunc_CreateNamedEntity , engfunc ( EngFunc_AllocString , "info_target" )); if(! ent ) return; engfunc ( EngFunc_SetModel , ent , Model ); set_pev ( ent , pev_solid , SOLID_TRIGGER ); set_pev ( ent , pev_classname , iEnt ); engfunc ( EngFunc_SetSize , ent , Float :{- 150.0 , - 1.0 , - 150.0 }, Float :{ 150.0 , 1.0 , 150.0 }); set_pev ( ent , pev_mins , Float :{- 150.0 , - 1.0 , - 150.0 }); set_pev ( ent , pev_maxs , Float :{ 150.0 , 1.0 , 150.0 }); engfunc ( EngFunc_SetOrigin , ent , Origin ); } SaveEnt (const Float : Origin [ 3 ]){ new iCoordenada [ 90 ]; formatex ( iCoordenada , charsmax ( 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 ( szText , charsmax ( szText ), "; El mapa es %s:" , iMap ); write_file ( iRuta , szText ); write_file ( iRuta , "; Plugin Made By Hypnotize" ); write_file ( iRuta , "; Las Coordenadas son:" ); } write_file ( iRuta , iCoordenada ); } public ReadPos (){ if(! file_exists ( iRuta )) { client_print ( 0 , print_chat , "[ZE] Archivo '%s' NO Existe." , iRuta ); return; } new iDat [ 40 ], iDat2 [ 40 ], iDat3 [ 40 ]; new szLine [ 700 ], Float : iPoss [ 3 ]; new file ; file = fopen ( iRuta , "r" ); while( file && ! feof ( file )) { fgets ( file , szLine , charsmax ( szLine )); if( szLine [ 0 ] == ';' || szLine [ 0 ] == '/' && szLine [ 1 ] == '/' || ! szLine [ 0 ]) continue; parse ( szLine , iDat , charsmax ( iDat ), iDat2 , charsmax ( iDat2 ), iDat3 , charsmax ( 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 :/
Mensajes: 7,178
Temas: 93
Registro en: Aug 2014
Reputación:
63
Mensajes: 65
Temas: 21
Registro en: Aug 2014
Reputación:
0
(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.
Mensajes: 7,178
Temas: 93
Registro en: Aug 2014
Reputación:
63
Código PHP:
register_forward ( FM_Touch , "fw_Touch" ) public fw_Touch ( ent , victim ) { if (! pev_valid ( ent )) return FMRES_IGNORED ; new EntClassName [ 32 ] entity_get_string ( ent , EV_SZ_classname , EntClassName , charsmax ( 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
Mensajes: 60
Temas: 22
Registro en: Feb 2018
Reputación:
2
No lo encontraste. Y no te pertenece.
Original author lssj999.