INI TO SQL - 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: INI TO SQL (
/showthread.php?tid=618483)
INI TO SQL -
Pearson - 06.10.2016
PHP код:
for(new f = 0; f < 47; f ++)//weap_save
{
new weaponstr[128];
format(weaponstr, sizeof(weaponstr), "weapon%d",f);
ini_setInteger(iniFile,weaponstr, 0);
}
for(new s = 0; s < 13; s ++)//weap_save
{
new w,a;
new weaponstr[128];
GetPlayerWeaponData(playerid,s,w,a);
if(w > 0)
{
format(weaponstr, sizeof(weaponstr), "weapon%d",w);
ini_setInteger(iniFile,weaponstr, a);
}
//printf( "slot %d weapon %d ammp %d", s,w,a);
}
How to create sql save for this script?
Re: INI TO SQL -
SickAttack - 06.10.2016
Please refer to a related tutorial, you aren't going to magically convert that to SQLite/MySQL. There's more to just changing a few lines.
Re: INI TO SQL -
Pearson - 06.10.2016
I have only one question can i convert this script to sql ? Like
PHP код:
insert into .......
Re: INI TO SQL -
SickAttack - 06.10.2016
Yes, but if you don't have anything related to it yet, then there's more to that.
Again, please refer to a related tutorial.