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

vip riko get time with natives


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alex2001
Member
Join Date: May 2019
Old 05-28-2019 , 04:17   vip riko get time with natives
Reply With Quote #1

hello,someone can exaplin me how can i use https://github.com/R1KO/VIP-Core/blo..._core.inc#L248
i want to get vip time/vip group and extend change etc..

int time;
time = VIP_GetClientAccessTime(int iClient);

but dosent work..or work and i cant see
alex2001 is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 05-28-2019 , 05:23   Re: vip riko get time with natives
Reply With Quote #2

what does

PHP Code:
int time;
time VIP_GetClientAccessTime(iClient);
PrintToChatAll("time: %d"time); 
say
__________________
8guawong is offline
alex2001
Member
Join Date: May 2019
Old 05-28-2019 , 05:24   Re: vip riko get time with natives
Reply With Quote #3

is timestamp.. how can i convert to hour min ..
alex2001 is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 05-28-2019 , 05:45   Re: vip riko get time with natives
Reply With Quote #4

Quote:
Originally Posted by alex2001 View Post
is timestamp.. how can i convert to hour min ..
PHP Code:
char ReadableTime[512];
FormatTime(ReadableTimesizeof(ReadableTime), "%I:%M:%S"time);
PrintToChatAll(ReadableTime); 
__________________
8guawong is offline
alex2001
Member
Join Date: May 2019
Old 05-28-2019 , 05:59   Re: vip riko get time with natives
Reply With Quote #5

not help..
i want to extend vip time.. but with your code server print when vip expire,

/**
* Устанавливает время окончания VIP-прав у игрока (unix).
* -
* @param iClient Индекс игрока.
* @param iTime Дата в unix формате, 0 если права навсегда, -1 если временный.
* @param bInDB Изменять ли в базе данных.
* -
* @return true - Успешно.
* false - Не удалось выполнить.
*/
native bool VIP_SetClientAccessTime(int iClient, int iTime, bool bInDB = true);

i want to extend with 2 hour .. but again dont know how
alex2001 is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 05-28-2019 , 09:25   Re: vip riko get time with natives
Reply With Quote #6

Quote:
Originally Posted by alex2001 View Post
not help..
i want to extend vip time.. but with your code server print when vip expire,

/**
* Устанавливает время окончания VIP-прав у игрока (unix).
* -
* @param iClient Индекс игрока.
* @param iTime Дата в unix формате, 0 если права навсегда, -1 если временный.
* @param bInDB Изменять ли в базе данных.
* -
* @return true - Успешно.
* false - Не удалось выполнить.
*/
native bool VIP_SetClientAccessTime(int iClient, int iTime, bool bInDB = true);

i want to extend with 2 hour .. but again dont know how
well you wanted help on VIP_GetClientAccessTime which i did

to extend 2 hr try
PHP Code:
int time GetTime() + 7200;
VIP_SetClientAccessTime(clienttime); 
__________________

Last edited by 8guawong; 05-28-2019 at 09:25.
8guawong 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 21:18.


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