29.10.2011, 19:46
pawn Код:
SaveWeapons()
{
for(new p = 0; p < MAX_PLAYERS; p++)
{
if(LoggedIn[p] == 1 && IsPlayerConnected(p))
{
for(new w = 0; w < 13; w++)
{
GetPlayerWeaponData(p, w, PlayerWeapons[p][w], PlayerWeaponAmmo[p][w]);
new fieldname[50], Float:armour;
format(fieldname, sizeof(fieldname), "Weapon%d", w);
MySQL_SetInteger(PlayerSQLID[p], fieldname, PlayerWeapons[p][w], "Accounts");
format(fieldname, sizeof(fieldname), "Weapon%dAmmo", w);
MySQL_SetInteger(PlayerSQLID[p], fieldname, PlayerWeaponAmmo[p][w], "Accounts");
GetPlayerArmour(p, armour);
MySQL_SetFloat(PlayerSQLID[p], "Armour", armour, "Accounts");
}
}
}
return 1;
}