gvar.inc 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. SA-MP GVar Plugin v1.3
  3. Copyright © 2010 Incognito
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. #if defined _gvar_included
  16. #endinput
  17. #endif
  18. #define _gvar_included
  19. // Definitions
  20. #define GLOBAL_VARTYPE_NONE (0)
  21. #define GLOBAL_VARTYPE_INT (1)
  22. #define GLOBAL_VARTYPE_STRING (2)
  23. #define GLOBAL_VARTYPE_FLOAT (3)
  24. // Natives
  25. native SetGVarInt(const name[], value, id = 0);
  26. native GetGVarInt(const name[], id = 0);
  27. native SetGVarString(const name[], const value[], id = 0);
  28. native GetGVarString(const name[], dest[], maxlength = sizeof dest, id = 0);
  29. native SetGVarFloat(const name[], Float:value, id = 0);
  30. native Float:GetGVarFloat(const name[], id = 0);
  31. native DeleteGVar(const name[], id = 0);
  32. native GetGVarsUpperIndex(id = 0);
  33. native GetGVarNameAtIndex(index, dest[], maxlength = sizeof dest, id = 0);
  34. native GetGVarType(const name[], id = 0);