@name Speedometer
@persist SpeedLimit
interval(100)
if (first()) {
    SpeedLimit=60 #speed limit
}
if (0 & owner():keyUse() & owner():aimEntity():type()=="player" & owner():aimEntity():pos():distance(owner():pos())<50) {
    concmd("say /me weapon frisks "+(owner():aimEntity():name()))
    Player=owner():aimEntity()
    Weps=Player:getWeapons()
    String=Player:name()+"'s weapons: "
    Names=array()
    for (I=1, Weps:count()) {
        Names[Names:count()+1,string]=Weps[I,entity]:type()
    }
    String=String+(Names:concat(", "))
    print(String)
}
if (owner():aimEntity():type():matchFirst("vehicle")) {
    Vel=owner():aimEntity():vel()
    Speed=Vel:x()+Vel:y()
    Speed=Speed/10
    print(_HUD_PRINTCENTER,""+abs(round(Speed))+" MPH")
    if (abs(Speed)>SpeedLimit) {
        Vehicle=owner():aimEntity()
        Driver=Vehicle:driver()
        if (Driver & !Driver:isAuthorisedPersonnel()) {
            Namet=Driver:name():explode(" ")
            Name=Namet[Namet:count(),string]
            if (!Name) {Name=Driver:name()}
            concmd("say /wanted "+Name+" [AUTO] Speeding")
        }
    }
    
}



