added support for minutes for the forward
This commit is contained in:
parent
f62cc2bb40
commit
c1a164b67c
@ -18,6 +18,7 @@ native int GetPlayerWorthRTV_boost_(int client);
|
|||||||
*
|
*
|
||||||
* @int the actual client
|
* @int the actual client
|
||||||
* @int Game time hours that the client has on the server.
|
* @int Game time hours that the client has on the server.
|
||||||
|
* @int Game time minutes the client has on the server.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
forward void GetPlayerHoursServer(int client, int hours);
|
forward void GetPlayerHoursServer(int client, int hours, int minutes);
|
||||||
|
|||||||
@ -134,7 +134,7 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char [] error, int err_ma
|
|||||||
CreateNative("GetAveragePlayerTimeOnServer", Native_GetAveragePlayerActiveTimeServer);
|
CreateNative("GetAveragePlayerTimeOnServer", Native_GetAveragePlayerActiveTimeServer);
|
||||||
CreateNative("GetPlayerWorthRTV_boost_", Native_GetPlayerWorthRTV_boost);
|
CreateNative("GetPlayerWorthRTV_boost_", Native_GetPlayerWorthRTV_boost);
|
||||||
|
|
||||||
g_hForwardPlayerHours = CreateGlobalForward("GetPlayerHoursServer", ET_Ignore, Param_Cell, Param_Cell);
|
g_hForwardPlayerHours = CreateGlobalForward("GetPlayerHoursServer", ET_Ignore, Param_Cell, Param_Cell, Param_Cell);
|
||||||
return APLRes_Success;
|
return APLRes_Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -314,6 +314,7 @@ public void SQL_OnQueryCompletedTimeServer(Database db, DBResultSet results, con
|
|||||||
}
|
}
|
||||||
delete results;
|
delete results;
|
||||||
int iHours_Server = (iTime_Server / 60) / 60;
|
int iHours_Server = (iTime_Server / 60) / 60;
|
||||||
|
int iMinutes_Server = (iTime_Server / 60) % 60;
|
||||||
//just a hardcap, maybe it will be adapted somewhen in the future
|
//just a hardcap, maybe it will be adapted somewhen in the future
|
||||||
//2026, i am removing the hardcap so it wont interfere with play time based restrictions.
|
//2026, i am removing the hardcap so it wont interfere with play time based restrictions.
|
||||||
/*
|
/*
|
||||||
@ -327,6 +328,7 @@ public void SQL_OnQueryCompletedTimeServer(Database db, DBResultSet results, con
|
|||||||
Call_StartForward(g_hForwardPlayerHours);
|
Call_StartForward(g_hForwardPlayerHours);
|
||||||
Call_PushCell(client);
|
Call_PushCell(client);
|
||||||
Call_PushCell(g_iPlayerTimeServer[client]);
|
Call_PushCell(g_iPlayerTimeServer[client]);
|
||||||
|
Call_PushCell(iMinutes_Server);
|
||||||
Call_Finish();
|
Call_Finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user