DeathMta Posted September 24, 2015 Posted September 24, 2015 I need a car to privatize spawnear to a specific account function autovip(thePlayer,veh) local Cuenta = getAccountName (getPlayerAccount(thePlayer)) if isObjectInACLGroup ("user."..Cuenta, aclGetGroup ( "VIP" ) ) then local x, y, z = getElementPosition ( thePlayer ) local theVehicle = getPedOccupiedVehicle ( thePlayer ) veh = createVehicle(411,x+1,y,z) vehCol = createColSphere(x+1,y,z,2) attachElements ( vehCol, veh, 0, 0, 0 ) setElementData(vehCol,"parent",veh) setElementData(veh,"parent",vehCol) setElementData(vehCol,"vehicle",true) setElementData(vehCol,"MAX_Slots",300) setElementData(vehCol,"Tire_inVehicle",4) setElementData(vehCol,"Engine_inVehicle",2) setElementData(vehCol,"Parts_inVehicle",1) setElementData(vehCol,"fuel",60) setVehicleDamageProof(veh, true) addVehicleUpgrade ( veh, 1010 ) warpPedIntoVehicle(thePlayer,veh) triggerClientEvent("displayClientInfo", thePlayer, " #FFFFFFHe sacado un auto vip" , 84, 84, 84) setTimer ( function() destroyElement(veh) destroyElement(vehCol) end,600000 , 1 ) else outputChatBox("Usted deve ser [VIP Full] para sacar el Auto o Carro, hable con Admin [D]eath!", thePlayer,84,84,84,true) end end addCommandHandler("auto", autovip) Vehicles = { [411]=true } function lockPrivate( thePlayer, seat, jacked ) if getElementType ( thePlayer ) == "player" then if ( Vehicles[getElementModel ( source )] ) and ( seat == 0 ) then local account = getPlayerAccount( thePlayer ) local accountName = ( account and getAccountName ( account ) or "" ) if not( accountName == "Death" ) then removePedFromVehicle( thePlayer ) triggerClientEvent("displayClientInfo", thePlayer, " #FFFFFFEste Vehiculo Es De un Vip Full!" , 84, 84, 84) else triggerClientEvent("displayClientInfo", thePlayer, " #FFFFFFBienvenido "..getPlayerName ( thePlayer ).. "", 84, 84, 84) end end end end addEventHandler ( "onVehicleEnter", getRootElement(), lockPrivate ) I want to privatize this function Vehicles = { [411]=true } function lockPrivate( thePlayer, seat, jacked ) if getElementType ( thePlayer ) == "player" then if ( Vehicles[getElementModel ( source )] ) and ( seat == 0 ) then local account = getPlayerAccount( thePlayer ) local accountName = ( account and getAccountName ( account ) or "" ) if not( accountName == "Death" ) then removePedFromVehicle( thePlayer ) triggerClientEvent("displayClientInfo", thePlayer, " #FFFFFFEste Vehiculo Es De un Vip Full!" , 84, 84, 84) else triggerClientEvent("displayClientInfo", thePlayer, " #FFFFFFBienvenido "..getPlayerName ( thePlayer ).. "", 84, 84, 84) end end end end addEventHandler ( "onVehicleEnter", getRootElement(), lockPrivate ) Nesecitas Ayudas solo Mandame PM!! Death Scripts Ayudando a la comunidad sin fines de lucro!
wwz Posted September 25, 2015 Posted September 25, 2015 Make your Script Client Sided if You want car to be only for specific client
DeathMta Posted September 26, 2015 Author Posted September 26, 2015 okey thank you Nesecitas Ayudas solo Mandame PM!! Death Scripts Ayudando a la comunidad sin fines de lucro!
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