SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 20/07/2012, 03:25 PM   #41
Pedrex
Little Clucker
 
Join Date: Jul 2012
Posts: 6
Reputation: 0
Default Re: CTime Library

Quote:
I can't handle this error:

Quote:
pawno\include\ctime.inc(33) : error 025: function heading differs from prototype
Any help?
Help me...
Pedrex is offline   Reply With Quote
Old 20/07/2012, 03:55 PM   #42
Terminator3
Big Clucker
 
Terminator3's Avatar
 
Join Date: Oct 2009
Posts: 70
Reputation: 25
Default Re: CTime Library

Quote:
Originally Posted by Reboma View Post
Is it possible to convert time to unix time, like strtotime in PHP?
So "2012-05-30 23:59:59" to 123456789 ?
Try mktime

Quote:
Originally Posted by Pedrex View Post
Quote:
I can't handle this error:

Quote:
pawno\include\ctime.inc(33) : error 025: function heading differs from prototype
Any help?
Help me...
You can't use dutils.inc or function at the same name (mktime)
__________________
sorry for my bad English
Terminator3 is offline   Reply With Quote
Old 20/07/2012, 05:34 PM   #43
Euan Hughes
Big Clucker
 
Join Date: Apr 2012
Posts: 154
Reputation: 1
Default Re: CTime Library

How would i do something like this

pawn Code:
if(weekday == Firday)
{
        SendClientMessage(playerid, WHITE, "");
}

Please help

Thanks
Euan Hughes is offline   Reply With Quote
Old 20/07/2012, 05:48 PM   #44
Terminator3
Big Clucker
 
Terminator3's Avatar
 
Join Date: Oct 2009
Posts: 70
Reputation: 25
Default Re: CTime Library

pawn Code:
new tm <YourVarName>;
localtime(time(), YourVarName);
if(YourVarName[tm_wday] == 5)
{
    SendClientMessage(playerid, WHITE, "");
}
__________________
sorry for my bad English
Terminator3 is offline   Reply With Quote
Old 01/01/2013, 01:36 PM   #45
steki.
High-roller
 
steki.'s Avatar
 
Join Date: Nov 2010
Location: São Paulo, Brasil
Posts: 2,557
Reputation: 317
Default Re: CTime Library

I have made a quick change to the plugin which makes it fetch strftime data accordingly to the location settings.
That means if you run it on a computer which the language is Russian, it will display in the Russian way.

I'm not sure if I'm allowed to release this, but sharing anyway.
Source: http://www.solidfiles.com/d/e7fb02a80c/
Binary: http://www.solidfiles.com/d/9522858225/

It should be also compatible with the new format on C++11 if it wasn't before.
__________________
Rio
steki. is offline   Reply With Quote
Old 20/02/2013, 07:29 PM   #46
TheArcher
High-roller
 
TheArcher's Avatar
 
Join Date: Dec 2009
Location: Home
Posts: 2,334
Reputation: 251
Default Re: CTime Library

some .dll files are missing when I load the plugin up.
__________________
TheArcher is offline   Reply With Quote
Old 31/05/2013, 07:00 PM   #47
PapaSmerf
Little Clucker
 
Join Date: Jul 2011
Posts: 42
Reputation: 0
Default Re: CTime Library

How to convert second to date? When I do this:

Code:
new tm<tmTime>;
gmtime(Time:convertSecond, tmTime);
format(str, sizeof(str), "%02d.%02d.%d %02d:%02d", tmTime[tm_mday], tmTime[tm_mon], tmTime[tm_year], tmTime[tm_hour], tmTime[tm_min]);
printf(str);
return this:

Code:
30.05.113 18:58

The convertSecond look like this:
Code:
gettime()+60*60*24*30
PapaSmerf is offline   Reply With Quote
Old 22/08/2013, 05:10 PM   #48
TheArcher
High-roller
 
TheArcher's Avatar
 
Join Date: Dec 2009
Location: Home
Posts: 2,334
Reputation: 251
Default Re: CTime Library

the plugin crashes if called in OnGameModeExit()
__________________
TheArcher is offline   Reply With Quote
Old 22/08/2013, 09:55 PM   #49
xRotem
Big Clucker
 
Join Date: May 2012
Posts: 67
Reputation: -13
Default Re: CTime Library

great
__________________



Forums: lg-gaming.net
Teamspeak: ts.lg-gaming.net
SAMP Server: samp.lg-gaming.net:7777
Minecraft Server: mc.lg-gaming.net:7777


xRotem is offline   Reply With Quote
Old 24/08/2013, 09:44 PM   #50
RyDeR`
High-roller
 
RyDeR`'s Avatar
 
Join Date: Feb 2009
Location: Belgium
Posts: 2,929
Reputation: 700
Default Re: CTime Library

Quote:
Originally Posted by TheArcher View Post
the plugin crashes if called in OnGameModeExit()
It's probably your code; could you paste the whole callback here please?
__________________

Sup?
RyDeR` 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
[FilterScript] [FS]Vehicle Library Sandra18[NL] Filterscripts 10 04/07/2013 11:34 AM
[Include] Neon Library Shelby Lançamentos/Releases 21 19/06/2011 01:23 PM
SQLite, RAW or library Luka P. Help Archive 2 15/09/2010 04:28 PM
[Map] [MAP]Los Santos Library Juanmv Maps 18 13/02/2010 06:23 AM


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


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