Existing user? Sign in
Sign up
Games
Servers
Useful
User
Pass
2FA
Modificare Plugin
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
Author
Message
336
Smokey.
[Mentally Stable]
Status: Offline
(since 08-01-2016 17:02)
Joined: 21 Dec 2015
Posts: 21
,
Topics: 9
Location:
Romania
Reputation:
0.7
Posted: 08-01-2016, 16:48:26
| Translate post to:
... (
Click for more languages
)
Salut, am si eu pluginul lastround ! As dori la el sa ramana in permanenta in ultima runda sa scrie Aceasta este ultima runda pana se termina runda si dupa cand scrie iti multumim ca ai jucat pe server, Acum incercam si zm_foda ( ex ) si sa faca si acel sunet , adica acel sound task_completed.wav ! Multumesc mai jos e sma
Spoiler:
/*
*
* bAnTAi - Last Round
* (c) 2004-2005
*
*/
#include <amxmodx>
#pragma semicolon 1 // force ; usage, just 'cause
new g_scTitle[] = "Last Round";
new g_scVersion[] = "1.0";
new g_scAuthor[] = "bAnTAi";
new bool:g_lastround = false;
new bool:g_changemap = false;
new Float:g_timelimit = 0.0;
new Float:g_maxspeed;
#define INITIATE_LAST_ROUND_TASK 545454
#define CHANGE_MAP_TASK 545455
#define DISABLE_PLAYERS_TASK 545456
public evRoundStart() {
if (!get_cvar_num("lastround")) return PLUGIN_CONTINUE;
// Wanted this in init but never got a value
if (g_timelimit == 0.0)
g_timelimit = get_cvar_float("mp_timelimit");
if (g_lastround) {
new Float:roundtime = get_cvar_float("mp_roundtime");
new Float:c4timer = get_cvar_float("mp_c4timer")/60;
// Extend the maps time one round + c4timer + some buffer
set_cvar_float("mp_timelimit", g_timelimit + roundtime + c4timer + 0.5);
new text[256];
format(text, 255, "Aceasta este ultima runda");
doTypesay(text, 5, 210, 0, 0);
g_changemap = true;
g_lastround = false;
} else if (g_changemap) {
new nextmap[32];
get_cvar_string("amx_nextmap", nextmap, 31);
new text[256];
format(text, 255, "Multumim ca a`ti ales serveru nostru. Acum incercam si %s!", nextmap);
doTypesay(text, 5, 210, 0, 0);
g_maxspeed = get_cvar_float("sv_maxspeed");
set_cvar_float("sv_maxspeed", 0.0);
set_task(0.1, "disablePlayers", DISABLE_PLAYERS_TASK, "", 0, "a", 3);
set_task(6.0, "changeMap", CHANGE_MAP_TASK);
}
return PLUGIN_CONTINUE;
}
public initiateLastRound() {
if (!get_cvar_num("lastround")) return PLUGIN_CONTINUE;
remove_task(INITIATE_LAST_ROUND_TASK);
new text[256];
format(text, 255, "Ultima Runda se apropie");
doTypesay(text, 5, 210, 0, 0);
new Float:roundtime = get_cvar_float("mp_roundtime");
new Float:c4timer = get_cvar_float("mp_c4timer")/60;
// (2* roundtime since it is possible that the even occurs at the beginning of a round)
set_cvar_float("mp_timelimit", g_timelimit + (2.0*roundtime) + (2.0*c4timer));
g_lastround = true;
return PLUGIN_CONTINUE;
}
public disablePlayers() {
new players[32], num;
get_players(players, num, "c");
for(new i=0;i<num; i++) {
client_cmd(players[i],"drop");
}
}
public changeMap() {
remove_task(CHANGE_MAP_TASK);
new nextmap[32];
get_cvar_string("amx_nextmap", nextmap, 31);
server_cmd("changelevel %s", nextmap);
}
doTypesay(string[], duration, r, g, b) {
set_hudmessage(r, g, b, 0.05, 0.45, 0, 6.0, float(duration) , 0.5, 0.15, 4);
show_hudmessage(0, string);
}
public plugin_init() {
register_plugin(g_scTitle, g_scVersion, g_scAuthor);
register_cvar("lastround", "1");
register_logevent("evRoundStart", 2, "0=World triggered", "1=Round_Start");
// Chose 90 seconds not to clash with other events
set_task(90.0, "initiateLastRound", INITIATE_LAST_ROUND_TASK, "", 0, "d");
return PLUGIN_CONTINUE;
}
public plugin_end() {
set_cvar_float("mp_timelimit", g_timelimit);
set_cvar_float("sv_maxspeed", g_maxspeed);
remove_task(DISABLE_PLAYERS_TASK);
return PLUGIN_CONTINUE;
}
0
0
Back to top
Topic locked
Topic is closed, you cannot post any messages in it anymore
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
The time now is 03-08-2025, 06:59:05
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