Exports List
Copy exports['ug-vipsystem']:CreateVIPCode(source: source, steamId: String, license: String, vipcode: String, viptype: String)
exports[ 'ug-vipsystem' ]:DeleteVIPCode(vipcode: String)
exports[ 'ug-vipsystem' ]:ValidateVIPCode(source: source, vipcode: String)
exports[ 'ug-vipsystem' ]:GetPlayerIdentifier(source: source, idType: String)
exports[ 'ug-vipsystem' ]:IsPlayerAdmin(id: String)
Create VIP Code
This export is used to send a request to create a VIP Code directly to the database. It needs to be associated with a Steam ID, License, VIP Code and VIP.
Usage:
Copy exports['ug-vipsystem']:CreateVIPCode(source: source, steamId: String, license: String, vipcode: String, viptype: String)
Example:
Copy function CreateNewVIPCode ( steamId , license , vipcode , viptype )
local src = source
exports[ 'ug-vipsystem' ]:CreateVIPCode(src, steamId, license, vipcode, viptype)
print ( "Created VIP Code with the code " .. vipcode .. "!" )
end
Returns:
None
Delete VIP Code
This export is used to send a request to delete a VIP Code. This is used when a player activates the VIP. This is used for security and obvious reasons.
Usage:
Copy exports[ 'ug-vipsystem' ]:DeleteVIPCode(vipcode: String)
Example:
Copy function DeleteVIPCode ( vipcode )
exports[ 'ug-vipsystem' ]:DeleteVIPCode(vipcode)
print ( "VIP Code Deleted!" )
end
Returns:
None
Validate VIP Code
This export is used to start the process of the code activation.
Usage:
Copy exports[ 'ug-vipsystem' ]:ValidateVIPCode(vipcode: String)
Example:
Copy RegisterCommand( 'activateVIP' , function ( source , args )
local VIPCode = args[ 1 ]
exports[ 'ug-vipsystem' ]:ValidateVIPCode(VIPCode)
end , false )
Returns:
None
Get Player Identifier
This export is used to get the player identifier.
Usage:
Copy exports[ 'ug-vipsystem' ]:GetPlayerIdentifier(source: source, idType: String)
Example:
Copy function GetPlayerSteamID ( source )
local src = source
local steamId = exports[ 'ug-vipsystem' ]:GetPlayerIdentifier(src, "steam" ) -- Returns the Steam ID
return steamId
end )
function GetPlayerLicense ( source )
local src = source
local license = exports[ 'ug-vipsystem' ]:GetPlayerIdentifier(src, "license" ) -- Returns the Steam ID
return license
end )
Returns:
String : type of the ID (Steam, License, ...)
Is Player Admin
This export is used to check if a player is actually an admin and has access to ug-vipsystem's admin menu .
Usage:
Copy exports[ 'ug-vipsystem' ]:IsPlayerAdmin(id: String)
Example:
Copy function IsPlayerVIPSystemAdmin ( id )
return exports[ 'ug-vipsystem' ]:IsPlayerAdmin(id)
end
Returns:
Boolean : true, false
Last updated 10 months ago