Server_Name - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Server_Name (
/showthread.php?tid=159386)
Server_Name -
Master™ - 13.07.2010
Ok i tried
Код:
#define SERVER_NAME "••• Violated Roleplay •••"
It doesnt work?
Re: Server_Name -
MikkelGutten - 13.07.2010
Give us the rest of the code? Where you use the SERVER_NAME.
Re: Server_Name -
Master™ - 13.07.2010
At the beginning
What do you mean the rest of the code? Is there suppose to be more for it?
Код:
#include <a_samp>
#include <core>
#include <float>
#include <time>
#include <file>
#include <utils>
#include <morphinc>
#include <a_npc>
#include <streamer>
static gTeam[MAX_PLAYERS];
//===============================[MAIN SETTINGS]================================================
#define SERVER_NAME "Violated Roleplay" // This is what the hostname/servername will be set to.
#define Version "4.8" // Script Version
//==============================================================================================
Re: Server_Name -
Sergei - 13.07.2010
under OnGameModeInit add this:
pawn Код:
SendRconCommand("hostname "SERVER_NAME);
Or just set hostname in server.cfg.
Re: Server_Name -
Master™ - 13.07.2010
Ok, No i cant use bullets in "server.cfg" lol
Re: Server_Name -
Master™ - 13.07.2010
Quote:
Originally Posted by Sergei
under OnGameModeInit add this:
pawn Код:
SendRconCommand("hostname "SERVER_NAME);
Or just set hostname in server.cfg.
|
Would it not be
pawn Код:
SendRconCommand("hostname SERVER_NAME");
intead of:
pawn Код:
SendRconCommand("hostname "SERVER_NAME);
Re: Server_Name -
[DK]JaloNik - 13.07.2010
Lol, bullets in the server cfg? wtf is that? :P
Re: Server_Name -
Master™ - 13.07.2010
Quote:
Originally Posted by [DK]JaloNik
Lol, bullets in the server cfg? wtf is that? :P
|
Ok in server.cfg you hostname can look like this: Violated Roleplay
With it being in the gamemode it can look like this: ••• Violated Roleplay •••
Re: Server_Name -
MikkelGutten - 13.07.2010
pawn Код:
new SendCommand[128]; // I don't want to count the letters, do it yourself
format(SendCommand, sizeof(SendCommand), "hostname %s", SERVER_NAME); // Format the command into a string.
SendRconCommand(SendCommand); // Execute the command through Rcon.
Re: Server_Name -
Lorenc_ - 13.07.2010
pawn Код:
SendRconCommand("hostname " #SERVER_NAME "");
That should work fine.