MAB Posted August 20, 2015 Posted August 20, 2015 i put a car mod in the server. now how to make the mod visible for someplayers only?
GTX Posted August 20, 2015 Posted August 20, 2015 You can't. Only if you want to load mods for only 1 player.
t3wz Posted August 20, 2015 Posted August 20, 2015 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 )
MAB Posted August 20, 2015 Author Posted August 20, 2015 GTX please show me that way. t3wz what does ; mean? after the trigger client event.
JR10 Posted August 21, 2015 Posted August 21, 2015 You can trigger the client event that loads the mod for certain players only.
Dealman Posted August 21, 2015 Posted August 21, 2015 t3wz what does ; mean? after the trigger client event. The semicolon is used as a terminator, usually to tell the compiler where a line of code ends. But due to the way Lua works - this isn't necessary.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now