Jump to content

[HELP] How then? Why not?


Markeloff

Recommended Posts

Posted

Hello everyone,

"The double ammo story"

This topic is being repeated many times, I got rid of the howto. I'm stuck, no ways, no solutions. Its really annoying spending hours on figuring it out. Let's start, this topic goes into two larges parts and every part has a question.

So, it's all about the save ways in mta. It's not the problem of sqlite or mysql. The problem made me crazy. I want to save the weapons of the player on two bigs events : onPlayerQuit, onPlayerWasted .. Now, loading the data is more harder even.. After finding my bug which was saving weapons and load it onPlayerSpawn. Well, onPlayerLogin is sort of onPlayerSpawn. I have no idea now how to load the data when player wasted.

Besides, using onPlayerSpawn for getting the weapons on the event onPlayerWasted makes the bug of double ammo when onPlayerLogin. In this case, I got the weapons and the ammo + onPlayerSpawn ammo bug.. And here we go, getPedTotalAmmo bug comes, the values return to the unwanted values which makes the bug hard to find.

To sum up, any solution to load data onPlayerWasted excluding onPlayerSpawn event solution..

Now, the part "why not?"

I wanted that MTA Team automatically saves weapons onPlayerWasted and load it onPlayerSpawn.

So, we don't need to save it. For players who won't use it, they can use takeWeapon..

Thanks for reading.

430x73_B2E03D_FF9900_000000_000000.png

Some people want it to happen, some wish it would happen, others make it happen.

Posted

I don't see what's the problem of having to save the weapons on wasted and restore them on spawn, it isn't hard to do it.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

The problem isn't that, anyway I used toJSON and fromJSON to save weapons. It's working.

430x73_B2E03D_FF9900_000000_000000.png

Some people want it to happen, some wish it would happen, others make it happen.

Posted

Well , toJSON / fromJSON will work until you hit the MTA account data string lenght limit. It's around 100 char.

Ingame Name : |DGT|Puma

DGT Clan Server 24/7 Owner/Scripter

MultiGameMode in progress :

n-560x95_FFFFFF_FFFFFF_0283C4_000000.png

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...