Raised This Month: $32 Target: $400
 8% 

Automatic knife duel


Post New Thread Reply   
 
Thread Tools Display Modes
Cryonic
Senior Member
Join Date: Aug 2004
Location: Sweden..... (XCoder)
Old 02-09-2005 , 13:01  
Reply With Quote #11

Compiled perfectly for me and it's a great plugin
Cryonic is offline
XxKpAznGuyxX
Senior Member
Join Date: Dec 2004
Location: EARTH!!
Old 02-09-2005 , 13:45  
Reply With Quote #12

Sound Great! I will try it when I get home but would be really cool if you can make it so that the people that are dead knows that they are going to have a knife round.. like in csay you can see

"XxKpAznGuYxX has challenged Johnny Got His Gun!"

"Johnny Got His Gun Has Canceled the Challenged what A Wuss!"

"XxKpAznGuYxX is the Winner~!"
__________________
24/7 Chicago Terror-8.9.2.120:27015
XxKpAznGuyxX is offline
Send a message via AIM to XxKpAznGuyxX Send a message via MSN to XxKpAznGuyxX
Rustyboy
Junior Member
Join Date: Feb 2005
Old 02-17-2005 , 08:38  
Reply With Quote #13

Did not compile for me.

Welcome to the AMX Mod X 1.00-251 Compiler.
Copyright (c) 1997-2004 ITB CompuPhase, AMX Mod X Team

amxxsc: sc6.c62: cell do_symbol(FILE *, char *, int): Assertion `len>0 && len<31' failed.
Aborted
Rustyboy is offline
robbob4
Senior Member
Join Date: Jan 2005
Old 02-17-2005 , 22:47  
Reply With Quote #14

you dled the .sma, then placed it in scripting folder, and then opened compile.exe? if that works flawlessly it'll be in the compiled folder. Make sure you have the all the .inc's & modules required.
robbob4 is offline
Sharp
Senior Member
Join Date: May 2004
Location: Silent Assassins
Old 02-18-2005 , 13:58  
Reply With Quote #15

unknown unknown unknown automatic_knife bad load

help
__________________

Silent Assasins Clan Server
24.141.240.212:27011
Sharp is offline
Send a message via MSN to Sharp
XxKpAznGuyxX
Senior Member
Join Date: Dec 2004
Location: EARTH!!
Old 02-18-2005 , 14:00  
Reply With Quote #16

Quote:
Originally Posted by Sharp
unknown unknown unknown automatic_knife bad load

help
enable fun and fakemeta modules.... everytime you download a new plugin please open up the sma and read the includes
__________________
24/7 Chicago Terror-8.9.2.120:27015
XxKpAznGuyxX is offline
Send a message via AIM to XxKpAznGuyxX Send a message via MSN to XxKpAznGuyxX
meowlike
Junior Member
Join Date: Sep 2004
Location: Taiwan
Old 02-22-2005 , 21:44   i have problem plz help
Reply With Quote #17

I translate to chinese, and it didn't show any error.
When i cut the wall, it was current
but whether or not another man choose 1 or 2, it only show "too slow to respond".... i dont know where i modifid cannot be modify .

this is my code

Code:
#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 // 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 // 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     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)     }             return FMRES_IGNORED } 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, "你下了刀戰挑戰書給%s! 等候回覆還剩 %d 秒...", challenged_name, DECIDESECONDS)     new menu[1024], keys = MENU_KEY_1 | MENU_KEY_2     format(menu, 1023, "%s 殺給你一封刀戰挑戰書^n^n - 你還在等什麼?你只剩下 %d 秒可以回答!^n^n\y1\w. 放馬過來!^n\y2\w. 不了,我是孬種", challenger_name, DECIDESECONDS)     show_menu(challenged, keys, menu)     set_task(float(DECIDESECONDS), "timed_closemenu", TASKID_CHALLENGING) } public timed_closemenu() {     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 太慢回應 %s 的刀戰挑戰書...", challenged_name, challenger_name)         CancelAll()     } } 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 極度不屑 %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 接受了 %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         new usermenu, userkeys         get_user_menu(g_challenged, usermenu, userkeys) // get user menu         if (usermenu == g_challengemenu) // Close it!             show_menu(g_challenged, 0, "") // 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, "挑戰者: %s,被挑戰者: %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("You are challenged")     register_menucmd(g_challengemenu, 1023, "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_CFG, "<挑戰者> <被挑戰者> - 開啟刀戰")     #endif // defined DEBUG }

thanks a lot!
meowlike is offline
meowlike
Junior Member
Join Date: Sep 2004
Location: Taiwan
Old 02-22-2005 , 21:46  
Reply With Quote #18

oh sorry, this forum did not support the textcode "utf8". if u see ";&#25136" this is normal, means one chinese word.
Attached Files
File Type: sma Get Plugin or Get Source (automatic_knife_duel.sma - 1250 views - 7.7 KB)
meowlike is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 02-23-2005 , 02:28  
Reply With Quote #19

Try this one.
Attached Files
File Type: sma Get Plugin or Get Source (automatic_knife_duel_chinese.sma - 1372 views - 7.7 KB)
Johnny got his gun is offline
meowlike
Junior Member
Join Date: Sep 2004
Location: Taiwan
Old 02-23-2005 , 03:25  
Reply With Quote #20

Quote:
Originally Posted by Johnny got his gun
Try this one.
later report.
thanks a lot!
could u tell me what wrong with my modifed version?

i'm learing about small c language...
meowlike is offline
Reply



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 20:21.


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