hi when entering a vehicle, change weapon to driveby type. this is the idea.
function onPlayerEnterVehicle( player, vehicle, door )
{
local wepid = player.GetWeaponAtSlot( 5);
local ammo = player.GetAmmoAtSlot(5);
if(wepid != 0 )player.SetWeapon( wepid, ammo );
}
but this is not working correctly in game, the ammo increases when entering vehicle.
Try adding that code inside that VC:MP callback to onPlayerEnteringVehicle.
Try player.SetWeapon(wepid,0)
guys first of all, i left the problem. ie. what to us if the poorplayer get little ammo
and i think it was problem with bug.
Quote from: DarkRaZoR^ on Feb 09, 2020, 01:27 AMTry adding that code inside that VC:MP callback to onPlayerEnteringVehicle.
tried and found not working still
Quote from: Athanatos on Feb 09, 2020, 11:32 AMTry player.SetWeapon(wepid,0)
if we do that, weapon itself gone.
bug, i mean, with vcmp
ie. player.GetAmmoAtSlot
I faced this problem too, and yeah - seems like we cannot get the ammo of player's weapon while in a car.
But I think this was happening only for passengers - don't know about driver.
player.Slot = 5;