New Member
|
08-07-2011
, 16:45
Re: [L4D2] Automatic Campaign Switcher (ACS) [v1.2.2 (May 21, 2011)]
|
#40
|
Whenever the map changes, the loading screen has purple and black squares and it kicks everyone out of the game. When I try to rejoin the game, Left 4 Dead crashes with this error: map_loadmodelguts: map with no texinfo, (mapname)
("mapname" is the name of the map it was supposed to switch to).
Here is what I have written:
Quote:
#include <sourcemod>
#include <sdktools>
#define PLUGIN_VERSION "v1.2.2"
//Define the number of campaigns and maps in rotation
#define NUMBER_OF_CAMPAIGNS 30 /* CHANGE TO MATCH THE TOTAL NUMBER OF CAMPAIGNS */
#define NUMBER_OF_SCAVENGE_MAPS 13 /* CHANGE TO MATCH THE TOTAL NUMBER OF SCAVENGE MAPS */
//Define the wait time after round before changing to the next map in each game mode
#define WAIT_TIME_BEFORE_SWITCH_COOP 7.0
#define WAIT_TIME_BEFORE_SWITCH_VERSUS 6.0
#define WAIT_TIME_BEFORE_SWITCH_SCAVENGE 11.0
//Define Game Modes
#define GAMEMODE_UNKNOWN -1
#define GAMEMODE_COOP 0
#define GAMEMODE_VERSUS 1
#define GAMEMODE_SCAVENGE 2
#define GAMEMODE_SURVIVAL 3
#define DISPLAY_MODE_DISABLED 0
#define DISPLAY_MODE_HINT 1
#define DISPLAY_MODE_CHAT 2
#define DISPLAY_MODE_MENU 3
#define SOUND_NEW_VOTE_START "ui/pickup_misc42.wav"
#define SOUND_NEW_VOTE_WINNER "ui/helpful_event_1.wav"
//Global Variables
new g_iGameMode; //Integer to store the gamemode
new g_iRoundEndCounter; //Round end event counter for versus
new g_iCoopFinaleFailureCount; //Number of times the Survivors have lost the current finale
new g_iMaxCoopFinaleFailures = 5; //Amount of times Survivors can fail before ACS switches in coop
new bool:g_bFinaleWon; //Indicates whether a finale has be beaten or not
//Campaign and map strings/names
new String:g_strCampaignFirstMap[NUMBER_OF_CAMPAIGNS][32]; //Array of maps to switch to
new String:g_strCampaignLastMap[NUMBER_OF_CAMPAIGNS][32]; //Array of maps to switch from
new String:g_strCampaignName[NUMBER_OF_CAMPAIGNS][32]; //Array of names of the campaign
new String:g_strScavengeMap[NUMBER_OF_SCAVENGE_MAPS][32]; //Array of scavenge maps
new String:g_strScavengeMapName[NUMBER_OF_SCAVENGE_MAPS][32]; //Name of scaveenge maps
//Voting Variables
new bool:g_bVotingEnabled = true; //Tells if the voting system is on
new g_iVotingAdDisplayMode = DISPLAY_MODE_HINT; //The way to advertise the voting system
new Float:g_fVotingAdDelayTime = 1.0; //Time to wait before showing advertising
new bool:g_bVoteWinnerSoundEnabled = true; //Sound plays when vote winner changes
new g_iNextMapAdDisplayMode = DISPLAY_MODE_HINT; //The way to advertise the next map
new Float:g_fNextMapAdInterval = 600.0; //Interval for ACS next map advertisement
new bool:g_bClientShownVoteAd[MAXPLAYERS + 1]; //If the client has seen the ad already
new bool:g_bClientVoted[MAXPLAYERS + 1]; //If the client has voted on a map
new g_iClientVote[MAXPLAYERS + 1]; //The value of the clients vote
new g_iWinningMapIndex; //Winning map/campaign's index
new g_iWinningMapVotes; //Winning map/campaign's number of votes
new Handle:g_hMenu_Vote[MAXPLAYERS + 1] = INVALID_HANDLE; //Handle for each players vote menu
//Console Variables (CVars)
new Handle:g_hCVar_VotingEnabled = INVALID_HANDLE;
new Handle:g_hCVar_VoteWinnerSoundEnabled = INVALID_HANDLE;
new Handle:g_hCVar_VotingAdMode = INVALID_HANDLE;
new Handle:g_hCVar_VotingAdDelayTime = INVALID_HANDLE;
new Handle:g_hCVar_NextMapAdMode = INVALID_HANDLE;
new Handle:g_hCVar_NextMapAdInterval = INVALID_HANDLE;
new Handle:g_hCVar_MaxFinaleFailures = INVALID_HANDLE;
/*============================================ ==========================================
################## A C S M A P S T R I N G S #################
============================================= ===========================================
### ###
### *** EDIT THESE STRINGS TO CHANGE THE MAP ROTATIONS TO YOUR LIKING *** ###
### ###
============================================= ===========================================
### ###
### Note: The order these strings are stored is important, so make ###
### sure these match up or it will not work properly. ###
### ###
### Make all three of the string variables match, for example: ###
### ###
### Format(g_strCampaignFirstMap[1], 32, "c1m1_hotel"); ###
### Format(g_strCampaignLastMap[1], 32, "c1m4_atrium"); ###
### Format(g_strCampaignName[1], 32, "Dead Center"); ###
### ###
### Notice, all of the strings corresponding with [1] in the array match. ###
### ###
============================================= =========================================*/
SetupMapStrings()
{
//The following three variables are for all game modes except Scavenge.
//*IMPORTANT* Before editing these change NUMBER_OF_CAMPAIGNS near the top
//of this plugin to match the total number of campaigns or it will not
//loop through all of them when the check is made to change the campaign.
//First Maps of the Campaign
Format(g_strCampaignFirstMap[0], 32, "the_return_lvl1");
Format(g_strCampaignFirstMap[1], 32, "l4d2_base_east");
Format(g_strCampaignFirstMap[2], 32, "l4d_149_1");
Format(g_strCampaignFirstMap[3], 32, "bloodtracks_01");
Format(g_strCampaignFirstMap[4], 32, "eu01_residential_b12");
Format(g_strCampaignFirstMap[5], 32, "kokiri_forest");
Format(g_strCampaignFirstMap[6], 32, "l4d2_diescraper1_apartment_32");
Format(g_strCampaignFirstMap[7], 32, "lost01_club");
Format(g_strCampaignFirstMap[8], 32, "rh_map01");
Format(g_strCampaignFirstMap[9], 32, "l4d_dbd2dc_anna_is_gone");
Format(g_strCampaignFirstMap[10], 32, "l4d2_deadcity01_riverside");
Format(g_strCampaignFirstMap[11], 32, "aircrash");
Format(g_strCampaignFirstMap[12], 32, "l4d2_stadium1_apartment");
Format(g_strCampaignFirstMap[13], 32, "l4d_deathaboard01_prison");
Format(g_strCampaignFirstMap[14], 32, "wth_1");
Format(g_strCampaignFirstMap[15], 32, "gasfever_1");
Format(g_strCampaignFirstMap[16], 32, "hf01_theforest");
Format(g_strCampaignFirstMap[17], 32, "l4d_ihm01_forest");
Format(g_strCampaignFirstMap[18], 32, "2ee_01");
Format(g_strCampaignFirstMap[18], 32, "l4d2_wanli01");
Format(g_strCampaignFirstMap[20], 32, "city_02");
Format(g_strCampaignFirstMap[21], 32, "c8m1_apartment");
Format(g_strCampaignFirstMap[22], 32, "c1m1_hotel");
Format(g_strCampaignFirstMap[23], 32, "c7m1_docks");
Format(g_strCampaignFirstMap[24], 32, "c6m1_riverbank");
Format(g_strCampaignFirstMap[25], 32, "c2m1_highway");
Format(g_strCampaignFirstMap[26], 32, "c3m1_plankcountry");
Format(g_strCampaignFirstMap[27], 32, "c4m1_milltown_a");
Format(g_strCampaignFirstMap[28], 32, "c5m1_waterfront");
Format(g_strCampaignFirstMap[29], 32, "c13m1_alpinecreek");
//Last Maps of the Campaign
Format(g_strCampaignLastMap[0], 32, "the_return_lvl5");
Format(g_strCampaignLastMap[1], 32, "l4d2_base_south");
Format(g_strCampaignLastMap[2], 32, "l4d_149_5");
Format(g_strCampaignLastMap[3], 32, "bloodtracks_03");
Format(g_strCampaignLastMap[4], 32, "eu05_train_b12");
Format(g_strCampaignLastMap[5], 32, "kokiri_forest");
Format(g_strCampaignLastMap[6], 32, "l4d2_diescraper4_top_32");
Format(g_strCampaignLastMap[7], 32, "lost04");
Format(g_strCampaignLastMap[8], 32, "rh_map05");
Format(g_strCampaignLastMap[9], 32, "l4d_dbd2dc_undead_center");
Format(g_strCampaignLastMap[10], 32, "l4d2_deadcity06_station");
Format(g_strCampaignLastMap[11], 32, "rivermotel");
Format(g_strCampaignLastMap[12], 32, "l4d2_stadium5_stadium");
Format(g_strCampaignLastMap[13], 32, "l4d_deathaboard05_light");
Format(g_strCampaignLastMap[14], 32, "wth_5");
Format(g_strCampaignLastMap[15], 32, "gasfever_3");
Format(g_strCampaignLastMap[16], 32, "hf04_escape");
Format(g_strCampaignLastMap[17], 32, "l4d_ihm05_lakeside");
Format(g_strCampaignLastMap[18], 32, "2ee_06");
Format(g_strCampaignLastMap[19], 32, "l4d2_wanli03");
Format(g_strCampaignLastMap[20], 32, "port_01");
Format(g_strCampaignLastMap[21], 32, "c8m5_rooftop");
Format(g_strCampaignLastMap[22], 32, "c1m4_atrium");
Format(g_strCampaignLastMap[23], 32, "c7m3_port");
Format(g_strCampaignLastMap[24], 32, "c6m3_port");
Format(g_strCampaignLastMap[25], 32, "c2m5_concert");
Format(g_strCampaignLastMap[26], 32, "c3m4_plantation");
Format(g_strCampaignLastMap[27], 32, "c4m5_milltown_escape");
Format(g_strCampaignLastMap[28], 32, "c5m5_bridge");
Format(g_strCampaignLastMap[29], 32, "c13m4_cutthroatcreek");
//Campaign Names
Format(g_strCampaignName[0], 32, "The Return Escape From Lousiana");
Format(g_strCampaignName[1], 32, "Stenches");
Format(g_strCampaignName[2], 32, "One 4 Nine");
Format(g_strCampaignName[3], 32, "Blood Tracks");
Format(g_strCampaignName[4], 32, "Tour of Terror");
Format(g_strCampaignName[5], 32, "Kokiri Forest");
Format(g_strCampaignName[6], 32, "Diescraper");
Format(g_strCampaignName[7], 32, "lost");
Format(g_strCampaignName[8], 32, "Run to The Hills");
Format(g_strCampaignName[9], 32, "Dead Before Dawn DC");
Format(g_strCampaignName[10], 32, "Dead City II");
Format(g_strCampaignName[11], 32, "Heaven Can Wait II");
Format(g_strCampaignName[12], 32, "Suicide Blitz 2");
Format(g_strCampaignName[13], 32, "Death Aboard 2");
Format(g_strCampaignName[14], 32, "Welcome To Hell");
Format(g_strCampaignName[15], 32, "Gas Fever");
Format(g_strCampaignName[16], 32, "Haunted Forest");
Format(g_strCampaignName[17], 32, "I Hate Mountains");
Format(g_strCampaignName[18], 32, "Two Evil Eyes");
Format(g_strCampaignName[19], 32, "Wan Li");
Format(g_strCampaignName[20], 32, "Dead destination");
Format(g_strCampaignName[21], 32, "No Mercy");
Format(g_strCampaignName[22], 32, "Dead Center");
Format(g_strCampaignName[23], 32, "The Sacrifice");
Format(g_strCampaignName[24], 32, "The Passing");
Format(g_strCampaignName[25], 32, "Dark Carnival");
Format(g_strCampaignName[26], 32, "Swamp Fever");
Format(g_strCampaignName[27], 32, "Hard Rain");
Format(g_strCampaignName[28], 32, "The Parish");
Format(g_strCampaignName[29], 32, "Cold Stream");
|
|
|