1
0

gvar.inc 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (C) 2012 Incognito
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. // Definitions
  17. #define GLOBAL_VARTYPE_NONE (0)
  18. #define GLOBAL_VARTYPE_INT (1)
  19. #define GLOBAL_VARTYPE_STRING (2)
  20. #define GLOBAL_VARTYPE_FLOAT (3)
  21. // Natives
  22. native SetGVarInt(const name[], value, id = 0);
  23. native GetGVarInt(const name[], id = 0);
  24. native SetGVarString(const name[], const value[], id = 0);
  25. native GetGVarString(const name[], dest[], maxlength = sizeof dest, id = 0);
  26. native SetGVarFloat(const name[], Float:value, id = 0);
  27. native Float:GetGVarFloat(const name[], id = 0);
  28. native DeleteGVar(const name[], id = 0);
  29. native GetGVarsUpperIndex(id = 0);
  30. native GetGVarNameAtIndex(index, dest[], maxlength = sizeof dest, id = 0);
  31. native GetGVarType(const name[], id = 0);