How To Change Server Time To Midnight
#1

Can Someone help me ?
Reply
#2

https://sampwiki.blast.hk/wiki/SetPlayerTime

Something I made quickly with pawno as an example:

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/time", cmdtext, true, 10) == 0)
	{
		SetPlayerTime(playerid,0,0);
		return 1;
	}
	return 0;
}
Or as vincent said, this is usefull too to set it for all
https://sampwiki.blast.hk/wiki/SetWorldTime
Reply
#3

Quote:
Originally Posted by GNGification
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/SetPlayerTime

Something I made quickly with pawno as an example:

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/time", cmdtext, true, 10) == 0)
	{
		SetPlayerTime(playerid,0,0);
		return 1;
	}
	return 0;
}
Take note that ^^ changes the player's time.

Код:
SetWorldTime(0);
Sets the server time instead.
Reply
#4

Thanks You both im new in Scripting
Reply
#5

Quote:
Originally Posted by Awankz
Посмотреть сообщение
Thanks You both im new in Scripting
You are very welcome, be sure to read the wiki's and if you ever need any help we are right here if you need anything.
Reply
#6

ok thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)