Tekken Posted October 11, 2014 Share Posted October 11, 2014 I create this for VIP System But i want to be used 1 time per life wath should i doo ? function SpawnDayZSanchez(thePlayer) accountname = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user." .. accountname, aclGetGroup("VIP")) then do local x, y, z = getElementPosition(thePlayer) veh = createVehicle(468, x + 5, y, z) vehCol = createColSphere(x + 5, y, z, 4) attachElements(vehCol, veh, 0, 0, 0) setElementData(vehCol, "parent", veh) setElementData(veh, "parent", vehCol) setElementData(vehCol, "vehicle", true) setElementData(vehCol, "MAX_Slots", 6) local tires, engine, parts = getVehicleAddonInfos(getElementModel(veh)) setElementData(vehCol, "Tire_inVehicle", 2) setElementData(vehCol, "Engine_inVehicle", 1) setElementData(vehCol, "Parts_inVehicle", 1) setElementData(vehCol, "spawn", { 468, x, y, z }) setElementData(vehCol, "fuel", 30) setTimer(outputChatBox, 50, 1, "#6002B1[VSC]#FFFFFF-Ai Spawnat Sanchez!", thePlayer, 171, 205, 239, true) end else outputChatBox("#6002B1[VSC]#FF0000-Nu esti VIP!", thePlayer, 171, 205, 239, true) end end addCommandHandler("vips", SpawnDayZSanchez) vehicleAddonsInfo = { { 468, 2, 1, 1 } } function getVehicleAddonInfos(id) for i, veh in ipairs(vehicleAddonsInfo) do if veh[1] == id then return veh[2], veh[3], veh[4] end end end vehicleFuelInfo = { {468, 0.1} } function getVehicleAddonInfos(id) for i, veh in ipairs(vehicleAddonsInfo) do if veh[1] == id then return veh[2], veh[3], veh[4] end end end vehicleFuelTable = { {468, 80} } function getVehicleMaxFuel(loot) local modelID = getElementModel(getElementData(loot, "parent")) for i, vehicle in ipairs(vehicleFuelTable) do if modelID == vehicle[1] then return vehicle[2] Link to comment
Tekken Posted October 11, 2014 Author Share Posted October 11, 2014 can you show me a example? Link to comment
Anubhav Posted October 11, 2014 Share Posted October 11, 2014 function SpawnDayZSanchez(thePlayer) accountname = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user." .. accountname, aclGetGroup("VIP")) then local data = getAccountData(getPlayerAccount(thePlayer), "one-time-life") if data == true then return outputChatBox("Sorry you can use this command once in life!", thePlayer) end local x, y, z = getElementPosition(thePlayer) veh = createVehicle(468, x + 5, y, z) vehCol = createColSphere(x + 5, y, z, 4) attachElements(vehCol, veh, 0, 0, 0) setElementData(vehCol, "parent", veh) setElementData(veh, "parent", vehCol) setElementData(vehCol, "vehicle", true) setElementData(vehCol, "MAX_Slots", 6) local tires, engine, parts = getVehicleAddonInfos(getElementModel(veh)) setElementData(vehCol, "Tire_inVehicle", 2) setElementData(vehCol, "Engine_inVehicle", 1) setElementData(vehCol, "Parts_inVehicle", 1) setElementData(vehCol, "spawn", { 468, x, y, z }) setAccountData(getPlayerAccount(thePlayer), "one-time-life", true) setElementData(vehCol, "fuel", 30) setTimer(outputChatBox, 50, 1, "#6002B1[VSC]#FFFFFF-Ai Spawnat Sanchez!", thePlayer, 171, 205, 239, true) end else outputChatBox("#6002B1[VSC]#FF0000-Nu esti VIP!", thePlayer, 171, 205, 239, true) end end 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