Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //| Terms && Perms |\\
- /*
- Copyright holder is and was 0x00000539@UC
- Contact: https://www.unknowncheats.me/forum/members/1641196.html
- If you want to use this snippet please ask me.
- */
- //| Includes |\\
- #include "AddOnSystem.h"
- //| Code |\\
- AddOnSystem::AddOnGlobalStruct::AddOnGlobalStruct ( std::string name , long float f )
- {
- numeric_value = f;
- undefines_value = NULL;
- }
- AddOnSystem::AddOnGlobalStruct::AddOnGlobalStruct ( std::string name , void* a )
- {
- numeric_value = 0;
- undefines_value = a;
- }
- AddOnSystem::AddOnGlobals::AddOnGlobals ( )
- {
- Globals = { };
- }
- int AddOnSystem::AddOnGlobals::AddValue ( std::string i , long float f )
- {
- Globals.push_back ( new AddOnSystem::AddOnGlobalStruct ( i , f ) );
- }
- int AddOnSystem::AddOnGlobals::AddValue ( std::string i , void* v )
- {
- Globals.push_back ( new AddOnSystem::AddOnGlobalStruct ( i , v ) );
- }
- long float AddOnSystem::AddOnGlobals::GetNumeric ( int i )
- {
- if ( i < Globals.size ( ) )
- return Globals [ i ]->numeric_value;
- return 0;
- }
- long float AddOnSystem::AddOnGlobals::GetNumeric ( std::string i )
- {
- for ( int index = 0; index < Globals.size ( ); index++ )
- {
- if ( Globals [ index ]->identifier == i )
- return Globals [ index ]->numeric_value;
- }
- return 0;
- }
- void* AddOnSystem::AddOnGlobals::GetUndefined ( int i )
- {
- if ( i < Globals.size ( ) )
- return Globals [ i ]->undefines_value;
- return NULL;
- }
- void* AddOnSystem::AddOnGlobals::GetUndefined ( std::string i )
- {
- for ( int index = 0; index < Globals.size ( ); index++ )
- {
- if ( Globals [ index ]->identifier == i )
- return Globals [ index ]->undefines_value;
- }
- return NULL;
- }
- void AddOnSystem::AddOnGlobals::OverwriteNumeric ( int i , long float f )
- {
- if ( i < Globals.size ( ) )
- Globals [ i ]->numeric_value = f;
- }
- void AddOnSystem::AddOnGlobals::OverwriteNumeric ( std::string i , long float f )
- {
- for ( int index = 0; index < Globals.size ( ); index++ )
- {
- if ( Globals [ index ]->identifier == i )
- Globals [ index ]->numeric_value = f;
- }
- }
- void AddOnSystem::AddOnGlobals::OverwriteUndefined ( int i , void* v )
- {
- if ( i < Globals.size ( ) )
- Globals [ i ]->undefines_value = v;
- }
- void AddOnSystem::AddOnGlobals::OverwriteUndefined ( std::string i , void* v )
- {
- for ( int index = 0; index < Globals.size ( ); index++ )
- {
- if ( Globals [ index ]->identifier == i )
- Globals [ index ]->undefines_value = v;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement