Posts: 96
Threads: 19
Joined: Feb 2017
Hello. I need help how to change database all infos in aacount registered. I want to check all accounts example if players have playend more than 21 hours saved in database then set an variable in database from 0 to 1
I dont want to check just for players who logged in. For all even without connecting to server. So directly to database
Posts: 1,690
Threads: 18
Joined: Jul 2012
Reputation:
0
Do you have a command in-game to check time? (If yes then paste that command here)
Posts: 96
Threads: 19
Joined: Feb 2017
Posts: 102
Threads: 2
Joined: Jul 2017
Posts: 96
Threads: 19
Joined: Feb 2017
Posts: 96
Threads: 19
Joined: Feb 2017
PHP код:
forward Checkveteran();
public Checkveteran()
{
for(new i;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
pGeneral[i][PLR_VETERAN] = 0;
pGeneral[i][OLD_HOURS] = 0;
}
}
mysql_query_nodata("UPDATE `plr_veteran` SET `RANK_STATUS`=0,`RANK_UPDATED`=1");
mysql_query_nodata("UPDATE `plr_veteran` SET `RANK_STATUS`=1,`RANK_UPDATED`=1 WHERE `OLD_HOURS` > 20");
mysql_query_nodata("UPDATE plr_veteran SET `OLD_HOURS` = 0");
return 1;
}
This is what im trying to do!
Posts: 96
Threads: 19
Joined: Feb 2017
BUMP!
Im trying to check if OLDHOURS > 20 set RANKSTATUS TO 1
But for all database! not just for players who connect