further changes to show rtv boost correctly and display in percentage
This commit is contained in:
parent
8bbb937f6f
commit
048054d216
@ -17,3 +17,8 @@ native int GetAveragePlayerTimeOnServerRTV();
|
||||
* @returns the players worth in connected hours for the rtv
|
||||
*/
|
||||
native int GetPlayerWorthRTV_(int client);
|
||||
|
||||
/**
|
||||
* @returns the players rtv amount boost
|
||||
*/
|
||||
native float GetPlayerWorthRTV_boost_(int client);
|
||||
|
@ -224,7 +224,7 @@ public int Native_GetPlayerWorthRTV(Handle plugin, int numParams)
|
||||
ThrowNativeError(SP_ERROR_NATIVE, "Client is not in-game.");
|
||||
return -1;
|
||||
}
|
||||
return GetPlayerWorthRTV(client);
|
||||
return view_as<int>(GetPlayerWorthRTV(client));
|
||||
}
|
||||
|
||||
public int GetPlayerWorthRTV(int client)
|
||||
@ -240,7 +240,7 @@ public int GetPlayerWorthRTV(int client)
|
||||
g_fPlayerRTVWorth[client] = float(g_iPlayerRTVCapacity);
|
||||
return avg * g_iPlayerRTVCapacity;
|
||||
}
|
||||
g_fPlayerRTVWorth[client] = float(g_iPlayerTimeServer[client] / avg);
|
||||
g_fPlayerRTVWorth[client] = float(g_iPlayerTimeServer[client]) / float(avg);
|
||||
return avg * (g_iPlayerTimeServer[client] / avg);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user