How to check for login count?

How can I check the amount of logins from the Database in order to run a script at say for example the 1st login?

if (total_connections<= 1) then {


** Script **

}



Many thanks for any help at all!
 
are we talking about logins for the server as total or for each player?
if you want the server total, like you join is 1 and i join is 2 then this
in the player login on line 165 increment a counter.
logincount =logincount +1;
if logincount =1,000,000 then award free prize
make sure to add the counter to your variables.sqf
logincount = 0;
https://github.com/DayZMod/DayZ/blob/Development/SQF/dayz_server/compile/server_playerLogin.sqf

if we are talking about counting how many times a player has connected, like give me a heli when i join the 100th time, i would use profilenamespace and increment each time and check. i think that would be a file exec from init.sqf
let me know if thats what you want to do and i can whack one out in a moment.
https://community.bistudio.com/wiki/profileNamespace
 
Top