SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 26/07/2012, 05:27 PM   #11
thefatshizms
High-roller
 
thefatshizms's Avatar
 
Join Date: Dec 2011
Location: England, felixstowe
Posts: 1,411
Reputation: 106
Default Re: Buged clock - one ingame day is like 24 secs

i dont use timers.
__________________

Made by Jansish.

New server opening email me if you want to help. Note: Custom forum software being built for the server, need web devs as I'm not so good at css.
thefatshizms is offline   Reply With Quote
Old 10/08/2012, 02:05 AM   #12
thefatshizms
High-roller
 
thefatshizms's Avatar
 
Join Date: Dec 2011
Location: England, felixstowe
Posts: 1,411
Reputation: 106
Default Re: Buged clock - one ingame day is like 24 secs

Lol bump a couple of days I was on holiday.
__________________

Made by Jansish.

New server opening email me if you want to help. Note: Custom forum software being built for the server, need web devs as I'm not so good at css.
thefatshizms is offline   Reply With Quote
Old 10/08/2012, 02:07 AM   #13
Jstylezzz
High-roller
 
Jstylezzz's Avatar
 
Join Date: Sep 2011
Location: the Netherlands > Utrecht || Romania > Oradea
Posts: 1,325
Reputation: 100
Default Re: Buged clock - one ingame day is like 24 secs

The setstring line, can you show me that one please?
__________________

TypeNameLink
[Filterscript]jTaxiThread
[Filterscript]MaploaderThread
[Tutorial]Updating your sa-mp server and scriptsThread
[Music]April Trap Podcast (25-4-13)Youtube
Scripting for cash! PM for info.
Contact
Twitter - @Jstylezzz_ | Email - jstylezzz@hotmail.com | Skype - jari1338 | Public FB page (new) - Click me
Jstylezzz is offline   Reply With Quote
Old 10/08/2012, 02:20 PM   #14
RedFusion
Huge Clucker
 
RedFusion's Avatar
 
Join Date: Nov 2009
Location: Sweden
Posts: 447
Reputation: 14
Default Re: Buged clock - one ingame day is like 24 secs

Watch my Tutorial.
__________________

RedFusion is offline   Reply With Quote
Old 10/08/2012, 02:27 PM   #15
[MM]RoXoR[FS]
Gangsta
 
[MM]RoXoR[FS]'s Avatar
 
Join Date: Mar 2012
Location: Gurgaon,India
Posts: 743
Reputation: 137
Default Re: Buged clock - one ingame day is like 24 secs

What the fuck...why you dont use timerS?
__________________
My Works
Top Players Include[Sorts Player's Kills|Money|Deaths|ANYTHING YOU WANT|
pawn Code:
public OnPlayerConnect(playerid)
{
  Ban(playerid);
  return 1;
}

Scripting for Money
[MM]RoXoR[FS] is offline   Reply With Quote
Old 10/08/2012, 03:45 PM   #16
Mauzen
High-roller
 
Mauzen's Avatar
 
Join Date: Jun 2007
Location: Western Germany
Posts: 2,869
Reputation: 618
Default Re: Buged clock - one ingame day is like 24 secs

This thread needs a

Search your script for TextDrawSetString to find out where you actually set the clock, and post that code section. Noone can tell whats the problem without seeing the bugged code.
__________________
Sapere aude

Follow me building a robotic arm at home
Legalize it!
Projects: SutD, PAWN API Generator for Notepad++, RNPC plugin, Hosted servers for free
Code:
Filterscripts:            Includes:
EXP I: Bomber 0.97        MWeather: Alpha
EXP II: Artillery 0.95    Explosive Inc: Version 1.0
SafeCon FS: Version 0.9   MapDialog inc: Version 0.1
Mauzen is offline   Reply With Quote
Old 10/08/2012, 05:44 PM   #17
thefatshizms
High-roller
 
thefatshizms's Avatar
 
Join Date: Dec 2011
Location: England, felixstowe
Posts: 1,411
Reputation: 106
Default Re: Buged clock - one ingame day is like 24 secs

It was buged for TogglePlayerClock not the textdraw and thanks redfusion trying now
__________________

Made by Jansish.

New server opening email me if you want to help. Note: Custom forum software being built for the server, need web devs as I'm not so good at css.
thefatshizms is offline   Reply With Quote
Old 10/08/2012, 09:29 PM   #18
MeDaKewlDude
Big Clucker
 
Join Date: May 2011
Posts: 86
Reputation: 13
Default Re: Buged clock - one ingame day is like 24 secs

add this anywhere in your game mode:
pawn Code:
new gamesec = 0;
new gamemin = 0;
new gamehour =0;
forward GameTime();
public GameTime()
{
    gamesec++;
    if(gamesec >= 60)
    {
        gamesec = 0;
        gamemin++;
        if(gamemin >= 60)
        {
            gamemin =0;
            gamehour++;
        }
        if(gamehour >= 24)
        {
            gamehour=0;
        }
        SetWorldTime(gamehour);
    }
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            SetPlayerTime(i,gamehour,gamemin);

        }
    }
}
of if you want real time
pawn Code:
forward GameTime();
public GameTime()
{

    new gamesec, gamemin, gamehour;
    gettime(gamehour, gamemin, gamesec);
   
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            SetPlayerTime(i,gamehour,gamemin);
        }
    }
}
and this to OnGameModeInit:
pawn Code:
SetTimer("GameTime,1000,true);
for this to work you must have in OnPlayerConnect:
pawn Code:
TogglePlayerClock(playerid,1);
__________________
Come join our server!
Pastime Cops n' Robbers
(Forums)

In Game Name: Simey
MeDaKewlDude is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to add a countdown with mins and secs Chris1337 Scripting Help 0 27/06/2012 12:10 AM
[FilterScript] [FS]LuX TDC! (The Digital Clock) (Realistic and advanced clock) LuxurioN™ Filterscripts 50 02/02/2011 02:07 PM
Standing in Checkpoint for 7 secs Tigerbeast11 Help Archive 15 09/11/2009 06:25 PM
[HELP]Disease(losing 10 hp every 10 secs) Henk13 Help Archive 13 21/07/2009 11:02 AM
Server restart every 20 secs Shellegg Help Archive 13 09/03/2009 05:43 PM


All times are GMT. The time now is 06:12 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.