Raised This Month: $12 Target: $400
 3% 

[Ayuda] Plugin de "Hora feliz"


  
 
 
Thread Tools Display Modes
Author Message
darkclicks
New Member
Join Date: Apr 2013
Old 04-16-2013 , 17:24   [Ayuda] Plugin de "Hora feliz"
#1

Hola buenas tardes, me acabo de registrar en el foro soy nuevo , me llamo matias, quisiera saber si existe la posibilidad de que alguna buena persona haga un pequeño plugin para incluirle al zombie plague 4.3 que sea de hora feliz, use el buscador y me fije que hay uno pero el que yo quiero hacer no es para que suba mas ammos cuando le pegas sino que a cierta hora baje el requerimiento de damage, ejemplo yo en mi server tengo cada 500 de damage 1 amo, entonces quiero por ejemplo que de tal hora a tal hora baje a 250, por cierto pobre el happy hour que esta en el foro y no me funciono, alguno tiene idea de porque puede ser?
darkclicks is offline
Old 04-16-2013, 18:00
KermesS
This message has been deleted by KermesS. Reason: Confusión
Matians
Veteran Member
Join Date: Nov 2010
Location: ME QUIEREN ROBAR
Old 04-16-2013 , 18:10   Re: [Ayuda] Plugin de "Hora feliz"
#2

Existe, buscalo, se llama [ZP] HH, hace eso.
Matians is offline
Roccoxx
AlliedModders Donor
Join Date: Jan 2012
Location: Argentina
Old 04-16-2013 , 18:11   Re: [Ayuda] Plugin de "Hora feliz"
#3

creas una variable con el valor de uno, cuando es hf la setias en 2. y en while para ganar ammopacks agregas un /variablecreada y gg.

no pidas ejemplos, esta mas claro que el agua.
__________________
Tutorials here (Spanish)

Like as another Pijudo said: "Tired and retired"
Roccoxx is offline
Send a message via MSN to Roccoxx
LuKks
Senior Member
Join Date: Dec 2012
Location: Argentina, Santa Fe
Old 04-17-2013 , 17:15   Re: [Ayuda] Plugin de "Hora feliz"
#4

PHP Code:
new const horas[] = { 00010203050607 }
new 
bool:g_happytime

// Event Round Start
public event_round_start()
{
    
set_task(0.1,"happyhour")
}

public 
happyhour()
{
    new 
data[12]
    
get_time("%H"data12)
    new 
Tiempo str_to_num(data)
    
    for(new 
i=0;<= sizeof horas 1;i++)
    {
        if(
Tiempo != horas[i]) continue
        
g_happytime true
        
break;
    }
    if(
g_happytime)
    {
        
zp_colored_print(0"^x04[www.Stygia-Games.Com.Ar]^x03 HappyHour Activado !!!")
    }
    else
    {
        
zp_colored_print(0"^x04[www.Stygia-Games.Com.Ar]^x03 HappyHour Desactivado !!!")
    }
}

/* luego se usa asi */

if(g_happytime)
{
    
// code cuando es happyhour
}
else
{
    
// code cuando NO es happyhour

LuKks is offline
Matians
Veteran Member
Join Date: Nov 2010
Location: ME QUIEREN ROBAR
Old 04-17-2013 , 17:45   Re: [Ayuda] Plugin de "Hora feliz"
#5

Alpedo, puede usar comando hay en el happyhour y usar zp_human_damage 250, tranquilamente. Igual ya le di la solución.
Matians is offline
Old 04-17-2013, 18:44
LeeanAndNeka
This message has been deleted by lucas_7_94. Reason: Off topic.
Roccoxx
AlliedModders Donor
Join Date: Jan 2012
Location: Argentina
Old 04-17-2013 , 20:25   Re: [Ayuda] Plugin de "Hora feliz"
#6

Quote:
Originally Posted by Matians View Post
Alpedo, puede usar comando hay en el happyhour y usar zp_human_damage 250, tranquilamente. Igual ya le di la solución.
y si un admin lo modifica?

es mejor mi forma.
__________________
Tutorials here (Spanish)

Like as another Pijudo said: "Tired and retired"
Roccoxx is offline
Send a message via MSN to Roccoxx
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 04-17-2013 , 21:17   Re: [Ayuda] Plugin de "Hora feliz"
#7

Que al pedo que está ese for en el código...
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
lanproject
Member
Join Date: Mar 2012
Old 04-17-2013 , 21:57   Re: [Ayuda] Plugin de "Hora feliz"
#8

Quote:
Originally Posted by Matians View Post
Alpedo, puede usar comando hay en el happyhour y usar zp_human_damage 250, tranquilamente. Igual ya le di la solución.
eso que decis vos yo lo busque y no me aparece.. me podrias decir mas o menos en que seccion buscar.. porque yo tambien ando necesitando algo asi para tener un happy hour en mi sv.. je
lanproject is offline
LuKks
Senior Member
Join Date: Dec 2012
Location: Argentina, Santa Fe
Old 04-17-2013 , 23:29   Re: [Ayuda] Plugin de "Hora feliz"
#9

PHP Code:
public happyhour() 

    new 
data[12
    
get_time("%H"data12
    new 
Tiempo str_to_num(data
     
    for(new 
i=0;<= sizeof horas 1;i++) 
    { 
        if(
Tiempo != horas[i]) continue 
        
g_happytime true 
        
break; 
    } 

    if(
g_happytime
    {
        
server_cmd("zp_human_damage_reward 1000")
        
server_cmd("zp_zombie_infect_reward 500")
    }
    else
    {
        
server_cmd("zp_human_damage_reward 500")
        
server_cmd("zp_zombie_infect_reward 250")
    }

LuKks is offline
LuKks
Senior Member
Join Date: Dec 2012
Location: Argentina, Santa Fe
Old 04-17-2013 , 23:36   Re: [Ayuda] Plugin de "Hora feliz"
#10

roccoxx:
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Nuevo Plugin"
#define VERSION "1.0"
#define AUTHOR ";LuKks.-'"

new const horas[] = { 00010203050607 
new 
reward 2

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
// Add your code here...
}

public 
event_round_start() set_task(0.1,"happyhour"

public 
happyhour() 

    new 
data[12
    
get_time("%H"data12
    new 
Tiempo str_to_num(data
     
    for(new 
i=0;<= sizeof horas 1;i++) 
    { 
        if(
Tiempo != horas[i]) continue 
        
reward 1
        
break; 
    } 


/* esta parte esta en el zp */

    // Reward ammo packs
    
if (!g_survivor[attacker] || !get_pcvar_num(cvar_survignoreammo) && is_user_connected(attacker))
    {
        
// Store damage dealt
        
g_damagedealt[attacker] += floatround(damage)
            
        
// Get damage required to get an ammo pack
        
static ammodamage
        ammodamage 
get_pcvar_num(cvar_ammodamage)
            
        
// Reward ammo packs for every [ammo damage] dealt
        
while (g_damagedealt[attacker] >= ammodamage)
        {
            
g_ammopacks[attacker] += is_user_admin(attacker) ? 1000 500 reward
            g_damagedealt
[attacker] -= ammodamage
        
}  
    } 
algo asi dices tu?, si es asi no es mala la idea ;)

perdon por el doble-post, no me deja editar.
LuKks is offline
 



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 06:13.


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