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.
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.