AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   EXPERIENCED PLUGIN MAKERS PLZ SEE THIS V2.0 (https://forums.alliedmods.net/showthread.php?t=5571)

deBUG 09-05-2004 17:19

EXPERIENCED PLUGIN MAKERS PLZ SEE THIS V2.0
 
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 }

Freecode 09-05-2004 17:21

#include <amxmisc>

deBUG 09-05-2004 17:24

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 }

FeuerSturm 09-05-2004 17:27

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.

johnjg75 09-05-2004 17:29

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 }

Freecode 09-05-2004 17:32

get_user_name(player,name2,31) should be get_user_name(uid,name2,31)

deBUG 09-05-2004 17:32

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?


All times are GMT -4. The time now is 17:11.

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