Existing user? Sign in
Sign up
Games
Servers
Useful
User
Pass
2FA
[rezolvat]Cerere Plugin
Go to page
Previous
1
,
2
,
3
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Counter-Strike: Help zone
Author
Message
3586
destroi112
[DEV]
Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042
,
Topics: 119
Location:
---------
Reputation:
515.9
Votes
: 118
Posted: 15-06-2015, 10:31:05
| Translate post to:
... (
Click for more languages
)
Incearca asa
Spoiler:
#include<amxmodx>
#include<hamsandwich>
#include<fun>
#include<cstrike>
#pragma tabsize 0
new interval_1,interval_2;
new const Tag[] = "[Server.freakz.ro]";
new g_on;
public plugin_init()
{
register_plugin("Vip la ore fixe","1.0","D3luxe");
RegisterHam(Ham_Killed,"player", "killed");
interval_1 = register_cvar("amx_firsthour","21");
interval_2 = register_cvar("amx_lasthour","22");
}
public client_putinserver(id)
{
verifica(id);
}
public verifica(id)
{
new h, m, s;
time(h, m, s);
if(h >= get_pcvar_num(interval_1) && h < get_pcvar_num(interval_2))
{
g_on = true;
ChatColor(0,"!g%s!yA inceput !teamHappyHour.",Tag);
}else if(h >= get_pcvar_num(interval_2)){
g_on = false;
ChatColor(0,"!g%s!yS-a terminat !teamHappyHour.",Tag);
}
}
public killed(victim, attacker, shouldgib)
{
if(!is_user_alive(attacker) || get_user_flags(attacker) & ADMIN_LEVEL_H)
return PLUGIN_HANDLED;
if(g_on)
{
cs_set_user_money(attacker, cs_get_user_money(attacker) + 5500);
set_user_health(attacker, get_user_health(attacker) + 45);
set_user_armor(attacker, get_user_armor(attacker) + 45);
}
return PLUGIN_CONTINUE;
}
stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!team", "^3")
if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
sau asa
Spoiler:
#include<amxmodx>
#include<hamsandwich>
#include<fun>
#include<cstrike>
#pragma tabsize 0
new interval_1,interval_2;
new const Tag[] = "[Server.Freakz.ro]";
public plugin_init()
{
register_plugin("Vip la ore fixe","1.0","D3luxe");
RegisterHam(Ham_Killed,"player", "killed");
interval_1 = register_cvar("amx_firsthour","21");
interval_2 = register_cvar("amx_lasthour","22");
}
public killed(victim, attacker, shouldgib)
{
if(!is_user_alive(attacker) || get_user_flags(attacker) & ADMIN_LEVEL_H)
return PLUGIN_HANDLED;
new h, m, s;
time(h, m, s);
if(h >= get_pcvar_num(interval_1) && h < get_pcvar_num(interval_2))
{
cs_set_user_money(attacker, cs_get_user_money(attacker) + 5500);
set_user_health(attacker, get_user_health(attacker) + 45);
set_user_armor(attacker, get_user_armor(attacker) + 45);
ChatColor(attacker,"!g%s!yAi primit !teambonus pe kill de la !gHappyHour.",Tag);
}
return PLUGIN_CONTINUE;
}
stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!team", "^3")
if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
@Aleex Armanu
Retired from Amxmodx
0
0
Back to top
Aleex Armanu
[Detinator Server]
Status: Offline
(since 16-05-2022 10:06)
Joined: 25 Feb 2015
Posts: 2285
,
Topics: 267
Location:
Cluj Napoca
Reputation:
844.2
Votes
: 96
Posted: 19-06-2015, 20:50:30
| Translate post to:
... (
Click for more languages
)
Acest plugin functioneaza dar exista o problema:
Spoiler:
#include<amxmodx>
#include<hamsandwich>
#include<fun>
#include<cstrike>
#pragma tabsize 0
new interval_1,interval_2;
new const Tag[] = "[fr.freakz.ro]";
new g_on;
public plugin_init()
{
register_plugin("Vip la ore fixe","1.0","D3luxe");
RegisterHam(Ham_Killed,"player", "killed");
interval_1 = register_cvar("amx_firsthour","21");
interval_2 = register_cvar("amx_lasthour","22");
}
public client_putinserver(id)
{
verifica(id);
}
public verifica(id)
{
new h, m, s;
time(h, m, s);
if(h >= get_pcvar_num(interval_1) && h < get_pcvar_num(interval_2))
{
g_on = true;
ChatColor(0,"!g%s!yA inceput !teamHappyHour.",Tag);
}else if(h >= get_pcvar_num(interval_2)){
g_on = false;
ChatColor(0,"!g%s!yS-a terminat !teamHappyHour.",Tag);
}
}
public killed(victim, attacker, shouldgib)
{
if(!is_user_alive(attacker) || get_user_flags(attacker) & ADMIN_LEVEL_H)
return PLUGIN_HANDLED;
if(g_on)
{
cs_set_user_money(attacker, cs_get_user_money(attacker) + 5500);
set_user_health(attacker, get_user_health(attacker) + 45);
set_user_armor(attacker, get_user_armor(attacker) + 45);
}
return PLUGIN_CONTINUE;
}
stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!team", "^3")
if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
Apare in chat de prea multe ori Eventul Happy Hour a inceput, pe minut apare de 10 ori, se face spam.
Poti sa faci sa apara de 2 ori la 5 minute?
ZOMBIE.FREAKZ.RO
#
INTERNATIONAL ZM
0
0
Back to top
destroi112
[DEV]
Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042
,
Topics: 119
Location:
---------
Reputation:
515.9
Votes
: 118
Posted: 21-06-2015, 12:26:21
| Translate post to:
... (
Click for more languages
)
Incearca ar trebui acum sa apara doar in primul minut..
Spoiler:
#include<amxmodx>
#include<hamsandwich>
#include<fun>
#include<cstrike>
#pragma tabsize 0
new interval_1,interval_2;
new const Tag[] = "[fr.freakz.ro]";
new g_on;
public plugin_init()
{
register_plugin("Vip la ore fixe","1.0","D3luxe");
RegisterHam(Ham_Killed,"player", "killed");
interval_1 = register_cvar("amx_firsthour","21");
interval_2 = register_cvar("amx_lasthour","22");
}
public client_putinserver(id)
{
verifica(id);
}
public verifica(id)
{
new h, m, s;
time(h, m, s);
if(h >= get_pcvar_num(interval_1) && h < get_pcvar_num(interval_2))
{
g_on = true;
if(h == get_pcvar_num(interval_1 && m == 1)
ChatColor(0,"!g%s!yA inceput !teamHappyHour.",Tag);
}else if(h >= get_pcvar_num(interval_2) && m == 0){
g_on = false;
ChatColor(0,"!g%s!yS-a terminat !teamHappyHour.",Tag);
}
}
public killed(victim, attacker, shouldgib)
{
if(!is_user_alive(attacker) || get_user_flags(attacker) & ADMIN_LEVEL_H)
return PLUGIN_HANDLED;
if(g_on)
{
cs_set_user_money(attacker, cs_get_user_money(attacker) + 5500);
set_user_health(attacker, get_user_health(attacker) + 45);
set_user_armor(attacker, get_user_armor(attacker) + 45);
}
return PLUGIN_CONTINUE;
}
stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!team", "^3")
if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
Retired from Amxmodx
0
0
Back to top
Aleex Armanu
[Detinator Server]
Status: Offline
(since 16-05-2022 10:06)
Joined: 25 Feb 2015
Posts: 2285
,
Topics: 267
Location:
Cluj Napoca
Reputation:
844.2
Votes
: 96
Posted: 21-06-2015, 13:01:36
| Translate post to:
... (
Click for more languages
)
1. Am uitat sa precizez aparea si cand se termina... din 5 in 5 minute pana a doua zi.
2. Ai pus pluginul dar da eroare la compilare.
@D3luxe
ZOMBIE.FREAKZ.RO
#
INTERNATIONAL ZM
0
0
Back to top
destroi112
[DEV]
Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042
,
Topics: 119
Location:
---------
Reputation:
515.9
Votes
: 118
Posted: 21-06-2015, 19:47:13
| Translate post to:
... (
Click for more languages
)
Lipsea o paranteza ...
Spoiler:
#include<amxmodx>
#include<hamsandwich>
#include<fun>
#include<cstrike>
#pragma tabsize 0
new interval_1,interval_2;
new const Tag[] = "[fr.freakz.ro]";
new g_on;
public plugin_init()
{
register_plugin("Vip la ore fixe","1.0","D3luxe");
RegisterHam(Ham_Killed,"player", "killed");
interval_1 = register_cvar("amx_firsthour","21");
interval_2 = register_cvar("amx_lasthour","22");
}
public client_putinserver(id)
{
verifica(id);
}
public verifica(id)
{
new h, m, s;
time(h, m, s);
if(h >= get_pcvar_num(interval_1) && h < get_pcvar_num(interval_2))
{
g_on = true;
if(h == get_pcvar_num(interval_1) && m == 1)
ChatColor(0,"!g%s!yA inceput !teamHappyHour.",Tag);
}else if(h == get_pcvar_num(interval_2) && m == 0){
g_on = false;
ChatColor(0,"!g%s!yS-a terminat !teamHappyHour.",Tag);
}
}
public killed(victim, attacker, shouldgib)
{
if(!is_user_alive(attacker) || get_user_flags(attacker) & ADMIN_LEVEL_H)
return PLUGIN_HANDLED;
if(g_on)
{
cs_set_user_money(attacker, cs_get_user_money(attacker) + 5500);
set_user_health(attacker, get_user_health(attacker) + 45);
set_user_armor(attacker, get_user_armor(attacker) + 45);
}
return PLUGIN_CONTINUE;
}
stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!team", "^3")
if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
@Aleex Armanu
Retired from Amxmodx
0
0
Back to top
Aleex Armanu
[Detinator Server]
Status: Offline
(since 16-05-2022 10:06)
Joined: 25 Feb 2015
Posts: 2285
,
Topics: 267
Location:
Cluj Napoca
Reputation:
844.2
Votes
: 96
Posted: 22-06-2015, 15:32:14
| Translate post to:
... (
Click for more languages
)
Functioneaza perfect multumesc.
ZOMBIE.FREAKZ.RO
#
INTERNATIONAL ZM
0
0
Back to top
TwisTer
[GOOGLE SEARCHER]
Status: Offline
(online 3 weeks ago)
Joined: 04 May 2007
Posts: 6962
,
Topics: 147
Location:
Romania
Reputation:
2774.4
Votes
: 232
Posted: 22-06-2015, 17:12:52
| Translate post to:
... (
Click for more languages
)
Aleex Armanu wrote:
Functioneaza perfect multumesc.
Great work guys.
0
0
Back to top
Topic locked
Topic is closed, you cannot post any messages in it anymore
Locked by
TwisTer
, 22 June 2015 15:13
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Counter-Strike: Help zone
Go to page
Previous
1
,
2
,
3
The time now is 24-06-2025, 18:09:59
Copyright info
Based on phpBB
ro
/
com
B
Login
I forgot my password
World of Warcraft
Login for more...
Download WoW 7.3.5
Misc
eSports
Achievements
Buy reputation with votes
Reputation trades
Forum rules
Ban list
Members list
User guide (FAQ)
World of Warcraft
View details