This may help you...
==============================================
// gen_skin_inc
//////////////////////////////////////////////////
// Created By: Genisys / Guile
// Created On: 2/06/2014
////////////////////////////////////////////////////////////////////////////////
/*
This will handle ALL PC Skin Functions & Persistent Variable Storage...
This is a very simplified script include! (Tested Thoroughly!)
*/
////////////////////////////////////////////////////////////////////////////////
// Required Includes
// (NONE & Don't Add Any!)
////////////////////////////////////////////////////////////////////////////////
// Declare All Prototypes...
// Returns the Bioware PC Skin (if one doesn't exist, it creates it)
object GetSkin(object oPC);
// Returns an Int Set on the PC Skin by the variable name sVar
int GetSkinInt(object oPC, string sVar);
// Returns an Int Set on the PC Skin by the variable name sVar
float GetSkinFloat(object oPC, string sVar);
// Returns a String Set on the PC Skin by the variable name sVar
string GetSkinString(object oPC, string sVar);
// Returns an Object Set on the PC Skin by the variable name sVar
object GetSkinObject(object oPC, string sVar);
// Returns a Location Set on the PC Skin by the variable name sVar
location GetSkinLocation(object oPC, string sVar);
void DeleteSkinInt(object oPC, string sVar);
void DeleteSkinFloat(object oPC, string sVar);
void DeleteSkinString(object oPC, string sVar);
void DeleteSkinObject(object oPC, string sVar);
void DeleteSkinLocation(object oPC, string sVar);
void SetSkinInt(object oPC, string sVar, int nInt);
void SetSkinFloat(object oPC, string sVar, float fFloat);
void SetSkinString(object oPC, string sVar, string sString);
void SetSkinObject(object oPC, string sVar, object oObject);
void SetSkinLocation(object oPC, string sVar, location lLoc);
////////////////////////////////////////////////////////////////////////////////
//Define all prototypes...
//-------------------------------------------------------------------------
object GetSkin(object oPC){
object oSkin = GetItemInSlot(INVENTORY_SLOT_CARMOUR, oPC);
if(oSkin == OBJECT_INVALID) { oSkin = CreateItemOnObject("x3_it_pchide", oPC);
AssignCommand(oPC, ActionEquipItem(oSkin, INVENTORY_SLOT_CARMOUR)); }
return oSkin;}
//-------------------------------------------------------------------------
int GetSkinInt(object oPC, string sVar){
object oSkin = GetSkin(oPC); return GetLocalInt(oSkin, sVar);}
//-------------------------------------------------------------------------
float GetSkinFloat(object oPC, string sVar){
object oSkin = GetSkin(oPC); return GetLocalFloat(oSkin, sVar);}
//-------------------------------------------------------------------------
string GetSkinString(object oPC, string sVar){
object oSkin = GetSkin(oPC); return GetLocalString(oSkin, sVar);}
//-------------------------------------------------------------------------
object GetSkinObject(object oPC, string sVar){
object oSkin = GetSkin(oPC); return GetLocalObject(oSkin, sVar);}
//-------------------------------------------------------------------------
location GetSkinLocation(object oPC, string sVar){
object oSkin = GetSkin(oPC); return GetLocalLocation(oSkin, sVar);}
//-------------------------------------------------------------------------
void DeleteSkinInt(object oPC, string sVar){
object oSkin = GetSkin(oPC); DeleteLocalInt(oSkin, sVar);}
//-------------------------------------------------------------------------
void DeleteSkinFloat(object oPC, string sVar){
object oSkin = GetSkin(oPC); DeleteLocalFloat(oSkin, sVar);}
//-------------------------------------------------------------------------
void DeleteSkinString(object oPC, string sVar){
object oSkin = GetSkin(oPC); DeleteLocalString(oSkin, sVar);}
//-------------------------------------------------------------------------
void DeleteSkinObject(object oPC, string sVar){
object oSkin = GetSkin(oPC); DeleteLocalObject(oSkin, sVar);}
//-------------------------------------------------------------------------
void DeleteSkinLocation(object oPC, string sVar){
object oSkin = GetSkin(oPC); DeleteLocalLocation(oSkin, sVar);}
//-------------------------------------------------------------------------
void SetSkinInt(object oPC, string sVar, int nInt){
object oSkin = GetSkin(oPC);
DeleteSkinInt(oPC, sVar); // Prevent Bloat!
SetLocalInt(oSkin, sVar, nInt);}
//-------------------------------------------------------------------------
void SetSkinFloat(object oPC, string sVar, float fFloat){
object oSkin = GetSkin(oPC);
DeleteSkinFloat(oPC, sVar); // Prevent Bloat!
SetLocalFloat(oSkin, sVar, fFloat);}
//-------------------------------------------------------------------------
void SetSkinString(object oPC, string sVar, string sString){
object oSkin = GetSkin(oPC);
DeleteSkinString(oPC, sVar); // Prevent Bloat!
SetLocalString(oSkin, sVar, sString);}
//-------------------------------------------------------------------------
void SetSkinObject(object oPC, string sVar, object oObject){
object oSkin = GetSkin(oPC);
DeleteSkinObject(oPC, sVar); // Prevent Bloat!
SetLocalObject(oSkin, sVar, oObject);}
//-------------------------------------------------------------------------
void SetSkinLocation(object oPC, string sVar, location lLoc){
object oSkin = GetSkin(oPC);
DeleteSkinLocation(oPC, sVar); // Prevent Bloat!
SetLocalLocation(oSkin, sVar, lLoc);}
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
// End Include...
//-------------------------------------------------------------------------
Modifié par _Guile, 08 février 2014 - 10:56 .