Existing user? Sign in
Sign up
Games
Servers
Useful
User
Pass
2FA
plugin
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Resources
Author
Message
1201
rapper56
[Mentally Stable]
Status: Offline
(since 03-09-2013 08:18)
Joined: 22 Dec 2012
Posts: 21
,
Topics: 8
Location:
Romania
Reputation:
36.6
Votes
: 3
Posted: 23-07-2013, 15:25:50
| Translate post to:
... (
Click for more languages
)
As dori urmatorul plugin pentru un sv amx,19 sloturi,insa plugin-ul e destul de complicat,astept raspunsuri:
pe srv sa se poata tine un duel intre lame (CT/T) tastand in say "lame" si sa apara lista din care sa alegem jucatorul care dorim sa facem lame cu el.Ct-ul cat si Tero sa aiba godmode (doar ei sa se poata atinge/sa dea damage)
rog seriozitate
dau toata reputatia mea cui ma rezolva
0
0
Back to top
RoTTw3yLeR
[Mentally Stable]
Status: Offline
(since 31-10-2021 00:12)
Joined: 21 Jul 2012
Posts: 104
,
Topics: 4
Location:
Cluj
Reputation:
146.6
Votes
: 4
Posted: 23-07-2013, 17:32:42
| Translate post to:
... (
Click for more languages
)
Eu unul nu credca exista asa ceva , numai daca nu creeaza cineva .. Insa exista de alte feluri . Dar cred ca de acest fel nu exista .
Respecta si vei fi respectat!
0
0
Back to top
zbang !!
[Account disabled]
Status: Offline
(since 10-12-2015 12:33)
Joined: 20 Sep 2011
Posts: 1412
,
Topics: 251
Location:
precis
Reputation:
96.4
Votes
: 66
Posted: 23-07-2013, 18:32:14
| Translate post to:
... (
Click for more languages
)
Stiu ca nu e chiar ce vrei, dar nu exista asa ceva si nu sta nimeni sa-ti faca.
Iti ofer ceva de genu' , tradus in romana de mine.
Code:
#define PLUGINNAME "Automatic knife duel"
#define VERSION "0.3"
#define AUTHOR "JGHG"
/*
Copyleft 2005
Plugin topic: http://www.amxmodx.org/forums/viewtopic.php?p=91239
AUTOMATIC KNIFE DUEL
====================
Where I come from, if you cut the wall repeteadly with your knife it means you're challenging your last opponent to a knife duel. ;-)
I decided to automate this process.
If only you and another person on the opposite team remain in the round, you can hit a wall (or another object) with your knife, THREE TIMES in fast succession.
By this action you challenge your opponent to a knife duel. The person you challenge gets a menu where he can accept/decline your
challenge. The challenged person has 10 seconds to decide his mind, else the challenge is automatically declined, and the menu should be closed automatically.
Should a knife duel start, it works out pretty much like a round of Knife Arena: you can only use the knife (and the C4!).
As soon as the round ends the Knife Arena mode is turned off.
/JGHG
VERSIONS
========
050421 0.3 You must now slash with your knife three times in fast succession to challenge someone.
050208 0.2 Fixed seconds display.
Bots should now respond correctly and a little human like. They will mostly accept challenges. ;-)
Small fixes here and there. :-)
050208 0.1 First version - largely untested
*/
#include <amxmodx>
#include <fakemeta>
#include <fun>
#define DEBUG
#if defined DEBUG
#include <amxmisc>
#endif // defined DEBUG
#define MENUSELECT1 0
#define MENUSELECT2 1
#define TASKID_CHALLENGING 2348923
#define TASKID_BOTTHINK 3242321
#define DECIDESECONDS 10
#define ALLOWED_WEAPONS 2
#define KNIFESLASHES 3 // the nr of slashes within a short amount of time until a challenge starts...
// Globals below
new g_allowedWeapons[ALLOWED_WEAPONS] = {CSW_KNIFE, CSW_C4}
new g_MAXPLAYERS
new bool:g_challenging = false
new bool:g_knifeArena = false
new bool:g_noChallengingForAWhile = false
new g_challengemenu
new g_challenger
new g_challenged
new g_challenges[33]
// Globals above
public plugin_modules()
{
require_module("fakemeta")
require_module("fun")
}
public forward_emitsound(const PIRATE, const Onceuponatimetherewasaverysmall, noise[], const Float:turtlewhoateabiggerturtleand, const Float:afterthatthesmallturtlegot, const veryveryverybig, const theend) {
if (g_noChallengingForAWhile || g_knifeArena || g_challenging || PIRATE < 1 || PIRATE > g_MAXPLAYERS || !is_user_alive(PIRATE) || !equal(noise, "weapons/knife_hitwall1.wav"))
return FMRES_IGNORED
new team = get_user_team(PIRATE), otherteam = 0, matchingOpponent = 0
// Make sure exactly one person on each team is alive.
for (new i = 1; i <= g_MAXPLAYERS; i++) {
if (!is_user_connected(i) || !is_user_alive(i) || PIRATE == i)
continue
if (get_user_team(i) == team) {
// No fun.
return FMRES_IGNORED
}
else {
if (++otherteam > 1) {
// No fun.
return FMRES_IGNORED
}
matchingOpponent = i
}
}
if (matchingOpponent == 0)
return FMRES_IGNORED
if (++g_challenges[PIRATE] >= KNIFESLASHES) {
Challenge(PIRATE, matchingOpponent)
if (is_user_bot(matchingOpponent)) {
new Float:val = float(DECIDESECONDS)
if (val < 2.0)
val = 2.0
remove_task(TASKID_BOTTHINK)
set_task(random_float(1.0, float(DECIDESECONDS) - 1.0), "BotDecides", TASKID_BOTTHINK)
}
g_challenges[PIRATE] = 0
}
else
set_task(1.0, "decreaseChallenges", PIRATE)
//client_print(PIRATE, print_chat, "Your challenges: %d", g_challenges[PIRATE])
return FMRES_IGNORED
}
public decreaseChallenges(id) {
if (--g_challenges[id] < 0)
g_challenges[id] = 0
}
public BotDecides() {
if (!g_challenging)
return
if (random_num(0,9) > 0)
Accept()
else {
DeclineMsg()
}
g_challenging = false
remove_task(TASKID_CHALLENGING)
}
Challenge(challenger, challenged) {
g_challenger = challenger
g_challenged = challenged
g_challenging = true
new challenger_name[32], challenged_name[32]
get_user_name(challenger, challenger_name, 31)
get_user_name(challenged, challenged_name, 31)
client_print(challenger, print_chat, "L-ai provocat pe %s la un duel de cutite ! Asteapta raspunsul lui in %d secunde...", challenged_name, DECIDESECONDS)
new menu[1024], keys = MENU_KEY_1 | MENU_KEY_2
format(menu, 1023, "Esti provocat de %s la un duel de cutite!^n^nAccepti sau esti las? Ai %d secunde sa raspunzi!^n^ny1w. Incepem!^ny2w. Sunt las!", challenger_name, DECIDESECONDS)
show_menu(challenged, keys, menu, DECIDESECONDS, "JGHG's automatic knife duel")
set_task(float(DECIDESECONDS), "timed_toolate", TASKID_CHALLENGING)
}
public timed_toolate() {
if (g_challenging) {
new challenger_name[32], challenged_name[32]
get_user_name(g_challenger, challenger_name, 31)
get_user_name(g_challenged, challenged_name, 31)
client_print(0, print_chat, "%s nu a raspuns lui %s la provocarea de duel !...", challenged_name, challenger_name)
CancelAll()
}
}
public client_putinserver(id) {
set_task(25.0, "Announcement", id)
return PLUGIN_CONTINUE
}
public Announcement(id) {
client_print(id, print_chat, "Cand mai e doar un jucator din echipa adversa ramas, il poti provoca la un duel de cutite.")
}
public challenged_menu(id, key) {
switch (key) {
case MENUSELECT1: {
// Accept
Accept()
}
case MENUSELECT2: {
// Decline
DeclineMsg()
}
}
g_challenging = false
remove_task(TASKID_CHALLENGING)
return PLUGIN_HANDLED
}
DeclineMsg() {
new challenger_name[32], challenged_name[32]
get_user_name(g_challenger, challenger_name, 31)
get_user_name(g_challenged, challenged_name, 31)
client_print(0, print_chat, "%s A refuzat provocarea lui %s ...", challenged_name, challenger_name)
}
Accept() {
new challenger_name[32], challenged_name[32]
get_user_name(g_challenger, challenger_name, 31)
get_user_name(g_challenged, challenged_name, 31)
client_print(0, print_chat, "%s a acceptat provocarea la duel a lui %s ", challenged_name, challenger_name)
g_knifeArena = true
give_item(g_challenger, "weapon_knife")
give_item(g_challenged, "weapon_knife")
engclient_cmd(g_challenger, "weapon_knife")
engclient_cmd(g_challenged, "weapon_knife")
}
public event_holdwpn(id) {
if (!g_knifeArena || !is_user_alive(id))
return PLUGIN_CONTINUE
new weaponType = read_data(2)
for (new i = 0; i < ALLOWED_WEAPONS; i++) {
if (weaponType == g_allowedWeapons[i])
return PLUGIN_CONTINUE
}
engclient_cmd(id, "weapon_knife")
return PLUGIN_CONTINUE
}
public event_roundend() {
if (g_challenging || g_knifeArena)
CancelAll()
g_noChallengingForAWhile = true
set_task(4.0, "NoChallengingForAWhileToFalse")
return PLUGIN_CONTINUE
}
public NoChallengingForAWhileToFalse() {
g_noChallengingForAWhile = false
}
CancelAll() {
if (g_challenging) {
g_challenging = false
// Close menu of challenged
if (is_user_connected(g_challenged)) {
new usermenu, userkeys
get_user_menu(g_challenged, usermenu, userkeys) // get user menu
// Hmm this ain't working :-/
if (usermenu == g_challengemenu) // Close it!
show_menu(g_challenged, 0, "blabla") // show empty menu
}
}
if (g_knifeArena) {
g_knifeArena = false
}
remove_task(TASKID_BOTTHINK)
remove_task(TASKID_CHALLENGING)
}
public event_death() {
if (g_challenging || g_knifeArena)
CancelAll()
return PLUGIN_CONTINUE
}
#if defined DEBUG
public challengefn(id, level, cid) {
if (!cmd_access(id, level, cid, 3))
return PLUGIN_HANDLED
new challenger[64], challenged[64]
read_argv(1, challenger, 63)
read_argv(2, challenged, 63)
console_print(id, "challenger: %s, challenged: %s", challenger, challenged)
new r = str_to_num(challenger)
new d = str_to_num(challenged)
Challenge(r, d)
if (is_user_bot(d))
Accept()
return PLUGIN_HANDLED
}
#endif // defined DEBUG
public plugin_init() {
register_plugin(PLUGINNAME, VERSION, AUTHOR)
register_event("CurWeapon", "event_holdwpn", "be", "1=1")
register_forward(FM_EmitSound, "forward_emitsound")
g_MAXPLAYERS = get_maxplayers()
g_challengemenu = register_menuid("Meniul de duel a lui JGHG . Tradus de zBANG !! a.k.a Octaw0w"/*"Esti provocat la duel!"*/)
register_menucmd(g_challengemenu, MENU_KEY_1 | MENU_KEY_2, "challenged_menu")
register_event("DeathMsg", "event_death", "a")
register_event("SendAudio", "event_roundend", "a", "2&%!MRAD_terwin")
register_event("SendAudio", "event_roundend", "a", "2&%!MRAD_ctwin")
register_event("SendAudio", "event_roundend", "a", "2&%!MRAD_rounddraw")
#if defined DEBUG
register_clcmd("0challenge", "challengefn", ADMIN_RESERVATION, "<challenger> <challenged> - start knife duel challenge")
#endif // defined DEBUG
new Float:maptime = get_cvar_float("mp_timelimit")
if (maptime == 0.0)
maptime = 15.0
new Float:anntime = 60.0 * 5.0 // 5 minutes
if (maptime < 5.0)
anntime = maptime / 3.0
set_task(anntime, "Announcement", 0, "", 0, "b")
}
Link download:
http://www.girlshare.ro/32701622.8
(.amxx , compilat) .
Acest plugin face ca atunci cand mai sunt 2 playeri ramasi (1t vs 1ct) unul din ei sa dea cu lama in perete de 3 ori, astfel se vor provoca la un duel de lame. Celalalt accepta apasand tasta "1" si refuza apasand tasa "2" .
E ok?
0
0
Back to top
rapper56
[Mentally Stable]
Status: Offline
(since 03-09-2013 08:18)
Joined: 22 Dec 2012
Posts: 21
,
Topics: 8
Location:
Romania
Reputation:
36.6
Votes
: 3
Posted: 26-07-2013, 14:14:01
| Translate post to:
... (
Click for more languages
)
zbang !! wrote:
Stiu ca nu e chiar ce vrei, dar nu exista asa ceva si nu sta nimeni sa-ti faca.
Iti ofer ceva de genu' , tradus in romana de mine.
Code:
#define PLUGINNAME "Automatic knife duel"
#define VERSION "0.3"
#define AUTHOR "JGHG"
/*
Copyleft 2005
Plugin topic: http://www.amxmodx.org/forums/viewtopic.php?p=91239
AUTOMATIC KNIFE DUEL
====================
Where I come from, if you cut the wall repeteadly with your knife it means you're challenging your last opponent to a knife duel. ;-)
I decided to automate this process.
If only you and another person on the opposite team remain in the round, you can hit a wall (or another object) with your knife, THREE TIMES in fast succession.
By this action you challenge your opponent to a knife duel. The person you challenge gets a menu where he can accept/decline your
challenge. The challenged person has 10 seconds to decide his mind, else the challenge is automatically declined, and the menu should be closed automatically.
Should a knife duel start, it works out pretty much like a round of Knife Arena: you can only use the knife (and the C4!).
As soon as the round ends the Knife Arena mode is turned off.
/JGHG
VERSIONS
========
050421 0.3 You must now slash with your knife three times in fast succession to challenge someone.
050208 0.2 Fixed seconds display.
Bots should now respond correctly and a little human like. They will mostly accept challenges. ;-)
Small fixes here and there. :-)
050208 0.1 First version - largely untested
*/
#include <amxmodx>
#include <fakemeta>
#include <fun>
#define DEBUG
#if defined DEBUG
#include <amxmisc>
#endif // defined DEBUG
#define MENUSELECT1 0
#define MENUSELECT2 1
#define TASKID_CHALLENGING 2348923
#define TASKID_BOTTHINK 3242321
#define DECIDESECONDS 10
#define ALLOWED_WEAPONS 2
#define KNIFESLASHES 3 // the nr of slashes within a short amount of time until a challenge starts...
// Globals below
new g_allowedWeapons[ALLOWED_WEAPONS] = {CSW_KNIFE, CSW_C4}
new g_MAXPLAYERS
new bool:g_challenging = false
new bool:g_knifeArena = false
new bool:g_noChallengingForAWhile = false
new g_challengemenu
new g_challenger
new g_challenged
new g_challenges[33]
// Globals above
public plugin_modules()
{
require_module("fakemeta")
require_module("fun")
}
public forward_emitsound(const PIRATE, const Onceuponatimetherewasaverysmall, noise[], const Float:turtlewhoateabiggerturtleand, const Float:afterthatthesmallturtlegot, const veryveryverybig, const theend) {
if (g_noChallengingForAWhile || g_knifeArena || g_challenging || PIRATE < 1 || PIRATE > g_MAXPLAYERS || !is_user_alive(PIRATE) || !equal(noise, "weapons/knife_hitwall1.wav"))
return FMRES_IGNORED
new team = get_user_team(PIRATE), otherteam = 0, matchingOpponent = 0
// Make sure exactly one person on each team is alive.
for (new i = 1; i <= g_MAXPLAYERS; i++) {
if (!is_user_connected(i) || !is_user_alive(i) || PIRATE == i)
continue
if (get_user_team(i) == team) {
// No fun.
return FMRES_IGNORED
}
else {
if (++otherteam > 1) {
// No fun.
return FMRES_IGNORED
}
matchingOpponent = i
}
}
if (matchingOpponent == 0)
return FMRES_IGNORED
if (++g_challenges[PIRATE] >= KNIFESLASHES) {
Challenge(PIRATE, matchingOpponent)
if (is_user_bot(matchingOpponent)) {
new Float:val = float(DECIDESECONDS)
if (val < 2.0)
val = 2.0
remove_task(TASKID_BOTTHINK)
set_task(random_float(1.0, float(DECIDESECONDS) - 1.0), "BotDecides", TASKID_BOTTHINK)
}
g_challenges[PIRATE] = 0
}
else
set_task(1.0, "decreaseChallenges", PIRATE)
//client_print(PIRATE, print_chat, "Your challenges: %d", g_challenges[PIRATE])
return FMRES_IGNORED
}
public decreaseChallenges(id) {
if (--g_challenges[id] < 0)
g_challenges[id] = 0
}
public BotDecides() {
if (!g_challenging)
return
if (random_num(0,9) > 0)
Accept()
else {
DeclineMsg()
}
g_challenging = false
remove_task(TASKID_CHALLENGING)
}
Challenge(challenger, challenged) {
g_challenger = challenger
g_challenged = challenged
g_challenging = true
new challenger_name[32], challenged_name[32]
get_user_name(challenger, challenger_name, 31)
get_user_name(challenged, challenged_name, 31)
client_print(challenger, print_chat, "L-ai provocat pe %s la un duel de cutite ! Asteapta raspunsul lui in %d secunde...", challenged_name, DECIDESECONDS)
new menu[1024], keys = MENU_KEY_1 | MENU_KEY_2
format(menu, 1023, "Esti provocat de %s la un duel de cutite!^n^nAccepti sau esti las? Ai %d secunde sa raspunzi!^n^ny1w. Incepem!^ny2w. Sunt las!", challenger_name, DECIDESECONDS)
show_menu(challenged, keys, menu, DECIDESECONDS, "JGHG's automatic knife duel")
set_task(float(DECIDESECONDS), "timed_toolate", TASKID_CHALLENGING)
}
public timed_toolate() {
if (g_challenging) {
new challenger_name[32], challenged_name[32]
get_user_name(g_challenger, challenger_name, 31)
get_user_name(g_challenged, challenged_name, 31)
client_print(0, print_chat, "%s nu a raspuns lui %s la provocarea de duel !...", challenged_name, challenger_name)
CancelAll()
}
}
public client_putinserver(id) {
set_task(25.0, "Announcement", id)
return PLUGIN_CONTINUE
}
public Announcement(id) {
client_print(id, print_chat, "Cand mai e doar un jucator din echipa adversa ramas, il poti provoca la un duel de cutite.")
}
public challenged_menu(id, key) {
switch (key) {
case MENUSELECT1: {
// Accept
Accept()
}
case MENUSELECT2: {
// Decline
DeclineMsg()
}
}
g_challenging = false
remove_task(TASKID_CHALLENGING)
return PLUGIN_HANDLED
}
DeclineMsg() {
new challenger_name[32], challenged_name[32]
get_user_name(g_challenger, challenger_name, 31)
get_user_name(g_challenged, challenged_name, 31)
client_print(0, print_chat, "%s A refuzat provocarea lui %s ...", challenged_name, challenger_name)
}
Accept() {
new challenger_name[32], challenged_name[32]
get_user_name(g_challenger, challenger_name, 31)
get_user_name(g_challenged, challenged_name, 31)
client_print(0, print_chat, "%s a acceptat provocarea la duel a lui %s ", challenged_name, challenger_name)
g_knifeArena = true
give_item(g_challenger, "weapon_knife")
give_item(g_challenged, "weapon_knife")
engclient_cmd(g_challenger, "weapon_knife")
engclient_cmd(g_challenged, "weapon_knife")
}
public event_holdwpn(id) {
if (!g_knifeArena || !is_user_alive(id))
return PLUGIN_CONTINUE
new weaponType = read_data(2)
for (new i = 0; i < ALLOWED_WEAPONS; i++) {
if (weaponType == g_allowedWeapons[i])
return PLUGIN_CONTINUE
}
engclient_cmd(id, "weapon_knife")
return PLUGIN_CONTINUE
}
public event_roundend() {
if (g_challenging || g_knifeArena)
CancelAll()
g_noChallengingForAWhile = true
set_task(4.0, "NoChallengingForAWhileToFalse")
return PLUGIN_CONTINUE
}
public NoChallengingForAWhileToFalse() {
g_noChallengingForAWhile = false
}
CancelAll() {
if (g_challenging) {
g_challenging = false
// Close menu of challenged
if (is_user_connected(g_challenged)) {
new usermenu, userkeys
get_user_menu(g_challenged, usermenu, userkeys) // get user menu
// Hmm this ain't working :-/
if (usermenu == g_challengemenu) // Close it!
show_menu(g_challenged, 0, "blabla") // show empty menu
}
}
if (g_knifeArena) {
g_knifeArena = false
}
remove_task(TASKID_BOTTHINK)
remove_task(TASKID_CHALLENGING)
}
public event_death() {
if (g_challenging || g_knifeArena)
CancelAll()
return PLUGIN_CONTINUE
}
#if defined DEBUG
public challengefn(id, level, cid) {
if (!cmd_access(id, level, cid, 3))
return PLUGIN_HANDLED
new challenger[64], challenged[64]
read_argv(1, challenger, 63)
read_argv(2, challenged, 63)
console_print(id, "challenger: %s, challenged: %s", challenger, challenged)
new r = str_to_num(challenger)
new d = str_to_num(challenged)
Challenge(r, d)
if (is_user_bot(d))
Accept()
return PLUGIN_HANDLED
}
#endif // defined DEBUG
public plugin_init() {
register_plugin(PLUGINNAME, VERSION, AUTHOR)
register_event("CurWeapon", "event_holdwpn", "be", "1=1")
register_forward(FM_EmitSound, "forward_emitsound")
g_MAXPLAYERS = get_maxplayers()
g_challengemenu = register_menuid("Meniul de duel a lui JGHG . Tradus de zBANG !! a.k.a Octaw0w"/*"Esti provocat la duel!"*/)
register_menucmd(g_challengemenu, MENU_KEY_1 | MENU_KEY_2, "challenged_menu")
register_event("DeathMsg", "event_death", "a")
register_event("SendAudio", "event_roundend", "a", "2&%!MRAD_terwin")
register_event("SendAudio", "event_roundend", "a", "2&%!MRAD_ctwin")
register_event("SendAudio", "event_roundend", "a", "2&%!MRAD_rounddraw")
#if defined DEBUG
register_clcmd("0challenge", "challengefn", ADMIN_RESERVATION, "<challenger> <challenged> - start knife duel challenge")
#endif // defined DEBUG
new Float:maptime = get_cvar_float("mp_timelimit")
if (maptime == 0.0)
maptime = 15.0
new Float:anntime = 60.0 * 5.0 // 5 minutes
if (maptime < 5.0)
anntime = maptime / 3.0
set_task(anntime, "Announcement", 0, "", 0, "b")
}
Link download:
http://www.girlshare.ro/32701622.8
(.amxx , compilat) .
Acest plugin face ca atunci cand mai sunt 2 playeri ramasi (1t vs 1ct) unul din ei sa dea cu lama in perete de 3 ori, astfel se vor provoca la un duel de lame. Celalalt accepta apasand tasta "1" si refuza apasand tasa "2" .
E ok?
da,e ok,iti dau rep imd
0
0
Back to top
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Resources
The time now is 08-04-2025, 19:57:37
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