SA-MP Forums Archive
Help. Dont work - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help. Dont work (/showthread.php?tid=631475)



Help. Dont work - Xportaler - 29.03.2017

RANK_STATUS`=1 This doesent Change wheen i CheckVeteran

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;




Re: Help. Dont work - Xportaler - 30.03.2017

Please help me Its Urgent


Re: Help. Dont work - [eLg]elite - 30.03.2017

I don't use MySQL, but it looks like you're changing it to 0, then changing it to 1 again directly after every time. Did you mean to use an "if" statement?


Re: Help. Dont work - Xportaler - 30.03.2017

Can you give me any other idea ?


Re: Help. Dont work - [eLg]elite - 30.03.2017

What do you want it to do, exactly? Is it supposed to change to 0 if it's already 1?


Re: Help. Dont work - Xportaler - 31.03.2017

I want to set it from 0 to 1 if Hours more than 21