Change The name of the server?
#1

Hey , Im only asking if there is a Gamemode code to change the name of the server in SAMP list, (not in Server.cfg but in the gamemode).
thanks.
Reply
#2

Something like this?
pawn Код:
SendRconCommand( "hostname name" );
Reply
#3

Код:
#define NAME "Servername"
Код:
SendRconCommand("hostname "NAME"");
Reply
#4

Yeah like this , I tried it but doesnt work , what should I write in Server.cfg as hostname?
EDIT: Black : How Can I use it ? I mean , should I change servername or ..?
Reply
#5

Ah ok , tried to put the name of my server in "Servername" but I Get 2 errors once I put the define line , errors : like -bad params and string thing...

Anyone to help me how to use the Rcon command?
Reply
#6

PHP код:
stock ChangeServerName(name[])
{
    new 
rconCMD[50];
    
format(rconCMDsizeof(rconCMD), "hostname %s"name);
    return 
SendRconCommand(rconCMD);

Reply
#7

Quote:
Originally Posted by Saw®
Посмотреть сообщение
Yeah like this , I tried it but doesnt work , what should I write in Server.cfg as hostname?
EDIT: Black : How Can I use it ? I mean , should I change servername or ..?
When you will that your Servername is on your Gamemode, without that you must change it on the server.cfg, then you can.
Reply
#8

To well Understand , I have in server.cfg :

Код:
hostname Los Santos [DM]
and I have a map change system every time the map change I want to write as server name
Код:
hostname Los Santos [DM] [map 1/3]
then next map change it to [mapx/3]...
Reply
#9

When the map changes, just do

pawn Код:
SendRconCommand("Los Santos [DM] [map (number)/3]");
Reply
#10

thanks for your repply,Tried it but doesnt work... the hostname in Sa-mp Client stay the written one in Server.CFG
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)