SEBA18293 Posted August 14, 2013 Posted August 14, 2013 Witajcie, gdy zrobiłem krótki skrypt na czas gry, to gdy wejdzie gracz na serwer, zaloguje się, wybierze skin, ustawia mu czas gry na 10-20 minut zamiast na 0. O to kod: czasGry = getTickCount() local gameTime = czasGry+getTickCount() local gameTimeS = math.floor(gameTime/1000) playerGameTime = math.floor(gameTimeS/60+1)
Wielebny Posted August 14, 2013 Posted August 14, 2013 Prawdopodobnie przez to - z niewiadomej przyczyny do zapisanego wcześniej getTickCount() dodajesz znowu czas. local gameTime = czasGry+getTickCount() BestPlay LSS-RP PYLife
SEBA18293 Posted August 15, 2013 Author Posted August 15, 2013 Zamieniłem to na local gameTime = getTickCount() local gameTimeS = math.floor(gameTime/1000) playerGameTime = math.floor(gameTimeS/60+1) i teraz zaczyna od 5-10
Wojak Posted August 16, 2013 Posted August 16, 2013 Moim zdaniem to powinno być tak: local gameTime0 = getTickCount() -- ta linijka wykonywana tylko raz, gdy gracz wejdzie na serwer local gameTime = getTickCount() - gameTime0 -- ta linijka i te poniżej wykonywane gdy potrzeba sprawdzić jak długo gracz jest na serwerze local gameTimeS = math.floor(gameTime/1000) playerGameTime = math.floor(gameTimeS/60+1) create your teleports and interiors in MTA map editor want more excitment in your race map? - add a killer bot you may also add some peds (NPC) - CARMAGEDDON STYLE! 2paq MTA:SA Race Server
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now