Setplayertime onspawn - 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: Setplayertime onspawn (
/showthread.php?tid=255958)
Setplayertime onspawn -
Admigo - 18.05.2011
Heey guys,
I made a gametime from every minute is 1 hour. But when a players dies the time second is set on 00.
Is there anyway to get the seconds?
Here is my timer:
Код:
//ongamemodeinit
SetTimer("TimeWorld",60000,1);//chnge
public TimeWorld(playerid)
{
if(gameweek == 2)//gametime == 0 && gameday == 1
{
GameTextForAll("Changing Cities! Please Wait!",6000,1);
SendRconCommand("gmx");
}
gametime++;
if(gametime >= 24)
{
gametime =0;
}
if(gametime == 0)
{
gameday ++;
}
for(new i=0; i < MAX_PLAYERS; i++)
{
SetPlayerTime(i,gametime,0);
}
new string[30];
SetWorldTime(gametime);
format(string, sizeof(string), "[GAME TIME] %d:00", gametime);
SendClientMessageToAll(COLOR_WHITE, string);
Re: Setplayertime onspawn -
Admigo - 18.05.2011
Ooh yeah onplayerspawn
SetPlayerTime(playerid,gametime,0);//i need to change the 0 in getseconds but how?
Pls help.
[ACNR]Admigo