Raised This Month: $ Target: $400
 0% 

Need help with making my doomsday code!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
atomic
Veteran Member
Join Date: Jan 2005
Location: What The Foot?
Old 05-30-2006 , 10:45   Need help with making my doomsday code!
Reply With Quote #1

After the command is executed (amx_bdoomsday (user))
The banned.wad will be played and a say (message) will be executed in "SERVER" console and after 10 sec the user will be banned (amx_addban (user) 0)

I come back after 4 months and my brain is empty .

Please help me with this code. Anyone?


Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> public plugin_init() {     register_plugin("Ban till doomsday","1.0","AtomiC")     register_concmd("amx_bdoomsday","timer",ADMIN_BAN,"Perm bans the player") }  public timer(id, level, cid)  {          //help      set_task(10.0,"theban")      client_cmd(0,"spk misc/banned.wav")      server_cmd ("say (user) is getting banned till doomsday")  return PLUGIN_HANDLED }   public dday(id) {     if (!(get_user_flags(id)&ADMIN_BAN)) {         return PLUGIN_HANDLED     }     if (read_argc() == 0) {         console_print(id,"amx_bdoomsday 'user'")         return PLUGIN_HANDLED     }     new user[32], uid     read_argv(1,user,32)     uid = find_player("bh",user)     if (uid == 0) {         console_print(id,"Invalid User Id")         return PLUGIN_HANDLED     }     get_user_authid (uid)              //HELP MEEEEEEEEEEEEEEE     server_cmd ("amx_addban %s 0")     client_cmd ("disconnect")   return PLUGIN_CONTINUE } public plugin_precache()               // God sake i sux {     precache_sound("misc/banned.wav")       return PLUGIN_CONTINUE   }
Attached Files
File Type: zip sound.zip (414.6 KB, 113 views)
__________________
atomic is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 05-30-2006 , 11:55  
Reply With Quote #2

I think you meant banned.wav

not wad.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
atomic
Veteran Member
Join Date: Jan 2005
Location: What The Foot?
Old 05-30-2006 , 14:19  
Reply With Quote #3

yes wav, my mistake

Somebody help me, quick
__________________
atomic is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 05-30-2006 , 17:56  
Reply With Quote #4

This should work:
Code:
#include <amxmodx> #include <amxmisc> new g_sound[] = "misc/banned.wav" public plugin_precache() {     precache_sound(g_sound) } public plugin_init() {     register_plugin("Ban till doomsday", "1.0", "AtomiC")     register_concmd("amx_bdoomsday", "dday", ADMIN_BAN, "<name or #userid> - perm bans the player") } public dday(id, level, cid) {     if (!cmd_access(id, level, cid, 2))         return PLUGIN_HANDLED     new user[32], uid     read_argv(1, user, 31)     uid = cmd_target(id, user, 9)     if (!uid)         return PLUGIN_HANDLED     new name[32]     get_user_name(uid, name, 31) //  server_cmd("say ^"%s^" is getting banned till doomsday", name)     client_print(0, print_chat, "^"%s^" is getting banned till doomsday", name)     client_cmd(0, "spk ^"%s^"", g_sound)     set_task(10.0, "timer", uid)     return PLUGIN_HANDLED } public timer(id) {     server_cmd("banid 0 #%d kick;writeid", get_user_userid(id)) }
VEN is offline
atomic
Veteran Member
Join Date: Jan 2005
Location: What The Foot?
Old 05-31-2006 , 09:00  
Reply With Quote #5

Hmm the client can disconnect before getting banned, or?

get_user_authid(id) before the timer starts
amx_addban (person's Steamid) 0
__________________
atomic is offline
atomic
Veteran Member
Join Date: Jan 2005
Location: What The Foot?
Old 05-31-2006 , 12:39  
Reply With Quote #6

help...
__________________
atomic is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 05-31-2006 , 12:52  
Reply With Quote #7

Ok, this should work better then:
Code:
#include <amxmodx> #include <amxmisc> new g_sound[] = "misc/banned.wav" public plugin_precache() {     precache_sound(g_sound) } public plugin_init() {     register_plugin("Ban till doomsday", "1.0", "AtomiC")     register_concmd("amx_bdoomsday", "dday", ADMIN_BAN, "<name or #userid> - perm bans the player") } public dday(id, level, cid) {     if (!cmd_access(id, level, cid, 2))         return PLUGIN_HANDLED     new user[32], uid     read_argv(1, user, 31)     uid = cmd_target(id, user, 9)     if (!uid)         return PLUGIN_HANDLED     new name[32], authid[32]     get_user_name(uid, name, 31)     get_user_authid(uid, authid, 31)     client_print(0, print_chat, "^"%s^" is getting banned till doomsday", name)     client_cmd(0, "spk ^"%s^"", g_sound)     set_task(10.0, "timer", uid, authid, 32)     return PLUGIN_HANDLED } public timer(authid[32], uid) {     server_cmd("banid 0 ^"%s^"; writeid", authid)     if (is_user_connected(uid))         server_cmd("kick #%d", get_user_userid(uid))     }
VEN 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 16:27.


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