Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Script written by Havanna (http://steamcommunity.com/id/HavannaPC/)
- -- CONFIGURE HERE
- local FastFoodTexture = "mc_donald" -- tacobell, mc_donald, quick, kfc
- local BankTexture = "credit_agricole" -- bank_of_america, credit_agricole, societe_generale, bn_paribas
- local PoliceStationTexture = "police_fr" -- police_departementale, police_fr, police_be, police_qc
- -- DONT EDIT HERE
- local FastFoodTextures = {["tacobell"] = {"brush1_taco"}, ["mc_donald"] = {"brush_pub_mcdo", "dyn_pan_mcdo"}, ["quick"] = {"brush_pub_quick", "dyn_pan_quick"}, ["kfc"] = {"brush_kfc", "dyn_kfc"}}
- local PoliceStationTextures = {["police_departementale"] = {"brush_police_dp"}, ["police_fr"] = {"brush_police_fr", "dyn_police_fr"}, ["police_be"] = {"brush_police_be", "dyn_police_be"}, ["police_qc"] = {"brush_police_qc"}}
- local BankTextures = {["credit_agricole"] = {"brush1_credit"}, ["societe_generale"] = {"brush1_sg"}, ["bn_paribas"] = {"brush1_bnp"}, ["bank_of_america"] = {"brush1_boa"}}
- local TexturesIndex = {["tacobell"] = "0", ["mc_donald"] = "1", ["quick"] = "2", ["kfc"] = "3", ["bank_of_america"] = "6", ["credit_agricole"] = "7", ["societe_generale"] = "8", ["bn_paribas"] = "9", ["police_departementale"] = "10", ["police_fr"] = "11", ["police_be"] = "12", ["police_qc"] = "13"}
- local function EditEntity(ent, value)
- for k, v in pairs (ent) do
- for k, v in pairs(ents.FindByName(v)) do v:Fire(value) end
- end
- end
- local function EditBuilding(current_table, button_ent, current_value)
- for k, v in pairs (current_table) do
- if k == current_value then
- EditEntity(v, "Enable")
- else
- EditEntity(v, "Disable")
- end
- end
- for k, v in pairs(ents.FindByName(button_ent)) do v:Fire("SetTextureIndex", TexturesIndex[current_value]) end
- end
- local function custom_buildings()
- timer.Simple( 5, function()
- EditBuilding(FastFoodTextures, "texturetoggle_fastfood", FastFoodTexture)
- EditBuilding(BankTextures, "texturetoggle_bank", BankTexture)
- EditBuilding(PoliceStationTextures, "texturetoggle_police", PoliceStationTexture)
- end)
- end
- hook.Add("InitPostEntity", "rp_rockford_open", custom_buildings)
- hook.Add("PostCleanupMap", "rp_rockford_open", custom_buildings)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement