Jump to content

mods: dff and txd question


MAB

Recommended Posts

hmm, if i understand it correctly you can do with triggerClientEvent, but i never did this, so you have to test it.

Server:

Serials = { 
    ["15645sads1a6asd6a4ds55dsa4j1as6d"] = true, 
    ["abc123def456"] = true 
    --[[ 
        Serials that will see the mod 
        you can use accounts, nicks etc 
    --]] 
} 
  
  
function startMod ( thePlayer ) 
    if Serials[ getPlayerSerial ( thePlayer ) ] then 
        triggerClientEvent ( thePlayer, "loadmod", thePlayer ); 
    else 
        outputChatBox ( "you aren't allowed to use this mod.", thePlayer, 255, 0, 0 ) 
    end 
end 
addCommandHandler ( "mod", startMod ) 

Client:

function loadMod ( ) 
    outputChatBox ( "ok" ); 
    --[[ 
        here you import the txd, replace it etc 
    ]] 
end 
addEvent ( "loadmod", true ) 
addEventHandler ( "loadmod", root, loadMod ) 

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...