Ok, so, I have a darkrp server, and in my server, I have car dealers, the only class that can spawn cars. But there's a huge flaw with vehicles in darkrp that I'm sure anyone who's played darkrp with vehicles knows about. While in vehicles you are invincible. Because of this I have two rules in my server, a, the you cannot use a vehicle as a weapon, and b, that if someone bat rams you out of a car, you are now allowed to get back in. I would like to get rid of these two rules, but the only way I can do that is if I find a way to make cars destructable or rewrite the lua so that people can be shot while driving them. Anyone got any ideas?
Try this, stick it somewhere in player.lua
[lua]
function GM:EntityTakeDamage( ent, inflictor, attacker, amount, dmginfo )
if ( ent:IsVehicle() and dmginfo:IsBulletDamage()) then
if ( ent:IsPlayer() and ent:InVehicle() ) then
dmginfo:SetDamage(2)
end
end
end
[/lua]
I just looked over that entire file. It is mostly stuff like restrictions on players names like min 3 max 30 char and can't be named world, it also deals with arrests, warrants and that sort of thing. RP name mostly but nothing at all about player damage or vehicles.
Looter I thought your reply was just random and illogical and gramtically incorrect and just pointing me in the direction of the file until I loaded it once and could have sworn for a split second I saw some command lines in there. But yet when the page is fully loaded I see nothing which is strange. If you wrote a command line or two its not showing up which is...wierd.
Sorry, you need to Log In to post a reply to this thread.