Database help
#1

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
Reply
#2

Do you have a command in-game to check time? (If yes then paste that command here)
Reply
#3

I want to do it now. Soo
Reply
#4

u use sql or ini?
Reply
#5

Mysql ofcourse
Reply
#6

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!
Reply
#7

BUMP!
Im trying to check if OLDHOURS > 20 set RANKSTATUS TO 1
But for all database! not just for players who connect
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)