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? You can find me here.
GTX Posted August 20, 2015 Posted August 20, 2015 You can't. Only if you want to load mods for only 1 player. Do you require a paid scripter? Contact me! (Unavailable) Currently I am experienced in Lua, PHP, HTML, CSS, SQL and JS. Developer and owner of https://projectbea.st - Project Beast
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. You can find me here.
JR10 Posted August 21, 2015 Posted August 21, 2015 You can trigger the client event that loads the mod for certain players only. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
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. If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.
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