RSSy MYGO.pl Opublikowano Czerwiec 16, 2024 o 20:02 RSSy Udostępnij Opublikowano Czerwiec 16, 2024 o 20:02 Description This plugin uses HookEvent("player_team") and grabs their new (and old) team. If their team is 0, they aren't fully-loaded. If their team is 1, they are loaded but haven't been assigned a team yet because other players are still loading (or are about to be assigned a team). Once players have been assigned to team 2 (survivors) or team 3 (infected), they are fully past the loading screen and can see chat. This plugin then displays a message to them. This plugin should be compatible with competitive L4D2 servers as well. By default, this prints 2 messages to each player individual, translated to their language provided in the phrases file. You also have an option to make it print every map, or just on the very first time they connect to the server. Once they disconnect, they'll see the welcome message again. An autoexec is created in cfg/sourcemod for this plugin.Cvarspcs_everymap "1" // Whether to print every map. pcs_lines "2" // How many lines to print. Other plugins use things like player_connect, player_spawn, or OnClientPutInServer(), etc. Some of these fire multiple times in L4D2 especially during map changes, and don't cover the initial time everyone is loading in from a lobby where load times and connections vary. As well, things like OnClientPutInServer() will fire before a client finishes loading.Compiling In order to compile, you will need colors.inc ->https://forums.alliedmods.net/showthread.php?t=96831Installation You don't need to mess with any of the code to change the messages in the translation files.pcsWelcome.smx -> addons/sourcemod/pluginspcswelcome.phrases.txt -> addons/sourcemod/translationsChangelog: Code: 1.0 (July 16th - 2024) - Initial release.Additional This is a very simple plugin. While I plan to add to it, the whole point of it is for others to build on it and tailor it to their own liking. You can increase the amount of lines by changing a few things in a few places easily. The plugin also should work for Left4Dead1, but I do not have a server setup to test these so if you want you can remove the public APLRes AskPluginLoad2 at the top to let it load. Attached Files Get Plugin or Get Source (pcsWelcome.sp - 2.7 KB) pcswelcome.phrases.txt (549 Bytes) pcsWelcome.smx (7.1 KB) Wyświetl pełny artykuł Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi