Raised This Month: $ Target: $400
 0% 

Need help with making my doomsday code!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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