Problem
#1

hi how can I make an happy hour timer? I mean with setplayerworldtime,so from 5pm to 8pm to give 2 respect + and 1 respect during other hours
Reply
#2

Hello!

You can use gettime(); to check if the time is between 5pm and 8pm.
PHP код:
new hour,minute,seconds;
gettime(hour,minute,seconds);
if(
hour >= 17 && hour <= 20)
{
        
//between 5pm and 8pm

Do you mean it like this?
Reply
#3

yes and how can I make so else to show a message..after hour 8 to give a message..
Reply
#4

You should use SendClientMessageToAll(-1, "Happy hour over! It's 08:00 now!");

After if(hour = 20 );


(Re write it)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)