/Toprich command help sqlite
#2

First of all you need to have column for cash in Players table. In this example, I will use cash as an column of value of cash.
So, here it is, but notice that: I don't use easy sqlite and am in a hurry, so take this code and do the same with easy sqlite.
PHP код:
CMD:toprich(playeridparams[])
{
    new 
toprichDBResult:result;
    
result db_query(<DB>, "SELECT max(cash) FROM Players");
    if(
db_num_rows(result)) 
        
toprich db_get_field_int(result);
    
db_free_result(result);
    
va_SendClientMessage(playerid, -1"Max amount of cash is %d"toprich); //FROM YSI
    
return 1;

Also notice: <DB> is the placeholder of real database (you create it first like this: new DB:dbname;)
Reply


Messages In This Thread
/Toprich command help sqlite - by GameOvr - 01.10.2018, 11:18
Re: /Toprich command help sqlite - by DAKYSKYE - 01.10.2018, 20:22
Re: /Toprich command help sqlite - by Calisthenics - 01.10.2018, 20:56
Re: /Toprich command help sqlite - by GameOvr - 01.10.2018, 21:39
Re: /Toprich command help sqlite - by GameOvr - 02.10.2018, 08:42
Re: /Toprich command help sqlite - by UFF - 02.10.2018, 08:48
Re: /Toprich command help sqlite - by GameOvr - 02.10.2018, 13:35
Re: /Toprich command help sqlite - by UFF - 02.10.2018, 13:47
Re: /Toprich command help sqlite - by Calisthenics - 02.10.2018, 15:11
Re: /Toprich command help sqlite - by GameOvr - 03.10.2018, 02:50
Re: /Toprich command help sqlite - by GameOvr - 03.10.2018, 10:20

Forum Jump:


Users browsing this thread: 4 Guest(s)