Posts: 96
Threads: 19
Joined: Feb 2017
Hello Guts! I have 2 variables saved in Database(Table) one count Hours(Vhours = theammount of hours) and another one check if its 1 or 0(Active= 1/0). I want to check this table and if VHours is more than 20 then set it to 0 and if active = 0 set it to 1
But the problem is i dont want to check only for players who Connect to the server but for all Table! Someone help me with this
Posts: 96
Threads: 19
Joined: Feb 2017
PHP код:
`plr_veteran` SET `Actve`=1 WHERE `VHOURS` > 20");
But i want to set this for all database if they are VHOURS > 20 Not just for players who connect to server. I want to do it to all Table plr_veteran
Posts: 851
Threads: 33
Joined: Jul 2016
Reputation:
0
For example making it under OnGameModeInIt?
Posts: 96
Threads: 19
Joined: Feb 2017
This is what im trying to create! This is what i want to do but i dont know how to do it through pawn to edit it also for players who are not online and set it to 1 or 0 even for players who dont connect to server
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;
}
But now it will go more complicated!
this is variables im using now