I'm making a FPS MMO game, and I'm in doubt as I do the script to save the player's weapons (Knowing that he can save it in a global inventory or remove it to use).
I wonder how it is done in cs 1.6, I know that the client asks to shoot and the server sends the response by computing the location of a hit and sending to all customers. But as is "done" to save the player's weapons? Array, List, A single variable to store the variables of the current weapon?
Piece of coce ( Server Side ):
PHP Code:
public class WeaponStatusInfo
{
public bool bWeaponStuck = false;
public int iWeaponBpAmmo = 0;
public int iWeaponClipAmmo = 0;
private float fWeaponNextFire = 0f;
private float fWeaponFiredTime = 0f;
}
Piece of code ( My Sql ):
PHP Code:
[System.Serializable]
public class WeaponPersonalInfo
{
public string szWeaponName = "Null";
public float fWeaponReloadTime = 1.5f;
public int iWeaponShootMode = 0;
// 0 - shot per shot
// 1 - Semi
// 2 - Automatic
public bool bWeaponZoom = false;
public int iMaxClipammo = 0;
public int iMaxBpAmmo = 0;
}
Thank you.
__________________