Server Time
#1

How can I make it so that players can only enter a building at certain hours on the server, EG: 6am - 6pm, can anyone help me?
Reply
#2

Lets put it this way. Okay, say I go up to an Enter Icon, and type /enter, but it's before 6:00 or past 18:00 it will say "Business Hours between 6:00 AM to 6:00 PM. Hope that helps.
Reply
#3

check this out man
https://sampwiki.blast.hk/wiki/GetPlayerTime
Reply
#4

Add under your /enter command:
pawn Код:
SetPlayerTime(playerid, 0, 0);
@sanandreas - https://sampwiki.blast.hk/wiki/SetPlayerTime, not GetPlayerTime.
Reply
#5

CalgonX, re-read his post.

OP: use the gettime() function. Then just do a check, very simple.

https://sampwiki.blast.hk/wiki/Gettime
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)