• Darkrp help
    2 replies, posted
people can delete own cars in button c, how fix it.
[QUOTE=Moat;51685324]You can use the [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/SANDBOX/CanProperty]SANDBOX:CanProperty[/url] hook, check if the entity is a vehicle and the player owns the entity, then prevent them from using it. [lua] hook.Add("CanProperty", "block_removing_own_cars", function(ply, property, ent) if (ent:IsVehicle() and ent:CPPIGetOwner() == ply and property == "remover") then return false end end) [/lua][/QUOTE] thanks you, its work
Sorry, you need to Log In to post a reply to this thread.