SA-MP Forums Archive
Help with gametime - 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: Help with gametime (/showthread.php?tid=236250)



Help with gametime - BASITJALIL - 07.03.2011

Hello every one
I M Making a server that have alot of mini-missions
I Also have alot gamemode
I Wanna do after 10 mint server restart
How can i do it?
Also the team who have more score then the other will get +10 score and A Message"Missions Passed"
The Other "Mission Failed"
Thx


Re: Help with gametime - Stigg - 07.03.2011

Try doing something like this:

pawn Code:
SetTimer("AutoRestart",SET_TO_YOUR_TIME,0);
pawn Code:
forward AutoRestart();
public AutoRestart()
{
        print("Restarting..");
        SendRconCommand("gmx");
        return 1;
}



Re: Help with gametime - BASITJALIL - 07.03.2011

Thx I'll try


Re: Help with gametime - Stigg - 07.03.2011

Quote:
Originally Posted by BASITJALIL
View Post
Thx I'll try
No prob's.


Re: Help with gametime - BASITJALIL - 07.03.2011

pawn Code:
D:\Pawno\gamemodes\Gimmethesniper.pwn(311) : warning 225: unreachable code
D:\Pawno\gamemodes\Gimmethesniper.pwn(311) : error 029: invalid expression, assumed zero
D:\Pawno\gamemodes\Gimmethesniper.pwn(311) : error 017: undefined symbol "AutoRestart"
D:\Pawno\gamemodes\Gimmethesniper.pwn(312) : warning 217: loose indentation
D:\Pawno\gamemodes\Gimmethesniper.pwn(312) : error 029: invalid expression, assumed zero
D:\Pawno\gamemodes\Gimmethesniper.pwn(312) : error 017: undefined symbol "AutoRestart"
D:\Pawno\gamemodes\Gimmethesniper.pwn(318) : error 030: compound statement not closed at the end of file (started at line 310)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.



Re: Help with gametime - Stigg - 07.03.2011

Show us your code ?


Re: Help with gametime - BASITJALIL - 07.03.2011

SetTimer("AutoRestart", 600000, 0);
Its under
public OnGameModeInit()
(
//Class
Then its
and
forward AutoRestart();
public AutoRestart()
{
print("Restarting..");
SendRconCommand("gmx");
return 1;
}
On last line


Re: Help with gametime - titanak - 07.03.2011

Quote:
Originally Posted by BASITJALIL
View Post
SetTimer("AutoRestart", 600000, 0);
Its under
public OnGameModeInit()
(
//Class
Then its
and
forward AutoRestart();
public AutoRestart()
{
print("Restarting..");
SendRconCommand("gmx");
return 1;
}
On last line
pawn Code:
// put this somewhere in your script . ( dont put it in the OngameModeInit Function! )

forward AutoRestart();
public AutoRestart()
{
        print("Restarting..");
        SendRconCommand("gmx");
        return 1;
}

// this one put under the gamemode:

SetTimer("AutoRestart",600000,0);
Example:

pawn Code:
public OnGameModeInit()
{
SetTimer("AutoRestart",600000,0);

return 1;
}

// and now comes after bracalet the function..

forward AutoRestart();
public AutoRestart()
{
        print("Restarting..");
        SendRconCommand("gmx");
        return 1;
}



Re: Help with gametime - titanak - 07.03.2011

Quote:
Originally Posted by titanak
View Post
pawn Code:
// put this somewhere in your script . ( dont put it in the OngameModeInit Function! )

forward AutoRestart();
public AutoRestart()
{
        print("Restarting..");
        SendRconCommand("gmx");
        return 1;
}

// this one put under the gamemode:

SetTimer("AutoRestart",600000,0);
Example:

pawn Code:
public OnGameModeInit()
{
SetTimer("AutoRestart",600000,0);

return 1;
}
// thats all

// and now comes after bracalet the function..

forward AutoRestart();
public AutoRestart()
{
        print("Restarting..");
        SendRconCommand("gmx");
        return 1;
}
all all al

ro2323


Re: Help with gametime - Stigg - 07.03.2011

To late...lolz