spALky Posted February 21, 2010 Report Share Posted February 21, 2010 Rename plugins neliek priekša clantagu. Kas varētu būt par vainu. Zemāk kods /* AMX Mod X script. * * © 2003, OLO * This file is provided as is (no warranties). * * Description: Renames the given user by adding the defined tag in cvar Notice, this is server console command only - so it can be executed only by rcon, amx_rcon or in .cfg file or directly in the server console amx_rename STEAMID amx_rename #id amx_rename part_of_nick use below cvars in amxx.cfg amx_rename_tag "[PussyClub.Lv]" // definiton of the tag to use (defafault [NO.AC]) amx_rename_append "0" // 1 = append from right, 0 =append from left (default) Example: We got player Joe with Steamid STEAM_1:2:34567, and we use default settings of cvars so after using amx_rename STEAM_1:2:34567 he got name set to [NO.AC]Joe */ #include <amxmodx> #include <amxmisc> public plugin_init() { register_plugin("Rename", "0.1", "_KaszpiR_") register_cvar("amx_rename_tag", "[PussyClub.Lv]") //text to add to nick register_cvar("amx_rename_append", "0") //1 = append (it will be like nick[NO.AC]), 0= prepend (like [NO.AC]nick] register_srvcmd("amx_rename","RenameNick") return PLUGIN_CONTINUE } public RenameNick() { new arg[32] read_argv(1,arg,31) new player = find_player("c",arg) //search by authid if (!player) { server_print("[AMX] ( %s ) NOT FOUND (rename.amxx)", arg) // some small debug message return PLUGIN_HANDLED } new tag[32] get_cvar_string("amx_rename_tag",tag,31) new authid[32], name[32] get_user_authid(player,authid,31) get_user_name(player,name,31) if (containi(name,tag) != -1 ) //skip if tag exists allready return PLUGIN_HANDLED if(get_cvar_num("amx_rename_append")) client_cmd(player, "name ^"%s%s^"", name, tag) else client_cmd(player, "name ^"%s%s^"", tag, name) server_print("[AMX] Renamed ^"%s^" due to lack of AntiCheat ( %s )", name,arg) client_print(player,print_chat,"[AMXX] Your name has been changed because you do not run AntiCheat") return PLUGIN_HANDLED } Link to comment Share on other sites More sharing options...
ngEAr Posted February 21, 2010 Report Share Posted February 21, 2010 http://forums.alliedmods.net/showthread.php?p=232481 Link to comment Share on other sites More sharing options...
spALky Posted February 21, 2010 Author Report Share Posted February 21, 2010 nu man viss ir kartiba. visu izdariju ka nakas. ieraxtiju server.cfg un pat amxx.cfg Bet man liekas, ka vins tikai strada uz steam ko tiko pamaniju, vai ta ir? Link to comment Share on other sites More sharing options...
ngEAr Posted February 21, 2010 Report Share Posted February 21, 2010 http://yy.lv/download.php?f=109148 Pirms kompilejot noradi clantagu un ka tev tur vajag , es bishku kodu pamainiju. Link to comment Share on other sites More sharing options...
Recommended Posts