05.01.2012, 13:57
Hey,
On my script I attempt to save the players weapon and ammo on disconnect however I save the 6 weapons that they should have. On the Login I use this code:
And the when a player spawns:
What I need to fix(I think) is how to save each slots so I'm not just saving the same weapon 6times also saving the ammo used. Any ideas?
Thanks,
-Dark.
On my script I attempt to save the players weapon and ammo on disconnect however I save the 6 weapons that they should have. On the Login I use this code:
pawn Код:
mysql_fetch_field_row(string,"Weapon1"); PlayerInfo[playerid][pWeapon1] = strval(string);
mysql_fetch_field_row(string,"Ammo1"); PlayerInfo[playerid][pAmmo1] = strval(string);
pawn Код:
new Ammo, Weapon;
PlayerInfo[playerid][pWeapon1] = Weapon;
PlayerInfo[playerid][pAmmo1] = Ammo;
Safe_GivePlayerWeapon(playerid,Weapon,Ammo);
Thanks,
-Dark.