Sign in to follow this  
dewu

Set reload after 1shot

Recommended Posts

Hi guys. I was added new weapon (Crossbow) and now i want to set reload after one shot, is this possible?

Weapon ID: 29 (MP5 in GTA).

Share this post


Link to post
Could you give me whole of script?

I am newbie :)

1327253672_no-meme.jpg

Just learn LUA, don't be lazy

Share this post


Link to post
Could you give me whole of script?

I am newbie :)

1327253672_no-meme.jpg

Just learn LUA, don't be lazy

Thanks.

Share this post


Link to post

I write something like that, but's not works, why?

 function rWep(source)    
      local ammo = onClientPlayerWeaponFire ( source )    
      local wep = getPedWeapon( source )    
      if    wep == 29    then    
       if    ammo    then    reloadPedWeapon ( source )    end     
      end         
     end      
end 

Edited by Guest

Share this post


Link to post
setWeaponProperty("weapon_name", "weapon_skill_level_to_affect", "property_name", property_value) 

...

Share this post


Link to post

Are you even trying to learn? All I've seen so far from you since you started posting is you basically asking people to write the scripts for you.

Share this post


Link to post
Are you even trying to learn? All I've seen so far from you since you started posting is you basically asking people to write the scripts for you.

Yeah, I've tried and I'm still learing from few days.

But not understand how can I use setWeaponProperty to receive the desired effect.

I asked for whole of that script, because my scripts don't works.

And when I asked what's wrong in that what i wrote, but there where people helps other - you tell me to Learn the LUA :?

If I had no had problems with it, i was never wrote there.

Also, i've tried that:

    addEventHandler('onClientPlayerWeaponFire', localPlayer, 
    function(weapon) 
        if (getPedAmmoInClip == -1 ) then 
        if( weapon == 29 ) then 
    reloadPedWeapon ( weapon ) 
        end 
    end 
    end) 

and it's too not works.

Share this post


Link to post

Refresh

Also i've tried by use setWeaponProperty:

    function doammo() 
    setWeaponProperty(29, "pro", "maximum_clip_ammo", 1) 
    setWeaponProperty(29, "std", "maximum_clip_ammo", 1) 
    setWeaponProperty(29, "poor", "maximum_clip_ammo", 1) 
    end 
    addEventHandler("onClientResourceStart", getResourceRootElement(), doammo) 
  

nothing.

Share this post


Link to post
thanks for "help".

Sarcasm will get you no where here, just because we won't write your scripts for you it doesn't mean you have to be an ass.

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.