[HELP] How to Create "Server Restart Command" ?
#1

How to create command for server restart, help me, pls
Reply
#2

Код:
CMD:gmx(playerid, params[])
{
    OnGameModeExit();
    return 1;
}
Reply
#3

Use
PHP код:
CMD:gmx(plateridparams[])
//you can use     if(IsPlayerAdmin(playerid)) here
{
SendRconCommand("gmx");
return 
1;

Quote:
Originally Posted by anassmaroc
Посмотреть сообщение
Код:
CMD:gmx(playerid, params[])
{
    OnGameModeExit();
    return 1;
}
Sometime it not work. If there nothing in OnGameModeExit , the server will not restart or can crash the server
Reply
#4

Quote:
Originally Posted by anassmaroc
Посмотреть сообщение
Код:
CMD:gmx(playerid, params[])
{
    OnGameModeExit();
    return 1;
}
That would just call whats inside:
PHP код:
public OnGameModeExit() { 
    
printf("I'm exiting");
    return 
1;

Then it would just print I'm exiting nothing else.
@OP Read @SoFahim's answer.
Reply
#5

The irony is that there's an actual native for that: https://sampwiki.blast.hk/wiki/GameModeExit
Reply
#6

Quote:
Originally Posted by Vince
Посмотреть сообщение
The irony is that there's an actual native for that: https://sampwiki.blast.hk/wiki/GameModeExit
Wait does that restart or just exits ?, or exit and loads the next, if none then load the same one ?
And what differs this from "gmx" ?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)