Existing user? Sign in
Sign up
Games
Servers
Useful
User
Pass
2FA
[Plugin]PayDay&Event
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Resources
Author
Message
742
anoniM.xD
[Banned user]
Status: Offline
(since 15-03-2015 21:43)
Joined: 04 Feb 2015
Posts: 92
,
Topics: 19
Location:
Pitesti
Reputation:
-103.8
Votes
: 21
Posted: 04-02-2015, 21:59:00
| Translate post to:
... (
Click for more languages
)
Descriere*: Este un plugin de payday si event
Descarcare*:
Spoiler:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>
#include <engine>
#include <cstrike>
#include <fun>
#pragma tabsize 0
#define PLUGIN "Event"
#define VERSION "1.0"
#define AUTHOR "anoniM"
#define Taskid_ShowHud 6560326
new const PREFIX[] = {"!g[ Event ]!n"};
new credite[33]
new const g_iMinNumber = 1111111111; // Minimum number that will be generated.
new const g_iMaxNumber = 9999999999; // Maximum number that will be generated.
new g_iNumber
new g_bHud
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_forward(FM_EmitSound, "fw_EmitSound")
register_clcmd("say", "CmdSay")
set_task(300.0, "CmdFirstWrites",_,_,_, "b");
set_task(1.0, "check_time", _, _, _, "b")
g_bHud = CreateHudSyncObj()
register_concmd("admin_event", "CmdFirstWrites", ADMIN_IMMUNITY)
}
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, "!n", "^1")
replace_all(msg, 190, "!t", "^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();
}
}
}
}
public check_time()
{
new h, m, s;
time(h, m, s)
if(h == 00 && m == 00 && s == 00)
{
ChatColor(0, "%s Este ora !t00:00!n, toti jucatorii au primit creditele (Event) !", PREFIX)
emit_sound(0, CHAN_AUTO, "event/payday.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "EventCredite")
}
else if(h == 01 && m == 00 && s == 00)
{
ChatColor(0, "%s Este ora !t01:00!n, toti jucatorii au primit creditele (Event) !", PREFIX)
emit_sound(0, CHAN_AUTO, "event/payday.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "EventCredite")
}
else if(h == 02 && m == 00 && s == 00)
{
ChatColor(0, "%s Este ora !t02:00!n, toti jucatorii au primit creditele (Event) !", PREFIX)
emit_sound(0, CHAN_AUTO, "event/payday.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "EventCredite")
}
else if(h == 03 && m == 00 && s == 00)
{
ChatColor(0, "%s Este ora !t03:00!n, toti jucatorii au primit creditele (Event) !", PREFIX)
emit_sound(0, CHAN_AUTO, "event/payday.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "EventCredite")
}
else if(h == 04 && m == 00 && s == 00)
{
ChatColor(0, "%s Este ora !t04:00!n, toti jucatorii au primit creditele (Event) !", PREFIX)
emit_sound(0, CHAN_AUTO, "event/payday.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "EventCredite")
}
else if(h == 05 && m == 00 && s == 00)
{
ChatColor(0, "%s Este ora !t05:00!n, toti jucatorii au primit creditele (Event) !", PREFIX)
emit_sound(0, CHAN_AUTO, "event/payday.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "EventCredite")
}
else if(h == 06 && m == 00 && s == 00)
{
ChatColor(0, "%s Este ora !t06:00!n, toti jucatorii au primit creditele (Event) !", PREFIX)
emit_sound(0, CHAN_AUTO, "event/payday.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "EventCredite")
}
else if(h == 07 && m == 00 && s == 00)
{
ChatColor(0, "%s Este ora !t07:00!n, toti jucatorii au primit creditele (Event) !", PREFIX)
emit_sound(0, CHAN_AUTO, "event/payday.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "EventCredite")
}
else if(h == 08 && m == 00 && s == 00)
{
ChatColor(0, "%s Este ora !t08:00!n, toti jucatorii au primit creditele (Event) !", PREFIX)
emit_sound(0, CHAN_AUTO, "event/payday.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "EventCredite")
}
else if(h == 09 && m == 00 && s == 00)
{
ChatColor(0, "%s Este ora !t09:00!n, toti jucatorii au primit creditele (Event) !", PREFIX)
emit_sound(0, CHAN_AUTO, "event/payday.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "EventCredite")
}
else if(h == 10 && m == 00 && s == 00)
{
ChatColor(0, "%s Este ora !t10:00!n, toti jucatorii au primit creditele (Event) !", PREFIX)
emit_sound(0, CHAN_AUTO, "event/payday.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "EventCredite")
}
else if(h == 11 && m == 00 && s == 00)
{
ChatColor(0, "%s Este ora !t11:00!n, toti jucatorii au primit creditele (Event) !", PREFIX)
emit_sound(0, CHAN_AUTO, "event/payday.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "EventCredite")
}
else if(h == 12 && m == 00 && s == 00)
{
ChatColor(0, "%s Este ora !t12:00!n, toti jucatorii au primit creditele (Event) !", PREFIX)
emit_sound(0, CHAN_AUTO, "event/payday.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "EventCredite")
}
else if(h == 13 && m == 00 && s == 00)
{
ChatColor(0, "%s Este ora !t13:00!n, toti jucatorii au primit creditele (Event) !", PREFIX)
emit_sound(0, CHAN_AUTO, "event/payday.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "EventCredite")
}
else if(h == 14 && m == 00 && s == 00)
{
ChatColor(0, "%s Este ora !t14:00!n, toti jucatorii au primit creditele (Event) !", PREFIX)
emit_sound(0, CHAN_AUTO, "event/payday.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "EventCredite")
}
else if(h == 15 && m == 00 && s == 00)
{
ChatColor(0, "%s Este ora !t15:00!n, toti jucatorii au primit creditele (Event) !", PREFIX)
emit_sound(0, CHAN_AUTO, "event/payday.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "EventCredite")
}
else if(h == 16 && m == 00 && s == 00)
{
ChatColor(0, "%s Este ora !t16:00!n, toti jucatorii au primit creditele (Event) !", PREFIX)
emit_sound(0, CHAN_AUTO, "event/payday.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "EventCredite")
}
else if(h == 17 && m == 00 && s == 00)
{
ChatColor(0, "%s Este ora !t17:00!n, toti jucatorii au primit creditele (Event) !", PREFIX)
emit_sound(0, CHAN_AUTO, "event/payday.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "EventCredite")
}
else if(h == 18 && m == 00 && s == 00)
{
ChatColor(0, "%s Este ora !t18:00!n, toti jucatorii au primit creditele (Event) !", PREFIX)
emit_sound(0, CHAN_AUTO, "event/payday.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "EventCredite")
}
else if(h == 19 && m == 00 && s == 00)
{
ChatColor(0, "%s Este ora !t19:00!n, toti jucatorii au primit creditele (Event) !", PREFIX)
emit_sound(0, CHAN_AUTO, "event/payday.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "EventCredite")
}
else if(h == 20 && m == 00 && s == 00)
{
ChatColor(0, "%s Este ora !t20:00!n, toti jucatorii au primit creditele (Event) !", PREFIX)
emit_sound(0, CHAN_AUTO, "event/payday.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "EventCredite")
}
else if(h == 21 && m == 00 && s == 00)
{
ChatColor(0, "%s Este ora !t21:00!n, toti jucatorii au primit creditele (Event) !", PREFIX)
emit_sound(0, CHAN_AUTO, "event/payday.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "EventCredite")
}
else if(h == 22 && m == 00 && s == 00)
{
ChatColor(0, "%s Este ora !t22:00!n, toti jucatorii au primit creditele (Event) !", PREFIX)
emit_sound(0, CHAN_AUTO, "event/payday.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "EventCredite")
}
else if(h == 23 && m == 00 && s == 00)
{
ChatColor(0, "%s Este ora !t23:00!n, toti jucatorii au primit creditele (Event) !", PREFIX)
emit_sound(0, CHAN_AUTO, "event/payday.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.5, "EventCredite")
}
}
public EventCredite()
{
new iPlayers[32]
new iNum
new id
get_players( iPlayers, iNum )
for( new i = 0; i < iNum; i++ )
{
id = iPlayers[i]
credite[id] = credite[id]+10
}
}
public plugin_precache()
{
precache_sound("event/payday.wav")
}
public CmdFirstWrites(id)
{
if(!g_iNumber)
{
g_iNumber = random_num(g_iMinNumber, g_iMaxNumber)
set_task(1.0, "TaskShowNumber", Taskid_ShowHud, _, _, "b")
}
return PLUGIN_HANDLED
}
public CmdSay(id)
{
if(g_iNumber)
{
new szArg[32];
new szName[32];
get_user_name(id, szName, charsmax(szName));
read_args(szArg, charsmax(szArg));
remove_quotes(szArg);
if(str_to_num(szArg) == g_iNumber && cs_get_user_team(id) != CS_TEAM_CT)
{
remove_task(Taskid_ShowHud)
g_iNumber = 0
switch(random_num(1,5))
{
case 1:
{
ChatColor(0, "%s !t%s!n a castigat !t5!n credite!", PREFIX, szName);
credite[id] = credite[id]+5
}
case 2:
{
ChatColor(0, "%s !t%s!n a castigat !t3!n credite!", PREFIX, szName);
credite[id] = credite[id]+3
}
}
return PLUGIN_HANDLED
}
}
return PLUGIN_CONTINUE
}
public TaskShowNumber()
{
set_hudmessage(0, 255, 0, 0.1, 0.25, 0, 6.0, 1.0)
ShowSyncHudMsg(0, g_bHud, "Primul care scrie: %i^nCastiga un premiu!", g_iNumber)
}
Info*: 1.0 , anoniM. , Event&Payday.
[ Aici intra versiunea, autorul, numele intreg, nu mai incarcati tilul ]
Instalare*: compilati pluginul iar supa il bagati in plugins, iar dupa mergem in plugins.ini si scrieti numele pluginului.
Module:
Cvar:
Comenzi: admin_event
Poze:
Altele*: Va rog pastrati dreptul de autor. Pluginul este facut de mine in totalitate. Va puteti pune in loc de credite[id] ce aveti voi .. sau uniti cu pluginul dorit.
0
0
Back to top
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Resources
The time now is 28-02-2025, 01:09:06
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