Чтобы написать такое чудо нужно вставить в конце кода ресурса данный код:
Code
function rWep(source)
if not isPlayerInVehicle ( source ) then
local ammo = getPedAmmoInClip ( source )
local wep = getPedWeapon( source )
if wep == 31 then
if ammo < 50 then reloadPedWeapon ( source ) end
end
if wep == 29 then
if ammo < 30 then reloadPedWeapon ( source ) end
end
if wep == 23 then
if ammo < 17 then reloadPedWeapon ( source ) end
end
if wep == 24 then
if ammo < 7 then reloadPedWeapon ( source ) end
end
if wep == 22 then
if ammo < 34 then reloadPedWeapon ( source ) end
end
if wep == 32 then
if ammo < 100 then reloadPedWeapon ( source ) end
end
if wep == 30 then
if ammo < 30 then reloadPedWeapon ( source ) end
end
if wep == 38 then
if ammo < 500 then reloadPedWeapon ( source ) end
end
if wep == 37 then
if ammo < 50 then reloadPedWeapon ( source ) end
end
if wep == 28 then
if ammo < 100 then reloadPedWeapon ( source ) end
end
if wep == 27 then
if ammo < 7 then reloadPedWeapon ( source ) end
end
end
end
И вставляем где-то:
Code
function playerSpawn ( )
bindKey(source, "R", "down", rWep)
end
addEventHandler ( "onPlayerSpawn", getRootElement(), playerSpawn )
Вот и всё!