- Initiateur de la discussion
Yoh Sambre ♪
Shaman Fou
- Messages
- 16 292
- Score réaction
- 9 688
- Points
- 1 845
YO ,
alors je vais la faire courte il y'a de cela un moment @Makss avait pondu un code pour blacklist des props via un fichier , et j'avais promit que la version sans FPP serait délivré au plus vite ,
bref :
alors je vais la faire courte il y'a de cela un moment @Makss avait pondu un code pour blacklist des props via un fichier , et j'avais promit que la version sans FPP serait délivré au plus vite ,
bref :
lua/autorun/server
Code:
local blacklistedProps = { ['models/props_buildings/project_destroyedbuildings01.mdl'] = true, ['models/props_combine/CombineTrain02b.mdl'] = true, ['models/Combine_Room/combine_monitor002.mdl'] = true, ['models/Combine_Room/combine_monitor003a.mdl'] = true, ['models/Cranes/crane_body_LOD.mdl'] = true, ['models/Cranes/crane_docks.mdl'] = true, ['models/Cranes/crane_frame.mdl'] = true, ['models/Cranes/crane_frame_interior.mdl'] = true, ['models/props_wasteland/rockgranite04c.mdl'] = true, ['models/props_wasteland/rockgranite04b.mdl'] = true, ['models/props_phx/amraam.mdl'] = true, ['models/props_phx/ball.mdl'] = true, ['models/props_phx/cannonball.mdl'] = true, ['models/props_phx/misc/flakshell_big.mdl'] = true, ['models/props_phx/mk-82.mdl'] = true, ['models/Cranes/crane_docks.mdl'] = true, ['models/props_phx/torpedo.mdl'] = true, ['models/props_phx/ww2bomb.mdl'] = true, ['models/Cranes/crane_docks.mdl'] = true, ['models/props/de_nuke/containmentbuilding.mdl'] = true, ['models/props_trainyard/train_building001.mdl'] = true, ['models/props_trainyard/train_building001b.mdl'] = true, ['models/props_farm/building001.mdl'] = true, ['models/props_farm/building002.mdl'] = true, ['models/props_debris/donner_building1_wall1.mdl'] = true, ['models/props_debris/donner_building1_corner2.mdl'] = true, ['models/props_buildings/CollapsedBuilding01a.mdl'] = true, ['models/props_buildings/CollapsedBuilding01aWall.mdl'] = true, ['models/props_buildings/CollapsedBuilding02a.mdl'] = true, ['models/props_buildings/CollapsedBuilding02b.mdl'] = true, ['models/props_buildings/CollapsedBuilding02c.mdl'] = true, ['models/props_buildings/building_002a.mdl'] = true,
}
local function checkModels(ply, model) if !ply:IsAdmin() and blacklistedProps[model] then ply:SendLua([[notification.AddLegacy("Vous ne pouvez pas faire spawn ce props",NOTIFY_ERROR,2)]]) return false end
end
hook.Add("PlayerSpawnEffect","blacklistBadProps",checkModels)
hook.Add("PlayerSpawnNPC","blacklistBadProps",checkModels)
hook.Add("PlayerSpawnObject","blacklistBadProps",checkModels)
hook.Add("PlayerSpawnProp","blacklistBadProps",checkModels)
hook.Add("PlayerSpawnRagdoll","blacklistBadProps",checkModels)
hook.Add("PlayerSpawnSENT","blacklistBadProps",checkModels)
hook.Add("PlayerSpawnSWEP","blacklistBadProps",checkModels)
hook.Add("PlayerSpawnVehicle","blacklistBadProps",checkModels)
MAKE SECURITY SERVER GREAT AGAIN