Raised This Month: $ Target: $400
 0% 

set_user_time can do that?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
0920357689
Senior Member
Join Date: Apr 2008
Old 08-14-2012 , 03:15   set_user_time can do that?
Reply With Quote #1

only have get_user_time to get player playing time
but how to set it?
0920357689 is offline
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 08-14-2012 , 07:00   Re: set_user_time can do that?
Reply With Quote #2

Quote:
Originally Posted by 0920357689 View Post
only have get_user_time to get player playing time
but how to set it?
You have to add this function:
http://forums.alliedmods.net/showthread.php?t=135873
and then to recompile amxmodx.
OvidiuS is offline
Send a message via Skype™ to OvidiuS
Waleed
Senior Member
Join Date: May 2012
Location: Pakistan
Old 08-14-2012 , 07:05   Re: set_user_time can do that?
Reply With Quote #3

I think this should work
Code:
static cell AMX_NATIVE_CALL set_user_time(AMX *amx, cell *params) /* set_user_time(id,time) 0-all, seconds*/ {   int index = params[1];   if (index<1||index>gpGlobals->maxClients)     return 0;   CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);   if (pPlayer->ingame){     float time = amx_ctof(params[2]);     float connecttime = pPlayer->playtime - pPlayer->time;     pPlayer->playtime = gpGlobals->time - time;     pPlayer->time = pPlayer->playtime - connecttime;     return 1;   }   return 0; }
Refrence:http://forums.alliedmods.net/showthread.php?t=135873
__________________
Working On:
  1. Gameplay 1 - 0% [PAUSED]
Waleed is offline
Send a message via Skype™ to Waleed
0920357689
Senior Member
Join Date: Apr 2008
Old 08-14-2012 , 07:58   Re: set_user_time can do that?
Reply With Quote #4

but I don't know how to recompile amxmodx
0920357689 is offline
avril-lavigne
Banned
Join Date: Apr 2009
Old 08-14-2012 , 08:32   Re: set_user_time can do that?
Reply With Quote #5

get source first
__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc
avril-lavigne is offline
0920357689
Senior Member
Join Date: Apr 2008
Old 08-14-2012 , 16:03   Re: set_user_time can do that?
Reply With Quote #6

get source first will be auto recompile amxmodx????
0920357689 is offline
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

Forum Jump


All times are GMT -4. The time now is 05:49.


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