01.10.2011, 20:50
Under DIALOG_LOGIN should be fine, but make sure player is spawned.
pawn Код:
new fieldname[50];
PlayerSQLID[playerid] = MySQL_GetValue(playerid, "id", "Accounts");
for(new w = 0; w < 13; w++)
{
format(fieldname, sizeof(fieldname), "Weapon%d", w);
PlayerWeapons[playerid][w] = MySQL_GetValue(PlayerSQLID[playerid], fieldname, "Accounts");
format(fieldname, sizeof(fieldname), "Weapon%dAmmo", w);
PlayerWeaponAmmo[playerid][w] = MySQL_GetValue(PlayerSQLID[playerid], fieldname, "Accounts");
if(PlayerWeapons[playerid][w] > 0) GivePlayerWeapon(playerid, PlayerWeapons[playerid][w], PlayerWeaponAmmo[playerid][w]);
}