Since I can't attach files, here is the fixed source code:rnrn
///////////////////////////////////////////////////////////////////////////////////////rn//rn// AMX Mod (X)rn//rn// Developed by:rn// The Amxmodx DoD Communityrn// |BW|.Zor Editor (zor@blackwatchclan.net)rn// https://www.dodplugins.netrn//rn// This program is free software; you can redistribute it and/or modify itrn// under the terms of the GNU General Public License as published by thern// Free Software Foundation; either version 2 of the License, or (atrn// your option) any later version.rn//rn// This program is distributed in the hope that it will be useful, butrn// WITHOUT ANY WARRANTY; without even the implied warranty ofrn// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNUrn// General Public License for more details.rn//rn// You should have received a copy of the GNU General Public Licensern// along with this program; if not, write to the Free Software Foundation,rn// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USArn//rn// In addition, as a special exception, the author gives permission torn// link the code of this program with the Half-Life Game Engine ("HLrn// Engine") and Modified Game Libraries ("MODs") developed by Valve,rn// L.L.C ("Valve"). You must obey the GNU General Public License in allrn// respects for all of the code used other than the HL Engine and MODsrn// from Valve. If you modify this file, you may extend this exceptionrn// to your version of the file, but you are not obligated to do so. Ifrn// you do not wish to do so, delete this exception statement from yourrn// version.rn//rn// Name: DoD Admin Modelsrn// Author: |BW|.Zorrn// Description: This plugin will set the admin to have specific modelsrn// Reference: rn//rn// CVARS: ( Place these Variables into the addons/amxmodx/configs/amxx.cfg File )rn//rn// dod_am_enabled 1rn//rn// v0.1 - Be!rn// v0.2 - Added the dod_set_bodyrn// v0.3 - Added the ability to set the model body for each person dod_set_bodyrn// - Added menu for higher level admins to fiddle with their bodiesrn// v0.4 - Updated for DoDx 1.75rn// v0.4a - Fixed error in dod_client_changeteam where user joins spectatorrn// v0.5 - Major fix, non admin players were getting models as the tracking numberrn// was not getting reset when an admin dropped/quit/spectatedrn// v0.5a - Fixed up some errors picked up by =|[76AD]|= TatsuSaisei rn// v0.5b - Added setting to change who can have the skin rn//rn///////////////////////////////////////////////////////////////////////////////////////rnrn#include <amxmodx>rn#include <amxmisc>rn#include <engine>rn#include <fakemeta>rn#include <dodx>rnrn///////////////////////////////////////////////////////////////////////////////////////rn// Version Controlrn//rnnew AUTH[] = "AMXX DoD Community"rnnew PLUGIN_NAME[] = "DoD Admin Models"rnnew VERSION[] = "0.5a-1"rn//rn///////////////////////////////////////////////////////////////////////////////////////rnrn///////////////////////////////////////////////////////////////////////////////////////rn// Globalsrn#define USER ADMIN_LEVEL_Hrn#define MODELS 4rnnew models[MODELS][128] =rn{rn "models/player/admin-allies/admin-allies.mdl",rn "models/player/admin-allies/admin-alliesT.mdl",rn "models/player/admin-axis/admin-axis.mdl",rn "models/player/admin-axis/admin-axisT.mdl"rn}rnrnnew models_type[2][32] =rn{rn "admin-allies",rn "admin-axis"rn}rnrnnew body_number[33] = { 0, ...}rnrn//CVARSrnnew g_dod_am_enabledrnrn//rn///////////////////////////////////////////////////////////////////////////////////////rnrn///////////////////////////////////////////////////////////////////////////////////////rn//rn// Initializations of the Pluginrn//rnpublic plugin_init()rn{rn // Register this pluginrn register_plugin(PLUGIN_NAME, VERSION, AUTH)rn register_clcmd("amx_bodynum", "set_body_number_cmd", USER, "<nick> <number 0-10000> - Sets the body number for a player")rn rn // Register the Forwardsrn register_forward(FM_PrecacheModel, "fw_precache") rn register_forward(FM_PrecacheSound, "fw_precache") rn register_forward(FM_PrecacheGeneric, "fw_precache")rn rn // Menurn register_clcmd("amx_modelmenu", "show_main_menu", ADMIN_LEVEL_A, "- Main Menu Command for Model Body Testing")rn register_clcmd("body_number_cmd", "body_number_cmd", ADMIN_LEVEL_A, "- Captures Commands From Keyboard")rn register_menucmd(register_menuid("Model Body Test"), (MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3), "action_main_menu")rn}rnrn///////////////////////////////////////////////////////////////////////////////////////rn//rn// Configs the pluginrn//rnpublic plugin_cfg()rn{rn // Get the placement of the joinleave filern new temp[128]rnrn // Allow the server to run the config filern get_configsdir(temp, 127)rn format(temp, 127, "%s/amxx.cfg", temp)rn server_cmd("exec %s", temp)rn server_exec()rn rn return PLUGIN_CONTINUErn}rnrn///////////////////////////////////////////////////////////////////////////////////////rn//rn// Precachern//rnpublic plugin_precache()rn{rn // Register CVARSrn g_dod_am_enabled = register_cvar("dod_am_enabled", "1")rn rn for(new x = 0; x < MODELS; x++)rn {rn if(!file_exists(models[x]))rn {rn log_amx("File: %s Does not Exist, Disabling plugin!", models[x])rn set_pcvar_num(g_dod_am_enabled, 0)rnrn return PLUGIN_CONTINUErn }rn rn precache_model(models[x])rn enforce(models[x])rn }rn rn precache_model("models/rpgrocket.mdl")rn rn return PLUGIN_CONTINUErn}rnrnpublic client_putinserver(id)rn{rn if(!is_user_connected(id) || !get_pcvar_num(g_dod_am_enabled))rn return PLUGIN_CONTINUErn rn if(get_user_flags(id)&USER)rn body_number[id] = 12rn rn return PLUGIN_CONTINUErn}rnrnpublic dod_client_changeteam(id, team, oldteam)rn{rn if(!is_user_connected(id) || !get_pcvar_num(g_dod_am_enabled))rn return PLUGIN_CONTINUErnrn if(get_user_flags(id)&USER)rn {rn if(team == ALLIES || team == AXIS)rn dod_set_model(id, models_type[team-1])rn }rn rn return PLUGIN_CONTINUErn}rnrnpublic dod_client_changeclass(id, class, oldclass)rn{rn if(!is_user_connected(id) || !get_pcvar_num(g_dod_am_enabled))rn return PLUGIN_CONTINUErnrn if(get_user_flags(id)&USER)rn {rn // Here you can play with some bodys to see the number of them and determine what body for what classrn dod_set_body_number(id, body_number[id])rn }rn rn return PLUGIN_CONTINUErn}rnrnpublic dod_client_spawn(id)rn{rn if(!is_user_connected(id) || !get_pcvar_num(g_dod_am_enabled))rn return PLUGIN_CONTINUErnrn if(get_user_flags(id)&USER)rn {rn // Here you can play with some bodys to see the number of them and determine what body for what classrn dod_set_body_number(id, body_number[id])rn }rn rn return PLUGIN_CONTINUErn}rnrnpublic set_body_number_cmd(id, level, cid)rn{rn if(!cmd_access(id, level, cid, 2) || !get_pcvar_num(g_dod_am_enabled))rn return PLUGIN_HANDLEDrn rn new number[32]rn read_argv(2, number, 128)rn remove_quotes(number)rn rn if(!is_str_num(number))rn {rn client_print(id, print_chat, "Sorry thats not a Number Please Try Again!")rn client_cmd(id, "amx_bodynum")rn return PLUGIN_HANDLEDrn }rn rn new player[32]rn read_argv(1, player, 31)rn new player_id = get_player(player)rn rn if(!player_id)rn {rn client_print(id, print_chat, "Sorry thats not a player name!")rn client_cmd(id, "amx_bodynum")rn return PLUGIN_HANDLEDrn }rn rn get_user_name(player_id, player, 31)rn rn if(get_user_flags(player_id)&USER)rn {rn client_print(id, print_chat, "You have Set Player %s's Body Number to %d", player, str_to_num(number))rn body_number[player_id] = str_to_num(number)rn }rn rn elsern {rn client_print(id, print_chat, "You Cannot Set Player %s's Body Number as they are not an admin!", player)rn }rn rn return PLUGIN_HANDLEDrn}rnrnpublic show_main_menu(id, level, cid)rn{rn if(!cmd_access(id, level, cid, 1))rn return PLUGIN_HANDLEDrnrn display_main_menu(id)rnrn return PLUGIN_HANDLEDrn}rnrnstock display_main_menu(id)rn{rn new menuBody[1024]rn new keys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3rn new len = format(menuBody, 511, "yModel Body Test^n^n")rn len += format(menuBody[len], (1023-len), "
Body Set At: %d^n^n", entity_get_int(id, EV_INT_body))rn len += format(menuBody[len], (1023-len), "
1) w3rd Person On^n")rn len += format(menuBody[len], (1023-len), "
2) w3rd Person Off^n")rn len += format(menuBody[len], (1023-len), "
3) wSet Body Number^n")rn format(menuBody[len], (1023-len), "
0) wExit^n")rnrn show_menu(id, keys, menuBody, -1, "Model Body Test")rnrn return PLUGIN_HANDLEDrn}rnrnpublic action_main_menu(id, key)rn{rn switch(key)rn {rn case 0:rn {rn set_view(id, 1)rn client_cmd(id, "amx_modelmenu")rn }rn case 1:rn {rn set_view(id, 0)rn client_cmd(id, "amx_modelmenu")rn }rn case 2:rn {rn client_cmd(id, "messagemode body_number_cmd")rn }rn default:rn {rn set_view(id, 0)rn }rn }rnrn return PLUGIN_CONTINUErn}rnrnpublic body_number_cmd(id, level, cid)rn{rn if(!cmd_access(id, level, cid, 2))rn return PLUGIN_HANDLEDrnrn new arg[128]rn read_args(arg, 128)rn remove_quotes(arg)rn rn if(!is_str_num(arg))rn {rn client_print(id, print_chat, "Sorry thats not a Number Please Try Again!")rn client_cmd(id, "messagemode body_number_cmd")rn return PLUGIN_HANDLEDrn }rn rn client_print(id, print_chat, "You have Set Your Body Number to %d", str_to_num(arg)) rn entity_set_int(id, EV_INT_body, str_to_num(arg))rn client_cmd(id, "amx_modelmenu")rn rn return PLUGIN_HANDLEDrnrn}rnrnpublic fw_precache(const file[]) rn{rn enforce(file)rn return FMRES_IGNOREDrn} rnrnpublic enforce(const file[])rn{rn force_unmodified(force_exactfile, {0,0,0}, {0,0,0}, file)rn}rnrnpublic inconsistent_file(id, const filename[], reason[64])rn{rn format(reason, 63, "Delete %s and reconnect to get proper file!", filename)rn return PLUGIN_CONTINUErn}rnrnstock get_player(search[])rn{rn // See if they are there by exact nickrn new player_id = find_player("ahjl", search)rnrn if(!player_id)rn {rn // Try to find them by portion of nickrn player_id = find_player("bhjl", search)rn }rnrn if(!player_id)rn {rn // Try to find them by steam idrn player_id = find_player("chj", search)rn }rnrn if(!player_id)rn {rn // Try to find them by iprn player_id = find_player("dhj", search)rn }rnrn if(!player_id)rn {rn // Try to find them by useridrn player_id = find_player("khj", search)rn }rnrn return player_idrn}