Raised This Month: $51 Target: $400
 12% 

Solved change GetClientCookieTime ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
heroicpower7613
Member
Join Date: Nov 2016
Old 08-27-2017 , 14:27   change GetClientCookieTime ?
Reply With Quote #1

PHP Code:
    // display them a message about the ban
        
new iTimeBanned GetClientCookieTime(clientg_CT_Cookie);
        
decl String:sTimeBanned[150];
        
FormatTime(sTimeBannedsizeof(sTimeBanned), NULL_STRINGiTimeBanned);
        
PrintToChat(client"%t""Last CT Banned On"sTimeBanned); 
this will print a message of time time like this 08/23/2017 - 16:02:12

can i make it so that this will say always -3 hours of the real time for example? like this

real time: 08/23/2017 - 16:02:12
time that will be printed: 08/23/2017 - 13:02:12

Last edited by heroicpower7613; 08-28-2017 at 10:28.
heroicpower7613 is offline
CamerDisco
AlliedModders Donor
Join Date: Aug 2015
Location: Poland
Old 08-27-2017 , 15:28   Re: change GetClientCookieTime ?
Reply With Quote #2

iTimeBanned is a timestamp, so:
PHP Code:
int iTimeBanned = (GetClientCookieTime(clientg_CT_Cookie))-10800
__________________


Max-Play.pl - the best polish servers

Last edited by CamerDisco; 08-27-2017 at 15:28.
CamerDisco is offline
heroicpower7613
Member
Join Date: Nov 2016
Old 08-28-2017 , 10:28   Re: change GetClientCookieTime ?
Reply With Quote #3

Quote:
Originally Posted by CamerDisco View Post
iTimeBanned is a timestamp, so:
PHP Code:
int iTimeBanned = (GetClientCookieTime(clientg_CT_Cookie))-10800
thanks works well

PHP Code:
// display them a message about the ban
        
new iTimeBanned GetClientCookieTime(clientg_CT_Cookie);

        
iTimeBanned = ( GetClientCookieTime(clientg_CT_Cookie) ) +10800
 
        
decl String:sTimeBanned[150];
        
FormatTime(sTimeBannedsizeof(sTimeBanned), NULL_STRINGiTimeBanned);
        
        
PrintToChat(client"%t""Last CT Banned On"sTimeBanned); 
heroicpower7613 is offline
Reply



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

Forum Jump


All times are GMT -4. The time now is 11:42.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode