Log in

View Full Version : SetServerName() Not Working



Haku
07-02-2011, 05:56 PM
I've tried to set the name of the server using SetServerName(), but it doesn't seem to be working. The name of the server always appears as "Vault-Tec Muliplayer Mod Server". Am I doing something wrong?

My script:


#include <vaultmp>

main()
{
timestamp();
print("Welcome to Haku's Fallout 3 Wasteland Server.\n", 1, -1, 1);

new name[32] = "Haku's Fallout 3 Wasteland Server";

new map[32];
if (!IsNewVegas())
map = "the wasteland";
else
map = "mojave desert";

new rule[16] = "version";
new value[16] = "0.1a";

SetServerName(name);
SetServerMap(map);
SetServerRule(rule, value);
}

public OnClientAuthenticate(clientID, const name[], const pwd[])
{
timestamp();
printf("OnClientAuthenticate: ID: %d name: %s, pwd: %s\n", clientID, name, pwd);
return 1;
}

public OnClientRequestGame(clientID, savegame[], len)
{
timestamp();
printf("OnClientRequestGame: ID: %d savegame: %s\n", clientID, savegame);
return 1;
}

public OnPlayerJoin(clientID)
{
timestamp();
new name[32];
GetPlayerName(clientID, name);
printf("OnPlayerJoin: ID: %d name: %s\n", clientID, name);
return 1;
}

public OnPlayerDeath(clientID)
{
timestamp();
new name[32]; new str[64];
GetPlayerName(clientID, name);
strformat(str, sizeof(str), false, "OnPlayerDeath: %s died\n", name);
print(str, 1, -1, 1);
return 1;
}

public OnPlayerDisconnect(clientID)
{
timestamp();
new name[32];
GetPlayerName(clientID, name);
printf("OnPlayerDisconnect: ID: %d name: %s\n", clientID, name);
return 1;
}


And yes, I've tried using a name that doesn't have an apostrophe in it.

Haku
07-02-2011, 06:04 PM
I solved the problem. I needed to specify what script I wanted to use to the server. ;)

NemesiS
07-03-2011, 12:41 PM
i see your server in the list... :)
at the moment there are only 4 server, the mine, your server and the other two test servers XD