Oh I see in your picture that you have stored the vehicle model ids and not the vehicle ids related to your config.ini file.
The only way I can think to get a player's vehicle model id, is from when they enter a vehicle.
If you feel you can add the code inside the 4 signals to the 4 signals in your script, and add the 2 alias's to your script, then do so.
Otherwise just put these 4 signals and 2 alias's into a new blank script.
The reason for this is you cannot have 2 of the same signal names in the same script, and I am assuming that you already have these 4 signal names in your script.
on *:SIGNAL:vcmp.enter:{
var %name = $1, %id = $vcmp.getid(%name)
!hadd -m vcmp %id $+ .carmodelid $3
}
on *:SIGNAL:vcmp.exit:{
var %name = $1, %id = $vcmp.getid(%name)
!hdel vcmp %id $+ .carmodelid
}
on *:SIGNAL:vcmp.kill:{
var %name = $2, %id = $vcmp.getid(%name)
!hdel vcmp %id $+ .carmodelid
}
on *:SIGNAL:vcmp.part:{
var %name = $1, %id = $vcmp.getid(%name)
!hdel vcmp %id $+ .carmodelid
}
alias vcmp.carmodelid !return $iif($hget(vcmp,$1 $+ .carmodelid) != $null,$v1,-1)
alias vcmp.carname !return $iif($readini(vcmp.data.ini,cars,$vcmp.carmodelid($1)) != $null,$v1,Unknown)
And here is the other code
elseif ($2 == !car) || ($2 == !pmcar) {
if ($vcmp.cmdcheck(!car,%id) == fail) !halt
elseif (%a == -1) vcmp.msg %id Error - Absent ID/Name
elseif ($vcmp.vehicle(%a,id) == 0) vcmp.msg %id Error - $vcmp.name(%a) is currently on foot!
else vcmp.msg %id Vehicle - Name: $vcmp.carname(%a) , ID: $+($chr(91),$vcmp.vehicle(%a,id),$chr(93)) , Damage: $+($chr(91),$calc(100 - $vcmp.vehicle(%id,hp)),%,$chr(93)) $+
}
Hope it works,
Mex