Thread: delete
View Single Post
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 09-16-2020 , 16:13   Re: need Auto Change HostName in spesific maps
Reply With Quote #4

Quote:
Originally Posted by talnaim9999 View Post
Hello AM
im looking for a plugin to change hostname automatic when i change some spesific map

for example im create amxmodx/confings/maps/plugins-surf.ini

so the deafult hostname in server.cfg so i want when i change for example to surf , hostname change to name I choose.

https://forums.alliedmods.net/showthread.php?t=114858
i found this
and try this

Code:
#include <amxmodx>
 
public plugin_init()
{
	 register_logevent("SetName", 2, "1=Round_Start")  
}
 
public SetName()
{
	server_cmd("amx_cvar hostname some host name here")
}
but has some problems
first its write only the first word
and its spam in console every 3-4 min "change host name ...."

so i want when im run the plugin only when map change its change the name
and enough..

maybe for ur guys has other way more simple with one plugin so...

thansk!
Don't put maps tag in .ini file or all maps those have that tag, server name will be changing on them
Tag: "de_ - cs_ - zm_ - bb"
P.s: Not Tested
Attached Files
File Type: sma Get Plugin or Get Source (MapNameChanger.sma - 96 views - 1.1 KB)
File Type: ini MapNameChanger.ini (5 Bytes, 24 views)

Last edited by Supremache; 09-16-2020 at 16:16.
Supremache is offline