AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Join 2 codes (https://forums.alliedmods.net/showthread.php?t=224387)

extream87 08-23-2013 18:44

Join 2 codes
 
Code:
/*  Formatright © 2009, ConnorMcLeod Dead Name Change is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Dead Name Change; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <amxmodx> #include <fakemeta> #define VERSION "0.0.1" public plugin_init() { register_plugin("No Change Name Msg", VERSION, "ConnorMcLeod") register_forward(FM_ClientUserInfoChanged, "ClientUserInfoChanged") } public ClientUserInfoChanged(id) { new szOldName[32] pev(id, pev_netname, szOldName, charsmax(szOldName)) if( szOldName[0] ) { new szNewName[32] get_user_info(id, "name", szNewName, charsmax(szNewName)) if( !equal(szOldName, szNewName) ) { set_pev(id, pev_netname, szNewName) return FMRES_HANDLED } } return FMRES_IGNORED }

I want implement the 1st code in the code below. (The function of the 1st code is ommit the message when one player change the name.)

Code:
public name15(id, level) {     if( access(id, level) )     {         get_user_info(id, "name", pname[id], charsmax(pname[]))         get_user_info(id, "name", stname[id], charsmax(stname[]))                   formatex(newname[id], charsmax(newname[]), "%s CT:%d - %d:T", pname[id], g_Teamscore[nCT], g_Teamscore[nT])         set_user_info(id, "name", newname[id])     } }


All times are GMT -4. The time now is 19:07.

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