02.05.2013, 15:48
LOL!I thought your aim was to reset all weapons on death and you told it.Then why are you try to GivePlayerWeapon on OnPlayerSpawn?? -_-
Please tell once again what are trying to accomplish by that code?
And as Plottus said, don't save the weapon data to INI on OnPlayerDeath(You'll end up irritating players)
1st Reason:You have reset ,there is no need of fetching those variables .
2nd Reason:Instead declare a weapon enum or variables to hold the weapon data.
When player disconnects save the data.
This will optimize the code very much.
Quote:
instead of respawning with no weapons (which is what I want to happen) |
And as Plottus said, don't save the weapon data to INI on OnPlayerDeath(You'll end up irritating players)
1st Reason:You have reset ,there is no need of fetching those variables .
2nd Reason:Instead declare a weapon enum or variables to hold the weapon data.
When player disconnects save the data.
This will optimize the code very much.