08.01.2014, 22:27
I like organized things so i decided to do a thing:
How i can make a stock that increase a selected row with different "cases" which i can select?
Like this:
And adding like this in a string: "IncreaseStats(0)" that will increase total accounts value, and 1 to increase total ac bans.
Got it what im saying?
P.S Sorry for bad identation, i dont know why pawn tag fucks it lol
How i can make a stock that increase a selected row with different "cases" which i can select?
Like this:
pawn Код:
stock IncreaseStats(rowtoincrease)
{
case 0:
{
new stats[128]; //Increase total accounts value
format(stats, sizeof(stats), "UPDATE ServerStats SET TotalAccounts = TotalAccounts + 1 WHERE condition = true");
mysql_query(stats);
}
case 1:
{
new stats[128]; //Increase total ac value
format(stats, sizeof(stats), "UPDATE ServerStats SET TotalAcBans= TotalAcBans + 1 WHERE condition = true");
mysql_query(stats);
}
}
return 1;
}
Got it what im saying?
P.S Sorry for bad identation, i dont know why pawn tag fucks it lol