Weapon Saving Problem:
#1

Hi, I am having a problem with my weapon saving system.

I spawned myself a Desert Eagle with 30 ammo. I logged out of the game and then I logged back in. When I spawned, I noticed my Desert Eagle had 60 ammo.


The function:
pawn Код:
public GivePlayerWeaponEx(playerid, weapon, ammo)
The code that spawns Desert Eagles:
pawn Код:
case 22, 23, 24:
        {
            Player[playerid][WepSlot2] = weapon;
            Player[playerid][WepAmmo2] = ammo;
            GivePlayerWeapon(playerid, weapon, ammo);
        }
So, my problem is with my weapon saving system. My ammo system is bugged. My ammo for my guns duplicate. I am using dini, and Vortex Roleplay 1 script. Any suggestions?
Reply
#2

Check the file, what does it write in there? Maybe you ahve 2 saving systems and you get 30 + 30 = 60 :O
Reply
#3

Actually, I found out that the ammo isn't saved when someone disconnect. I shoot my M4 from 500 ammo to 487. When I returned back in-game (after logging off), the M4 had 1000 ammo. I need to make a saving system for ammo under OnPlayerDisconnect.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)