littlewhitey's - 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: littlewhitey's (
/showthread.php?tid=232761)
littlewhitey's -
=WoR=Mitch - 28.02.2011
How to make the host name change to diffrent names
Eg:
HostName:
littlewhitey's: Deathmatch/Freeroam/Race
littlewhitey's: SAMP's First server
littlewhitey's: Home to LW_LVDM
all just goes through a 3 tittle cyclone. I have tried to find the script for it but have been unsuccessful, does and one have any tips Please post...
Thanks,
Elite RolePlay[EAGames]
Re: littlewhitey's -
Simon - 28.02.2011
Straight from the code itself (with some minor edits

)
pawn Код:
forward ScriptSync();
public OnGameModeInit()
{
// Run the script synching function.
SetTimer("ScriptSync", 999, 1);
return 1;
}
public ScriptSync()
{
ChangeMetaData();
// ...
}
/*
<summary>
This function updates the metadata for the server. It currently
updates the server name from a random list of pre-set names.
</summary>
*/
stock ChangeMetaData()
{
// The string initialized into this is the prefix
// for the hostname. It's constant (the text "hostname"
// must be included)
new
szOutput[128] = "hostname SomeServer: ";
// These are the possible subtitles that appear in
// the format of: "prefix subtitle"
// e.g [0.3b] SomeServer: rawr
static
a_szServerSubs[][] = {
"PICK",
"A",
"RANDOM",
"SUBTITLE"
};
// Add the subtitle to the prefix, which will be the command
// we want to run on the server.
strcat(szOutput, a_szServerSubs[random(sizeof(a_szServerSubs))]);
// Run the command with the new string!
SendRconCommand(szOutput);
}
Re: littlewhitey's -
=WoR=Mitch - 28.02.2011
THANK YOU SO MUCH <3