kewiiNNN Posted November 14, 2015 Share Posted November 14, 2015 I made private car script so only i can enter the car how to make about the skin? lua for private car function enterVehicle (player, seat, jacked) local accName = getAccountName ( getPlayerAccount ( player ) ) if not isObjectInACLGroup("user."..accName, aclGetGroup ( "Owner" )) and getElementModel(source) == 411 then cancelEvent() outputChatBox ( "[ERROR] *You're not a OWNER of this server!", player ) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle ) Link to comment
Tekken Posted November 14, 2015 Share Posted November 14, 2015 Skin for Car or Ped ? You can use this: CLIENT local firewall = { "SERIAL", "SERIAL2" } addEventHandler("onClientResourceStart", resourceRoot, function() local serial = getPlayerSerial(); for _,v in ipairs(firewall) do if (serial == v) then --ApplyTheSkinNow end end end); Link to comment
jingzhi Posted November 15, 2015 Share Posted November 15, 2015 Skin for Car or Ped ?You can use this: CLIENT local firewall = { "SERIAL", "SERIAL2" } addEventHandler("onClientResourceStart", resourceRoot, function() local serial = getPlayerSerial(); for _,v in ipairs(firewall) do if (serial == v) then --ApplyTheSkinNow end end end); I think he should use usernames but not serials on this one Link to comment
Tekken Posted November 15, 2015 Share Posted November 15, 2015 Skin for Car or Ped ?You can use this: CLIENT local firewall = { "SERIAL", "SERIAL2" } addEventHandler("onClientResourceStart", resourceRoot, function() local serial = getPlayerSerial(); for _,v in ipairs(firewall) do if (serial == v) then --ApplyTheSkinNow end end end); I think he should use usernames but not serials on this one Yes but username will be a bit harder. 1 Link to comment
kewiiNNN Posted November 15, 2015 Author Share Posted November 15, 2015 for a mod skin ped Link to comment
Tekken Posted November 15, 2015 Share Posted November 15, 2015 I give'd you the solution! Link to comment
t3wz Posted November 15, 2015 Share Posted November 15, 2015 addEventHandler ( "onElementModelChange", root, function ( oldModel ) if getElementType ( source ) == "player" then if not isObjectInACLGroup( "user."..getAccountName ( getPlayerAccount ( source ) ), aclGetGroup ( "Owner" ) ) then if getElementModel ( source ) == SKIN_ID_HERE then outputChatBox ( "Only the server owners can use this skin", source, 255, 0, 0 ); -- for some reason using setElementModel without a timer doesn't set the skin setTimer ( function(p) setElementModel ( p, oldModel ); end , 100, 1, source ); end end end end ); don't forget to change SKIN_ID_HERE. Link to comment
jingzhi Posted November 15, 2015 Share Posted November 15, 2015 Skin for Car or Ped ?You can use this: CLIENT local firewall = { "SERIAL", "SERIAL2" } addEventHandler("onClientResourceStart", resourceRoot, function() local serial = getPlayerSerial(); for _,v in ipairs(firewall) do if (serial == v) then --ApplyTheSkinNow end end end); I think he should use usernames but not serials on this one Yes but username will be a bit harder. If he use serial instead of username the players will not be able to get in their car if they use a new computer Link to comment
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