How to check for login count?

Discussion in 'Scripting/Addon Discussion' started by KrisiS, Jan 7, 2016.

  1. KrisiS

    KrisiS Member

    Aug 17, 2013
    Likes Received:
    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!
  2. ShootingBlanks

    ShootingBlanks OpenDayZ Guru!

    Mar 31, 2013
    Likes Received:
    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;

    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.

Share This Page