SQL help.
#4

pawn Код:
enum weapons {
weapon1,
weapon1ammo,
weapon2,
weapon2ammo,
weapon3,
weapon3ammo,
weapon4,
weapon4ammo,
weapon5,
weapon5ammo,
weapon6,
weapon6ammo,
weapon7,
weapon7ammo,
weapon8,
weapon8ammo,
weapon9,
weapon9ammo,
weapon10,
weapon10ammo,
weapon11,
weapon11ammo,
weapon12,
weapon12ammo,
weapon13,
weapon13ammo
}

new WeapData[MAX_PLAYERS][weapons];

stock GrabWeapons(playerid)
{
    GetPlayerWeaponData(playerid,0,WeapData[playerid][weapon1],WeapData[playerid][weapon1ammo]);
    GetPlayerWeaponData(playerid,1,WeapData[playerid][weapon2],WeapData[playerid][weapon2ammo]);
    GetPlayerWeaponData(playerid,2,WeapData[playerid][weapon3],WeapData[playerid][weapon3ammo]);
    GetPlayerWeaponData(playerid,3,WeapData[playerid][weapon4],WeapData[playerid][weapon4ammo]);
    GetPlayerWeaponData(playerid,4,WeapData[playerid][weapon5],WeapData[playerid][weapon5ammo]);
    GetPlayerWeaponData(playerid,5,WeapData[playerid][weapon6],WeapData[playerid][weapon6ammo]);
    GetPlayerWeaponData(playerid,6,WeapData[playerid][weapon7],WeapData[playerid][weapon7ammo]);
    GetPlayerWeaponData(playerid,7,WeapData[playerid][weapon8],WeapData[playerid][weapon8ammo]);
    GetPlayerWeaponData(playerid,8,WeapData[playerid][weapon9],WeapData[playerid][weapon9ammo]);
    GetPlayerWeaponData(playerid,9,WeapData[playerid][weapon10],WeapData[playerid][weapon10ammo]);
    GetPlayerWeaponData(playerid,10,WeapData[playerid][weapon11],WeapData[playerid][weapon11ammo]);
    GetPlayerWeaponData(playerid,11,WeapData[playerid][weapon12],WeapData[playerid][weapon12ammo]);
    GetPlayerWeaponData(playerid,12,WeapData[playerid][weapon13],WeapData[playerid][weapon13ammo]);
}
Edit: Be sure to use GrabWeapons(playerid); in your callback so it will grab the data or else it won't do it.
Reply


Messages In This Thread
SQL help. - by iGetty - 24.06.2012, 01:24
Re: SQL help. - by SuperViper - 24.06.2012, 02:11
Re: SQL help. - by iGetty - 24.06.2012, 02:41
Re: SQL help. - by phillip875 - 24.06.2012, 05:59
Re: SQL help. - by phillip875 - 24.06.2012, 06:20
Re: SQL help. - by iGetty - 29.06.2012, 16:52

Forum Jump:


Users browsing this thread: 2 Guest(s)