Weapon saving
#1

Hello, I'm working on a weapon saving system. Everything goes fine when you register, the weapon id is saved into the file as 0, and I even tried putting it to a 2 and it also saved. When it loads however it won't get the weapon ID, check this piece of code.

Код:
 PlayerInfo[playerid][Weaponslot1] = (dUserINT(pName(playerid)).("Weaponslot1"));
And this is the GivePlayerWeapon function that is triggered when you spawn:
Код:
 GivePlayerWeapon(playerid, PlayerInfo[playerid][Weaponslot1], PlayerInfo[playerid][Ammoslot1]);
The Ammoslot 1 is also not working.
Reply
#2

How you save weapons?
You save ammos too?
Reply
#3

Hard to help if you're not showing the bugged code.
Reply
#4

Lol, I actually found the problem, and yes I do save ammo in a similar place as the weapon1, In the user file it said Weaponslot 1 and I wrote Weaponslot1 so that's why it didn't work. :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)