Weapons MySQL loading
#3

pawn Code:
for (new tmp=0; tmp<12; tmp++) GetPlayerWeaponData(playerid,tmp,weps[0][tmp],weps[1][tmp]);
       
        format( Query, sizeof(Query),"UPDATE `vartotojai` SET Ginklas0 = '%i', Ammo0 = '%i' WHERE Vardas = '%s'",\
        weps[ 0 ][ 0 ], weps[ 1 ][ 0 ], GetPlayerNameEx( playerid ));
        mysql_query( Query );
        format( Query, sizeof(Query),"UPDATE `vartotojai` SET Ginklas1 = '%i', Ammo1 = '%i' WHERE Vardas = '%s'",\
        weps[ 0 ][ 1 ], weps[ 1 ][ 1 ], GetPlayerNameEx( playerid ));
        mysql_query( Query );
        format( Query, sizeof(Query),"UPDATE `vartotojai` SET Ginklas2 = '%i', Ammo2 = '%i' WHERE Vardas = '%s'",\
        weps[ 0 ][ 2 ], weps[ 1 ][ 2 ], GetPlayerNameEx( playerid ));
        mysql_query( Query );
        format( Query, sizeof(Query),"UPDATE `vartotojai` SET Ginklas3 = '%i', Ammo3 = '%i' WHERE Vardas = '%s'",\
        weps[ 0 ][ 3 ], weps[ 1 ][ 3 ], GetPlayerNameEx( playerid ));
        mysql_query( Query );
        format( Query, sizeof(Query),"UPDATE `vartotojai` SET Ginklas4 = '%i', Ammo4 = '%i' WHERE Vardas = '%s'",\
        weps[ 0 ][ 4 ], weps[ 1 ][ 4 ], GetPlayerNameEx( playerid ));
        mysql_query( Query );
        format( Query, sizeof(Query),"UPDATE `vartotojai` SET Ginklas5 = '%i', Ammo5 = '%i' WHERE Vardas = '%s'",\
        weps[ 0 ][ 5 ], weps[ 1 ][ 5 ], GetPlayerNameEx( playerid ));
        mysql_query( Query );
        format( Query, sizeof(Query),"UPDATE `vartotojai` SET Ginklas6 = '%i', Ammo6 = '%i' WHERE Vardas = '%s'",\
        weps[ 0 ][ 6 ], weps[ 1 ][ 6 ], GetPlayerNameEx( playerid ));
        mysql_query( Query );
        format( Query, sizeof(Query),"UPDATE `vartotojai` SET Ginklas7 = '%i', Ammo7 = '%i' WHERE Vardas = '%s'",\
        weps[ 0 ][ 7 ], weps[ 1 ][ 7 ], GetPlayerNameEx( playerid ));
        mysql_query( Query );
        format( Query, sizeof(Query),"UPDATE `vartotojai` SET Ginklas8 = '%i', Ammo8 = '%i' WHERE Vardas = '%s'",\
        weps[ 0 ][ 8 ], weps[ 1 ][ 8 ], GetPlayerNameEx( playerid ));
        mysql_query( Query );
        format( Query, sizeof(Query),"UPDATE `vartotojai` SET Ginklas9 = '%i', Ammo9 = '%i' WHERE Vardas = '%s'",\
        weps[ 0 ][ 9 ], weps[ 1 ][ 9 ], GetPlayerNameEx( playerid ));
        mysql_query( Query );
        format( Query, sizeof(Query),"UPDATE `vartotojai` SET Ginklas10 = '%i', Ammo10 = '%i' WHERE Vardas = '%s'",\
        weps[ 0 ][ 10 ], weps[ 1 ][ 10 ], GetPlayerNameEx( playerid ));
        mysql_query( Query );
        format( Query, sizeof(Query),"UPDATE `vartotojai` SET Ginklas11 = '%i', Ammo11 = '%i' WHERE Vardas = '%s'",\
        weps[ 0 ][ 11 ], weps[ 1 ][ 11 ], GetPlayerNameEx( playerid ));
        mysql_query( Query );
Reply


Messages In This Thread
Weapons MySQL loading - by ancezas - 20.03.2013, 16:16
Re: Weapons MySQL loading - by Patrick - 20.03.2013, 16:18
Re: Weapons MySQL loading - by ancezas - 20.03.2013, 16:24
Re: Weapons MySQL loading - by Misiur - 20.03.2013, 16:24
Re: Weapons MySQL loading - by ancezas - 20.03.2013, 16:40
Re: Weapons MySQL loading - by Patrick - 20.03.2013, 16:46
Re: Weapons MySQL loading - by Misiur - 20.03.2013, 16:46
Re: Weapons MySQL loading - by ancezas - 20.03.2013, 16:51

Forum Jump:


Users browsing this thread: 1 Guest(s)