Raised This Month: $ Target: $400
 0% 

amx/amxx


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
tarin
Member
Join Date: May 2005
Old 05-31-2005 , 16:41   help!
Reply With Quote #6

when i changed it to this
Quote:

/* AMX Mod script.
* admin_armor by Vectren - [email protected] (Built off the source to f117bomb's admin_heal)
* This file is provided as is (no warranties).
*/

#include <amxmodx>
#include <fun>

/*
* Usage: amx_armor <authid, nick, @team or #userid> <armor to give>
* Examples:
* amx_armor @CT 100 - adds 100 Armor to Counter-Terrorists Team
* amx_armor @TERRORIST 999 - adds 999 armor to the Terrorist team
* amx_armor player 200 - adds 200 armor to player
*/

public admin_armor(id,level,cid) {
if (!cmd_access(id,level,cid,3))
return PLUGIN_HANDLED
new arg[32], arg2[8], name2[32]
read_argv(1,arg,31)
read_argv(2,arg2,7)
get_user_name(id,name2,31)
if (arg[0]=='@'){
new players[32], inum
get_players(players,inum,"ae",arg[1])
if (inum==0){
console_print(id,"No clients in such team")
return PLUGIN_HANDLED
}
for(new a=0;a<inum;++a) {
new user_armor = get_user_armor(players[a])
set_user_armor(players[a], str_to_num(arg2) + user_armor)
}
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0,print_chat,"ADMIN %s: set armor on all %s",name2,arg[1])
case 1: client_print(0,print_chat,"ADMIN: set armor on all %s",arg[1])
}
console_print(id,"All clients have set Armor")
}
else {
new player = cmd_target(id,arg,7)
if (!player) return PLUGIN_HANDLED
new user_armor = get_user_armor(player)
set_user_armor(player, str_to_num(arg2) + user_armor)
new name[32]
get_user_name(player,name,31)
switch(get_cvar_num("amx_show_activity")) {
case 2: client_print(0,print_chat,"ADMIN %s: set Armor on %s",name2,name)
case 1: client_print(0,print_chat,"ADMIN: set Armor on %s",name)
}
console_print(id,"Client ^"%s^" has set Armor",name)
}
return PLUGIN_HANDLED
}

public plugin_init() {
register_plugin("Admin Armor","0.9.3","Vectren")
register_concmd("amx_armor","admin_armor",ADM IN_LEVEL_A,"<authid, nick, @team or #userid> <armor to give>")
return PLUGIN_CONTINUE
}
when i tried to compile it and there was 2 errors...
the errors were:
error 017: undefined symbol "cmd_access"
error 017: undefined symbol "cmd_target"
__________________
tarin 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:46.


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