AMX Mod X Plugin Approver
|
07-30-2018
, 15:30
Re: get_user_msgid() fails to work on server startup?
|
#10
|
You have to check when WeaponList is being registered, then getting the return value.
RegUserMsg is going to be called for all the messages at once.
The game does that essentially:
Spoiler
Code:
void LinkUserMessages()
{
if (gmsgCurWeapon)
return;
gmsgCurWeapon = REG_USER_MSG("CurWeapon", 3);
gmsgGeigerRange = REG_USER_MSG("Geiger", 1);
gmsgFlashlight = REG_USER_MSG("Flashlight", 2);
gmsgFlashBattery = REG_USER_MSG("FlashBat", 1);
gmsgHealth = REG_USER_MSG("Health", 1);
gmsgDamage = REG_USER_MSG("Damage", 12);
gmsgBattery = REG_USER_MSG("Battery", 2);
gmsgTrain = REG_USER_MSG("Train", 1);
gmsgHudTextPro = REG_USER_MSG("HudTextPro", -1);
gmsgHudText = REG_USER_MSG("HudText", -1);
gmsgSayText = REG_USER_MSG("SayText", -1);
gmsgTextMsg = REG_USER_MSG("TextMsg", -1);
gmsgWeaponList = REG_USER_MSG("WeaponList", -1);
gmsgResetHUD = REG_USER_MSG("ResetHUD", 0);
gmsgInitHUD = REG_USER_MSG("InitHUD", 0);
gmsgViewMode = REG_USER_MSG("ViewMode", 0);
gmsgShowGameTitle = REG_USER_MSG("GameTitle", 1);
gmsgDeathMsg = REG_USER_MSG("DeathMsg", -1);
gmsgScoreAttrib = REG_USER_MSG("ScoreAttrib", 2);
gmsgScoreInfo = REG_USER_MSG("ScoreInfo", 9);
gmsgTeamInfo = REG_USER_MSG("TeamInfo", -1);
gmsgTeamScore = REG_USER_MSG("TeamScore", -1);
gmsgGameMode = REG_USER_MSG("GameMode", 1);
gmsgMOTD = REG_USER_MSG("MOTD", -1);
gmsgServerName = REG_USER_MSG("ServerName", -1);
gmsgAmmoPickup = REG_USER_MSG("AmmoPickup", 2);
gmsgWeapPickup = REG_USER_MSG("WeapPickup", 1);
gmsgItemPickup = REG_USER_MSG("ItemPickup", -1);
gmsgHideWeapon = REG_USER_MSG("HideWeapon", 1);
gmsgSetFOV = REG_USER_MSG("SetFOV", 1);
gmsgShowMenu = REG_USER_MSG("ShowMenu", -1);
gmsgShake = REG_USER_MSG("ScreenShake", 6);
gmsgFade = REG_USER_MSG("ScreenFade", 10);
gmsgAmmoX = REG_USER_MSG("AmmoX", 2);
gmsgSendAudio = REG_USER_MSG("SendAudio", -1);
gmsgRoundTime = REG_USER_MSG("RoundTime", 2);
gmsgMoney = REG_USER_MSG("Money", 5);
gmsgArmorType = REG_USER_MSG("ArmorType", 1);
gmsgBlinkAcct = REG_USER_MSG("BlinkAcct", 1);
gmsgStatusValue = REG_USER_MSG("StatusValue", -1);
gmsgStatusText = REG_USER_MSG("StatusText", -1);
gmsgStatusIcon = REG_USER_MSG("StatusIcon", -1);
gmsgBarTime = REG_USER_MSG("BarTime", 2);
gmsgReloadSound = REG_USER_MSG("ReloadSound", 2);
gmsgCrosshair = REG_USER_MSG("Crosshair", 1);
gmsgNVGToggle = REG_USER_MSG("NVGToggle", 1);
gmsgRadar = REG_USER_MSG("Radar", 7);
gmsgSpectator = REG_USER_MSG("Spectator", 2);
gmsgVGUIMenu = REG_USER_MSG("VGUIMenu", -1);
gmsgTutorText = REG_USER_MSG("TutorText", -1);
gmsgTutorLine = REG_USER_MSG("TutorLine", -1);
gmsgTutorState = REG_USER_MSG("TutorState", -1);
gmsgTutorClose = REG_USER_MSG("TutorClose", -1);
gmsgAllowSpec = REG_USER_MSG("AllowSpec", 1);
gmsgBombDrop = REG_USER_MSG("BombDrop", 7);
gmsgBombPickup = REG_USER_MSG("BombPickup", 0);
gmsgSendCorpse = REG_USER_MSG("ClCorpse", -1);
gmsgHostagePos = REG_USER_MSG("HostagePos", 8);
gmsgHostageK = REG_USER_MSG("HostageK", 1);
gmsgHLTV = REG_USER_MSG("HLTV", 2);
gmsgSpecHealth = REG_USER_MSG("SpecHealth", 1);
gmsgForceCam = REG_USER_MSG("ForceCam", 3);
gmsgADStop = REG_USER_MSG("ADStop", 0);
gmsgReceiveW = REG_USER_MSG("ReceiveW", 1);
gmsgCZCareer = REG_USER_MSG("CZCareer", -1);
gmsgCZCareerHUD = REG_USER_MSG("CZCareerHUD", -1);
gmsgShadowIdx = REG_USER_MSG("ShadowIdx", 4);
gmsgTaskTime = REG_USER_MSG("TaskTime", 4);
gmsgScenarioIcon = REG_USER_MSG("Scenario", -1);
gmsgBotVoice = REG_USER_MSG("BotVoice", 2);
gmsgBuyClose = REG_USER_MSG("BuyClose", 0);
gmsgSpecHealth2 = REG_USER_MSG("SpecHealth2", 2);
gmsgBarTime2 = REG_USER_MSG("BarTime2", 4);
gmsgItemStatus = REG_USER_MSG("ItemStatus", 1);
gmsgLocation = REG_USER_MSG("Location", -1);
gmsgBotProgress = REG_USER_MSG("BotProgress", -1);
gmsgBrass = REG_USER_MSG("Brass", -1);
gmsgFog = REG_USER_MSG("Fog", 7);
gmsgShowTimer = REG_USER_MSG("ShowTimer", 0);
gmsgHudTextArgs = REG_USER_MSG("HudTextArgs", -1);
}
__________________
Last edited by Arkshine; 07-30-2018 at 15:30.
|
|