Raised This Month: $ Target: $400
 0% 

Why is this not working


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
sibox
Member
Join Date: Apr 2009
Location: Bulgaria
Old 01-02-2011 , 07:47   Re: Why is this not working
Reply With Quote #8

Code:
#define KEYS 13 new buttons[32]; new filename[256]; new const command[] = "cheatkey"; new g_Buttons[32]; public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_clcmd("cheatkey", "warning")     get_configsdir(filename,255)     format(filename,255,"%s/cheatkeys.cfg",filename)     } public ReadKey(szLine[]) {     new szBuffer[32];     new b = 0;     if(szBuffer[0] == '/' && szBuffer[1] == '/') { str_to_num(szLine) + 1; }     read_file(g_Buttons, str_to_num(szLine), szBuffer, 31, b) } stock keys_func(i) {     new fsize = file_size(filename, 1)     new number[32];     for(new z = 0; z < fsize;z++) {         num_to_str(z, number, 31)         switch(i) {                 case 2: ReadKey(number)                 case 3: ReadKey(number)                 case 4: ReadKey(number)                 case 5: ReadKey(number)                 case 6: ReadKey(number)                 case 7: ReadKey(number)                 case 8: ReadKey(number)                 case 9: ReadKey(number)                 case 10: ReadKey(number)                 case 11: ReadKey(number)                 case 12: ReadKey(number)                 case 13: ReadKey(number)             }     }     return buttons } public warning(id) {     for(new i=1;i<=KEYS;i++) {         new name[32]         get_user_name(id,name,31)         client_print(0,print_chat,"%s was forced to quit because he pushed the wrong button! Be careful!",name)         client_print(0, print_chat, "He push: %s", keys_func(i))     } }
sibox is offline
Send a message via Skype™ to sibox
 



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 02:10.


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