Server restart - 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)
+--- Thread: Server restart (
/showthread.php?tid=407316)
Server restart -
Private200 - 13.01.2013
I was wondering if there was a script like :
pawn Код:
public OnServerRestart(playerid)
witch would set the host name ( Server Name to something else ) like :
pawn Код:
public OnServerRestart(playerid)
SetHostName("International Trucking [Restarting ...]")
Any way to make something like this ?
Regards in advance
Re: Server restart -
u3ber - 13.01.2013
Quote:
Originally Posted by Private200
I was wondering if there was a script like :
pawn Код:
public OnServerRestart(playerid)
|
Код:
public OnGameModeInit()?
Quote:
Originally Posted by Private200
witch would set the host name ( Server Name to something else ) like :
SetHostName("International Trucking [Restarting ...]")
|
Код:
SendRconCommand("hostname International Trucking [Restarting ...]");
Re: Server restart -
LarzI - 13.01.2013
You could do
pawn Код:
public OnRconCommand(cmd[])
{
if( !strcmp( cmd, "gmx", true ))
{
SetHostName("International Trucking [Restarting ...]");
return true;
}
return false;
}
Re: Server restart -
LarzI - 13.01.2013
Quote:
Originally Posted by ******
OnRconCommand doesn't get sent "gmx" because it is processed by the server. Try OnGameModeExit, or use a custom "gmx" command.
|
Not even if you do /rcon gmx in-game?
Re: Server restart -
Private200 - 13.01.2013
Okay thanks for the information .