Weapon system (Y_INI)
#3

Generally speaking, giving players their weapons when they connect is probably a bad idea. Instead, give the weapons to them after spawn. So instead of OnPlayerConnect, try OnPlayerSpawn.

To get the weapon data before they disconnect, read this.

To store the weapon data:
Код:
INI_WriteInt(File,"oSlot1",PlayerInfo[playerid][pWeapon0]);
INI_WriteInt(File,"Ammo0",PlayerInfo[playerid][pAmmo0]);
// Remember to change the variable names to whatever your variable names are.
To give them their weapon when they return, ensure you read the INI file before setting their weapon:
Код:
GivePlayerWeapon(playerid,PlayerInfo[playerid][pWeapon0],PlayerInfo[playerid][pAmmo0]);
Reply


Messages In This Thread
Weapon system (Y_INI) ( STILL NEED HELP ) - by maksicnm - 22.10.2017, 08:17
Re: Weapon system (Y_INI) - by maksicnm - 22.10.2017, 08:30
Re: Weapon system (Y_INI) - by McBan - 22.10.2017, 09:36
Re: Weapon system (Y_INI) - by maksicnm - 22.10.2017, 09:45
Re: Weapon system (Y_INI) - by kAn3 - 22.10.2017, 12:44

Forum Jump:


Users browsing this thread: 2 Guest(s)