At the top of your script, below the includes put this
Inside OnGameModeInit put this
PHP код:
SetTimer("ThreeOClockPartyTimeR", 5000, true);
PartyTime = 0;
Add this to the very bottom
PHP код:
forward ThreeOClockPartyTimeR();
public ThreeOClockPartyTimeR()
{
new hour, minute, second;
gettime(hour, minute, second);
printf("%i %i %i",hour, minute, second);
if(hour == 15 && minute < 1 && PartyTime == 0)
{
PartyTime = 1;
SendClientMessageToAll(-1, "It is currently 1500 server time in UNIX and u know what that means *wink wink* MINIGUNS");
SendClientMessageToAll(-1, "It has been some time since 1th of January 1970 and I thought we'd all appriciate that");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GivePlayerWeapon(i, 38, 200);
SetPlayerVelocity(i,0.0, 0.0, 0.3);
PlayerPlaySound(i, 3201, 0.0, 0.0, 0.0);
GameTextForPlayer(i, "1500 - ohh yeah!", 8000, 1);
}
}
}
if(hour == 1)
{
PartyTime = 0;
}
}
However, if you meant worldtime there is no function to get it, so you will have to construct your own time system.
https://sampforum.blast.hk/showthread.php?tid=282260
Then you would have to make the party arrangements whenever the hour is 15