Exemplo n.º 1
0
 public static void TryAddInt(this ServerPlayer player, string name, int inc)
 {
     if (player.ContainsValueName(name))
     {
         player.ModifyExtraValue(name, (long)player.GetExtraValue(name) + (long)inc);
     }
     else
     {
         player.ModifyExtraValue(name, (long)inc);
     }
 }
Exemplo n.º 2
0
 public static int TryGetInt(this ServerPlayer player, string name)
 {
     if (player.ContainsValueName(name))
     {
         return((int)((long)player.GetExtraValue(name)));
     }
     else
     {
         return(0);
     }
 }