Hey I've tried for a long time to make super admins able to physgun cars.
Like Superadmins> can pickup cars.
Can somebody help me?
Super admins should be able to physgun cars unless you have some sort of prop protection addon installed.
[lua]
function PickupVehicles( pl, ent )
if ( ent:GetClass() == "vehicle" and pl:IsSuperAdmin() ) then
return true
else
return false
end
end
hook.Add("PhysgunPickup", "VehiclePickup", PickupVehicles)
[/lua]
Untested, but don't see why it wouldn't work.
[QUOTE=uberpwns;27090445]Super admins should be able to physgun cars unless you have some sort of prop protection addon installed.
[lua]
function PickupVehicles( pl, ent )
if ( ent:GetClass() == "vehicle" and ply:IsSuperAdmin() ) then
return true
else
return false
end
end
hook.Add("PhysgunPickup", "VehiclePickup", PickupVehicles)
[/lua]
Untested, but don't see why it wouldn't work.[/QUOTE]
The reason it won't work is because ply is nil. The identifier you use on line 1 is "pl" then you used ply on line 2.
Sorry, fixed.
Sorry, you need to Log In to post a reply to this thread.