Raised This Month: $ Target: $400
 0% 

[PLUGIN] Help!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mr. Satan
Senior Member
Join Date: Apr 2004
Location: Fort Wayne, Indiana
Old 08-29-2005 , 19:01   [PLUGIN] Help!
Reply With Quote #1

Why wont this work?!


Eh sorry, wrong section of the forums

Code:
// GIVING CLIENT ATTACKS ESF v1.2b by Mr. Satan //========================================================= #include <amxmod> #include <amxmisc> public give_item_pvk(admin_index,victim_index,weapon_give[]) {    new arg1[32]    read_argv(1,arg1,32)    new name[32]    get_user_name(victim_index,name,32)   // Remove The slashes before the follow 2 lines of code to enable info messages    // set_hudmessage(200, 50, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)    // show_hudmessage(0,"%s Has Been Given An Attack",name)     // Items        if (equal(weapon_give,"all")){       give_item(victim_index,"item_chainmail")       give_item(victim_index,"item_food")       give_item(victim_index,"item_leather")       give_item(victim_index,"item_platemail")       give_item(victim_index,"item_treasurechest")    } else if (equal(weapon_give,"chainmail")){       give_item(victim_index,"item_chainmail")    } else if (equal(weapon_give,"food")){       give_item(victim_index,"item_food")    } else if (equal(weapon_give,"leather")) {       give_item(victim_index,"item_leather")    } else if (equal(weapon_give,"platemail")){       give_item(victim_index,"item_platemail")    } else if (equal(weapon_give,"tchest")){       give_item(victim_index,"item_treasurechest")    } else {       client_print(admin_index,print_console,"[AMXX] There is no such item")       return PLUGIN_CONTINUE    }        // client_print(admin_index,print_console,"[AMXX] Client ^"%s^" has been given an item",name)    return PLUGIN_CONTINUE } public admin_item_pvk(id) {    if (!(get_user_flags(id)&ADMIN_LEVEL_A)) {       client_print(id,print_console,"[AMXX] You have no access to that command")       return PLUGIN_HANDLED    }    new argc = read_argc()    if (argc < 3) {       client_print(id,print_console,"[AMXX] Usage: amx_item_pvk < part of nick > or < # index > < item to give >")       return PLUGIN_HANDLED    }    new arg1[32]    new arg2[32]    new arg3[32]    read_argv(1,arg1,32)    read_argv(2,arg2,32)    read_argv(3,arg3,32) //Index    if (equal(arg1,"#")) {       if (is_user_connected(str_to_num(arg2))) {          give_item_pvk(id,str_to_num(arg2),arg3)       } else {          client_print(id,print_console,"[AMXX] Client not found")       }    } else {       new player = find_player("lb",arg1)       if (player) {          give_item_pvk(id,player,arg2)       } else {          client_print(id,print_console,"[AMXX] Client with that part of nick not found")       }    }        return PLUGIN_HANDLED } public plugin_init() {    register_plugin("PVK Give Items","1.2b","Dewd In The Newd")    register_concmd("amx_item_pvk","admin_item_pvk",ADMIN_LEVEL_A,"<part of nick> or <# index> <item to give>")    return PLUGIN_CONTINUE }
__________________
DITN's TEAMSPEAK Server @ ditn.sytes.net:8767
Mr. Satan is offline
Send a message via AIM to Mr. Satan Send a message via MSN to Mr. Satan Send a message via Yahoo to Mr. Satan
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 08-29-2005 , 21:22  
Reply With Quote #2

Instead of making people that might help you have to compile your plugin, why don't you tell us what "doesn't work". Are you receiving errors? If so, what are they?
Brad is offline
Mr. Satan
Senior Member
Join Date: Apr 2004
Location: Fort Wayne, Indiana
Old 08-30-2005 , 04:46  
Reply With Quote #3

It compiles fine, no errors. However, it is like the command isn't registered at all.
__________________
DITN's TEAMSPEAK Server @ ditn.sytes.net:8767
Mr. Satan is offline
Send a message via AIM to Mr. Satan Send a message via MSN to Mr. Satan Send a message via Yahoo to Mr. Satan
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 08-30-2005 , 16:15  
Reply With Quote #4

doesn't you have to do something like this
Code:
new arg1[32] read_argv( 1, arg1, 32 ) new player = cmd_target( id, arg1, 5 ) give_item(player ,"item_leather")
you can change new player in new victim or something i think something like that will work
just an example i think something like that will work
__________________
- Bye bye!
nightscreem 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 14:32.


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