diff --git a/plugins/L4D2Tools.smx b/plugins/L4D2Tools.smx index 9b252f8..c5ad3e0 100644 Binary files a/plugins/L4D2Tools.smx and b/plugins/L4D2Tools.smx differ diff --git a/plugins/sm_player_notes.smx b/plugins/sm_player_notes.smx index 2443906..e8d6f07 100644 Binary files a/plugins/sm_player_notes.smx and b/plugins/sm_player_notes.smx differ diff --git a/scripting/L4D2Tools.sp b/scripting/L4D2Tools.sp index da10aee..06abeba 100644 --- a/scripting/L4D2Tools.sp +++ b/scripting/L4D2Tools.sp @@ -146,9 +146,9 @@ public void OnPluginStart() { RegAdminCmd("sm_model", Command_SetClientModel, ADMFLAG_KICK); RegAdminCmd("sm_surv", Cmd_SetSurvivor, ADMFLAG_KICK); RegAdminCmd("sm_respawn_all", Command_RespawnAll, ADMFLAG_CHEATS, "Makes all dead players respawn in a closet"); - RegAdminCmd("sm_playsound", Command_PlaySound, ADMFLAG_CHEATS, "Plays a gamesound for player"); - RegAdminCmd("sm_stopsound", Command_StopSound, ADMFLAG_CHEATS, "Stops the last played gamesound for player"); - RegAdminCmd("sm_swap", Command_SwapPlayer, ADMFLAG_CHEATS, "Swarms two player's locations"); + RegAdminCmd("sm_playsound", Command_PlaySound, ADMFLAG_KICK, "Plays a gamesound for player"); + RegAdminCmd("sm_stopsound", Command_StopSound, ADMFLAG_GENERIC, "Stops the last played gamesound for player"); + RegAdminCmd("sm_swap", Command_SwapPlayer, ADMFLAG_KICK, "Swarms two player's locations"); RegAdminCmd("sm_perm", Command_SetServerPermissions, ADMFLAG_KICK, "Sets the server's permissions."); RegAdminCmd("sm_perms", Command_SetServerPermissions, ADMFLAG_KICK, "Sets the server's permissions."); RegAdminCmd("sm_permissions", Command_SetServerPermissions, ADMFLAG_KICK, "Sets the server's permissions."); @@ -304,7 +304,7 @@ public Action Command_SwapPlayer(int client, int args) { client, target_list, 1, - COMMAND_FILTER_CONNECTED, + COMMAND_FILTER_CONNECTED | COMMAND_FILTER_NO_IMMUNITY, target_name, sizeof(target_name), tn_is_ml)) <= 0) @@ -321,7 +321,7 @@ public Action Command_SwapPlayer(int client, int args) { client, target_list, 1, - COMMAND_FILTER_CONNECTED, + COMMAND_FILTER_CONNECTED | COMMAND_FILTER_NO_IMMUNITY, target_name, sizeof(target_name), tn_is_ml)) <= 0) @@ -649,7 +649,7 @@ public void OnClientPutInServer(int client) { public void OnClientDisconnect(int client) { isHighPingIdle[client] = false; iHighPingCount[client] = 0; - if(IsClientConnected(client) && IsClientInGame(client) && botDropMeleeWeapon[client] > -1) { + if(IsClientConnected(client) && IsClientInGame(client) && botDropMeleeWeapon[client] > -1 && IsValidEntity(botDropMeleeWeapon[client])) { float pos[3]; GetClientAbsOrigin(client, pos); TeleportEntity(botDropMeleeWeapon[client], pos, NULL_VECTOR, NULL_VECTOR); @@ -692,6 +692,8 @@ public void OnMapStart() { PrecacheSound("custom/xen_teleport.mp3"); AddFileToDownloadsTable("sound/custom/mariokartmusic.mp3"); PrecacheSound("custom/mariokartmusic.mp3"); + AddFileToDownloadsTable("sound/custom/spookyscaryskeletons.mp3"); + PrecacheSound("custom/spookyscaryskeletons.mp3"); HookEntityOutput("info_changelevel", "OnStartTouch", EntityOutput_OnStartTouchSaferoom); HookEntityOutput("trigger_changelevel", "OnStartTouch", EntityOutput_OnStartTouchSaferoom); diff --git a/scripting/sm_player_notes.sp b/scripting/sm_player_notes.sp index 81337e9..4f78f18 100644 --- a/scripting/sm_player_notes.sp +++ b/scripting/sm_player_notes.sp @@ -195,7 +195,7 @@ bool ConnectDB() { public void Event_FirstSpawn(Event event, const char[] name, bool dontBroadcast) { int client = GetClientOfUserId(event.GetInt("userid")); if(client > 0 && client <= MaxClients && !IsFakeClient(client)) { - char auth[32]; + static char auth[32]; GetClientAuthId(client, AuthId_Steam2, auth, sizeof(auth)); DB.Format(query, sizeof(query), "SELECT notes.content, stats_users.last_alias FROM `notes` JOIN stats_users ON markedBy = stats_users.steamid WHERE notes.`steamid` = '%s'", auth); DB.Query(DB_FindNotes, query, GetClientUserId(client));