Jump to content

Replace Skin (export:GROUP SYSTEm)


Annas

Recommended Posts

I have this Script (if you are in Group name "The_Street_Fighters" then gate will open to you )

S-SIDE

col1  = createColTube(1446.4560546875, 664.87237548828, 9.671875, 15, 15) 
  
gate1 = createObject(980, 1446.7, 663.09998, 12.4 , 0, 0, 177.999)    
  
function openGate1(player) 
    if (player and isElement(player) and getElementType(player)) == "player" then 
        local gang = exports["CSTgang"]:getPlayerGang(player); 
        if (gang and gang == "The_Street_Fighters") then 
            moveObject(gate1, 980, 1446.7, 663.09998, 6.7)  
        end 
    end 
end   
addEventHandler("onColShapeHit", col1, openGate1) 

i try to convert this resource to Skin Mod(Replace Skin)

S-SIDE

function ReplaceSkin(player) 
    if (player and isElement(player) and getElementType(player)) == "player" then 
        local gang = exports["CSTgang"]:getPlayerGang(player); 
        if (gang and gang == "The_Street_Fighters") then 
        txd = engineLoadTXD ( "wmyclot.txd" ) 
            engineImportTXD ( txd, 217) 
        dff = engineLoadDFF ( "wmyclot.dff", 217) 
        engineReplaceModel ( dff, 217) 
        end 
    end 
end   
addEventHandler("onResourceStart",  ReplaceSkin) 

Just i need it (replace skin if you are in Group name "The_Street_Fighters" )

I Wish you understand this :D as what i thing it's easy .

Link to comment

It should be client, not server:

-- CLIENT 
function ReplaceSkin() 
    local gang = exports["CSTgang"]:getPlayerGang(getLocalPlayer()); 
    if (gang and gang == "The_Street_Fighters") then 
        txd = engineLoadTXD ( "wmyclot.txd" ); 
        engineImportTXD ( txd, 217); 
        dff = engineLoadDFF ( "wmyclot.dff", 217); 
        engineReplaceModel ( dff, 217); 
    end 
end   
addEventHandler("onClientResourceStart", resourceRoot, ReplaceSkin) 

Link to comment
and how can i make it with command ?

like if i do "t/customskin" and im in the_street_fighters group then it will applyed the NEW Skin ..

replace this

addEventHandler("onClientResourceStart", resourceRoot, ReplaceSkin) 

with this

addCommandHandler("customskin", ReplaceSkin) 

Link to comment

Not work .. (help pls)

CLIENT SIDE :

-- CLIENT 
function ReplaceSkin() 
    local gang = exports["CSTgang"]:getPlayerGang(getLocalPlayer()); 
    if (gang and gang == "HoBoS") then 
        txd = engineLoadTXD ( "uipmalestaff.txd" ); 
        engineImportTXD ( txd, 217); 
        dff = engineLoadDFF ( "uipmalestaff.dff", 217); 
        engineReplaceModel ( dff, 217); 
    end 
end   
addCommandHandler("customskin", ReplaceSkin) 
  

META :

    "CSTgroupskin" author="iAnnAs" description="Group Skin" version="1.0" type="script">
    
  
    "uipmalestaff.dff" type="client"/> 
    "uipmalestaff.txd" type="client"/> 

  

FILES :

uipmalestaff.dff

uipmalestaff.txd

Link to comment
Are you sure that the export function is client side because i'm pretty sure that it's server side.
exports["CSTgang"]:getPlayerGang 

idk xD , let me check 1min ..

-----------------------------------------

xD , Mr.Pro yes it's Server Side

    function="getPlayerGang" type="server"/> 

So what i'll do now ? make a copy and edit it to Client Side ? Like this

    function="getPlayerGang" type="client"/> 

Link to comment
Are you sure that the export function is client side because i'm pretty sure that it's server side.
exports["CSTgang"]:getPlayerGang 

idk xD , let me check 1min ..

-----------------------------------------

xD , Mr.Pro yes it's Server Side

    function="getPlayerGang" type="server"/> 

So what i'll do now ? make a copy and edit it to Client Side ? Like this

    function="getPlayerGang" type="client"/> 

lol, now i will never help you because you have proved to me that you are not the owner of the script .

Leacked resource.

Link to comment
Are you sure that the export function is client side because i'm pretty sure that it's server side.
exports["CSTgang"]:getPlayerGang 

idk xD , let me check 1min ..

-----------------------------------------

xD , Mr.Pro yes it's Server Side

    function="getPlayerGang" type="server"/> 

So what i'll do now ? make a copy and edit it to Client Side ? Like this

    function="getPlayerGang" type="client"/> 

lol, now i will never help you because you have proved to me that you are not the owner of the script .

Leacked resource.

so ?? , if it's not my script ? no help ? -_-

Link to comment

so ?? , if it's not my script ? no help ? -_-

Yeh next time try to do it by yourself , so i recommend your to read this page before you start thinking to use leaked resources.

so it's ok ..

can you help me with this last script ? (i swear i just have 2 leaked scripts (Group system/Turf System) and others are mine ..

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...