Raised This Month: $ Target: $400
 0% 

EXPERIENCED PLUGIN MAKERS PLZ SEE THIS V2.0


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
deBUG
Junior Member
Join Date: Aug 2004
Old 09-05-2004 , 17:19   EXPERIENCED PLUGIN MAKERS PLZ SEE THIS V2.0
Reply With Quote #1

ok in my last post i put something up that was admin-abuse-ish but that wasn't my point, so i redid it but its the same format. and i still have the same compile problems (compiler 2.1.0) -

name_changer.sma<15> : error 017: undefined symbol "cmd access"
name_changer.sma<31> : error 017: undefined symbol "player"

remember i'm just starting out and this is my first time scripting so i did something really simple and i hope you guys can help me out alil'. (o and i hope this time this script's not really admin abusing "


Code:
// Name Changer V0.1 by Leo [deBUG] // // Usage - amx_namechange "nick or userid" // // This can be used on players who have names which are insulting or disgusting. #include <amxmodx> public plugin_init() {     register_plugin("Name Changer","0.1","Leo [deBUG]")     register_concmd("amx_changename","cmd_change_name",ADMIN_KICK," Change the names of players with explicit names") } public cmd_change_name(id) {     if (!cmd_access(id,level,cid,2)) {         console_print(id,"[AMXx] You do not have access to this command.")         return PLUGIN_HANDLED     }     if (read_argc() == 0) {         console_print(id,"[AMXx] You must specify a user for this command.")         return PLUGIN_HANDLED     }     new user[32], uid     read_argv(1,user,32)     uid = find_player("bh",user)     if (uid == 0) {         console_print(id,"[AMXx] Invalid user ID, please retry.")         return PLUGIN_HANDLED     }     new name2[32]     get_user_name (player,name2,31)     console_print(id,"[AMXx] Name Change successful")     client_cmd(uid,"name I_Need_To_Change_My_Name")     client_print(0,print_chat,"[AMXx] Admin: %s, you need to change your name, please.",name2)     return PLUGIN_HANDLED }
deBUG is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 09-05-2004 , 17:21  
Reply With Quote #2

#include <amxmisc>
Freecode is offline
deBUG
Junior Member
Join Date: Aug 2004
Old 09-05-2004 , 17:24  
Reply With Quote #3

alright, i did that and now in the compiler theres again 2 mistakes but they're different now

name_changer.sma<16> : error 017: undefined symbol "level"
name_changer.sma<32> : error 017: undefined symbol "player"

any idea what happened?

Code:
// Name Changer V0.1 by Leo [deBUG] // // Usage - amx_namechange "nick or userid" // // This can be used on players who have names which are insulting or disgusting. #include <amxmodx> #include <amxmisc> public plugin_init() {     register_plugin("Name Changer","0.1","Leo [deBUG]")     register_concmd("amx_changename","cmd_change_name",ADMIN_KICK," Change the names of players with explicit names") } public cmd_change_name(id) {     if (!cmd_access(id,level,cid,2)) {         console_print(id,"[AMXx] You do not have access to this command.")         return PLUGIN_HANDLED     }     if (read_argc() == 0) {         console_print(id,"[AMXx] You must specify a user for this command.")         return PLUGIN_HANDLED     }     new user[32], uid     read_argv(1,user,32)     uid = find_player("bh",user)     if (uid == 0) {         console_print(id,"[AMXx] Invalid user ID, please retry.")         return PLUGIN_HANDLED     }     new name2[32]     get_user_name (player,name2,31)     console_print(id,"[AMXx] Name Change successful")     client_cmd(uid,"name I_Need_To_Change_My_Name")     client_print(0,print_chat,"[AMXx] Admin: %s, you need to change your name, please.",name2)     return PLUGIN_HANDLED }
deBUG is offline
FeuerSturm
AlliedModders Donor
Join Date: Apr 2004
Old 09-05-2004 , 17:27  
Reply With Quote #4

change
Code:
public cmd_change_name(id)
to
Code:
public cmd_change_name(id,level,cid)

and
Code:
get_user_name (player,name2,31)
to
Code:
get_user_name(uid,name2,31)

and try then.
FeuerSturm is offline
johnjg75
Veteran Member
Join Date: Mar 2004
Location: Delaware
Old 09-05-2004 , 17:29  
Reply With Quote #5

Code:
// Name Changer V0.1 by Leo [deBUG] // // Usage - amx_namechange "nick or userid" // // This can be used on players who have names which are insulting or disgusting. #include <amxmodx> #include <amxmisc> public plugin_init() {     register_plugin("Name Changer","0.1","Leo [deBUG]")     register_concmd("amx_changename","cmd_change_name",ADMIN_KICK," Change the names of players with explicit names") } public cmd_change_name(id,level,cid) {     if (!cmd_access(id,level,cid,2)) {         console_print(id,"[AMXx] You do not have access to this command.")         return PLUGIN_HANDLED     }     if (read_argc() == 0) {         console_print(id,"[AMXx] You must specify a user for this command.")         return PLUGIN_HANDLED     }     new user[32], uid     read_argv(1,user,32)     uid = find_player("bh",user)     if (uid == 0) {         console_print(id,"[AMXx] Invalid user ID, please retry.")         return PLUGIN_HANDLED     }     new name2[32]     get_user_name(player,name2,31)     console_print(id,"[AMXx] Name Change successful")     client_cmd(uid,"name I_Need_To_Change_My_Name")     client_print(0,print_chat,"[AMXx] Admin: %s, you need to change your name, please.",name2)     return PLUGIN_HANDLED }
__________________
johnjg75 is offline
Send a message via AIM to johnjg75 Send a message via MSN to johnjg75 Send a message via Yahoo to johnjg75
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 09-05-2004 , 17:32  
Reply With Quote #6

get_user_name(player,name2,31) should be get_user_name(uid,name2,31)
Freecode is offline
deBUG
Junior Member
Join Date: Aug 2004
Old 09-05-2004 , 17:32  
Reply With Quote #7

Quote:
Originally Posted by FireStorm
change
Code:
public cmd_change_name(id)
to
Code:
public cmd_change_name(id,level,cid)

and
Code:
get_user_name (player,name2,31)
to
Code:
get_user_name(uid,name2,31)

and try then.
ahh yes it compiled flawlessly. ty very much. btw where can i find tuts of scripting small for amxx other than that sticky thread in scripting help forum?
deBUG 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 17:11.


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