Jump to content

help


-.Paradox.-

Recommended Posts

Posted

Hello again i'm looking for a script that can add +1 for each weapon like example if I killed a player with m4 it add 1point to m4 skills etc an thanks for help

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted

By skills you mean the weapon stats? like with UZI, if you have X stat, you can carry two UZI's.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Yes that what I mean there was a resource in community called the_gun_stats but he deleted it

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted

Use the functions posted by TAPL.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Already tried ._. with all weapons

addEventHandler( "onZombieWasted", root, 
    function (killer, weapon, bodypart )
    local weapon = getPedWeapon( source )
        if killer and killer ~= source then
            if bodypart == 9 and weapon == 22 then
                setPedStat( killer, 69, getPedStat( killer, 69 ) + 2 ); end
        elseif killer and killer ~= source then
            if bodypart == 8 and weapon == 22 then
                setPedStat( killer, 69, getPedStat( killer, 69 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 7 and weapon == 22 then
                setPedStat( killer, 69, getPedStat( killer, 69 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 6 and weapon == 22 then
                setPedStat( killer, 69, getPedStat( killer, 69 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 5 and weapon == 22 then
                setPedStat( killer, 69, getPedStat( killer, 69 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 4 and weapon == 22 then
                setPedStat( killer, 69, getPedStat( killer, 69 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 3 and weapon == 22 then
                setPedStat( killer, 69, getPedStat( killer, 69 ) + 1 ); end
        end
    end
);
 
 
addEventHandler( "onZombieWasted", root,
    function (killer, weapon, bodypart )
    local weapon = getPedWeapon( source )
        if killer and killer ~= source then
            if bodypart == 9 and weapon == 23 then
                setPedStat( killer, 69, getPedStat( killer, 70 ) + 2 ); end
        elseif killer and killer ~= source then
            if bodypart == 8 and weapon == 23 then
                setPedStat( killer, 69, getPedStat( killer, 70 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 7 and weapon == 23 then
                setPedStat( killer, 69, getPedStat( killer, 70 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 6 and weapon == 23 then
                setPedStat( killer, 69, getPedStat( killer, 70 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 5 and weapon == 23 then
                setPedStat( killer, 69, getPedStat( killer, 70 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 4 and weapon == 23 then
                setPedStat( killer, 69, getPedStat( killer, 70 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 3 and weapon == 23 then
                setPedStat( killer, 69, getPedStat( killer, 70 ) + 1 ); end
        end
    end
);
 
 
addEventHandler( "onZombieWasted", root,
    function (killer, weapon, bodypart )
    local weapon = getPedWeapon( source )
        if killer and killer ~= source then
            if bodypart == 9 and weapon == 24 then
                setPedStat( killer, 69, getPedStat( killer, 71 ) + 2 ); end
        elseif killer and killer ~= source then
            if bodypart == 8 and weapon == 24 then
                setPedStat( killer, 69, getPedStat( killer, 71 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 7 and weapon == 24 then
                setPedStat( killer, 69, getPedStat( killer, 71 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 6 and weapon == 24 then
                setPedStat( killer, 69, getPedStat( killer, 71 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 5 and weapon == 24 then
                setPedStat( killer, 69, getPedStat( killer, 71 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 4 and weapon == 24 then
                setPedStat( killer, 69, getPedStat( killer, 71 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 3 and weapon == 24 then
                setPedStat( killer, 69, getPedStat( killer, 71 ) + 1 ); end
        end
    end
);
 
 
addEventHandler( "onZombieWasted", root,
    function (killer, weapon, bodypart )
    local weapon = getPedWeapon( source )
        if killer and killer ~= source then
            if bodypart == 9 and weapon == 25 then
                setPedStat( killer, 69, getPedStat( killer, 72 ) + 2 ); end
        elseif killer and killer ~= source then
            if bodypart == 8 and weapon == 25 then
                setPedStat( killer, 69, getPedStat( killer, 72 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 7 and weapon == 25 then
                setPedStat( killer, 69, getPedStat( killer, 72 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 6 and weapon == 25 then
                setPedStat( killer, 69, getPedStat( killer, 72 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 5 and weapon == 25 then
                setPedStat( killer, 69, getPedStat( killer, 72 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 4 and weapon == 25 then
                setPedStat( killer, 69, getPedStat( killer, 72 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 3 and weapon == 25 then
                setPedStat( killer, 69, getPedStat( killer, 72 ) + 1 ); end
        end
    end
);
 
 
addEventHandler( "onZombieWasted", root,
    function (killer, weapon, bodypart )
    local weapon = getPedWeapon( source )
        if killer and killer ~= source then
            if bodypart == 9 and weapon == 26 then
                setPedStat( killer, 69, getPedStat( killer, 73 ) + 2 ); end
        elseif killer and killer ~= source then
            if bodypart == 8 and weapon == 26 then
                setPedStat( killer, 69, getPedStat( killer, 73 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 7 and weapon == 26 then
                setPedStat( killer, 69, getPedStat( killer, 73 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 6 and weapon == 26 then
                setPedStat( killer, 69, getPedStat( killer, 73 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 5 and weapon == 26 then
                setPedStat( killer, 69, getPedStat( killer, 73 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 4 and weapon == 26 then
                setPedStat( killer, 69, getPedStat( killer, 73 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 3 and weapon == 26 then
                setPedStat( killer, 69, getPedStat( killer, 73 ) + 1 ); end
        end
    end
);
 
 
addEventHandler( "onZombieWasted", root,
    function (killer, weapon, bodypart )
    local weapon = getPedWeapon( source )
        if killer and killer ~= source then
            if bodypart == 9 and weapon == 27 then
                setPedStat( killer, 69, getPedStat( killer, 74 ) + 2 ); end
        elseif killer and killer ~= source then
            if bodypart == 8 and weapon == 27 then
                setPedStat( killer, 69, getPedStat( killer, 74 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 7 and weapon == 27 then
                setPedStat( killer, 69, getPedStat( killer, 74 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 6 and weapon == 27 then
                setPedStat( killer, 69, getPedStat( killer, 74 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 5 and weapon == 27 then
                setPedStat( killer, 69, getPedStat( killer, 74 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 4 and weapon == 27 then
                setPedStat( killer, 69, getPedStat( killer, 74 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 3 and weapon == 27 then
                setPedStat( killer, 69, getPedStat( killer, 74 ) + 1 ); end
        end
    end
);
 
addEventHandler( "onZombieWasted", root,
    function (killer, weapon, bodypart )
    local weapon = getPedWeapon( source )
        if killer and killer ~= source then
            if bodypart == 9 and weapon == 28 then
                setPedStat( killer, 69, getPedStat( killer, 75 ) + 2 ); end
        elseif killer and killer ~= source then
            if bodypart == 8 and weapon == 28 then
                setPedStat( killer, 69, getPedStat( killer, 75 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 7 and weapon == 28 then
                setPedStat( killer, 69, getPedStat( killer, 75 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 6 and weapon == 28 then
                setPedStat( killer, 69, getPedStat( killer, 75 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 5 and weapon == 28 then
                setPedStat( killer, 69, getPedStat( killer, 75 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 4 and weapon == 28 then
                setPedStat( killer, 69, getPedStat( killer, 75 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 3 and weapon == 28 then
                setPedStat( killer, 69, getPedStat( killer, 75 ) + 1 ); end
        end
    end
);
 
addEventHandler( "onZombieWasted", root,
    function (killer, weapon, bodypart )
    local weapon = getPedWeapon( source )
        if killer and killer ~= source then
            if bodypart == 9 and weapon == 29 then
                setPedStat( killer, 69, getPedStat( killer, 75 ) + 2 ); end
        elseif killer and killer ~= source then
            if bodypart == 8 and weapon == 29 then
                setPedStat( killer, 69, getPedStat( killer, 75 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 7 and weapon == 29 then
                setPedStat( killer, 69, getPedStat( killer, 75 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 6 and weapon == 29 then
                setPedStat( killer, 69, getPedStat( killer, 75 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 5 and weapon == 29 then
                setPedStat( killer, 69, getPedStat( killer, 75 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 4 and weapon == 29 then
                setPedStat( killer, 69, getPedStat( killer, 75 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 3 and weapon == 29 then
                setPedStat( killer, 69, getPedStat( killer, 75 ) + 1 ); end
        end
    end
);
 
 
addEventHandler( "onZombieWasted", root,
    function (killer, weapon, bodypart )
    local weapon = getPedWeapon( source )
        if killer and killer ~= source then
            if bodypart == 9 and weapon == 32 then
                setPedStat( killer, 69, getPedStat( killer, 76 ) + 2 ); end
        elseif killer and killer ~= source then
            if bodypart == 8 and weapon == 32 then
                setPedStat( killer, 69, getPedStat( killer, 76 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 7 and weapon == 32 then
                setPedStat( killer, 69, getPedStat( killer, 76 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 6 and weapon == 32 then
                setPedStat( killer, 69, getPedStat( killer, 76 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 5 and weapon == 32 then
                setPedStat( killer, 69, getPedStat( killer, 76 ) + 1 ); end
        elseif killer and killer ~= source then
            if bodypart == 4 and weapon == 32 then
               

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted

You can reduce this amount of lines by setting up a table and store weapons & stats inside.

Can you tell us what is the problem with the above code?

F4MZM4.gif

Posted

Nothing in debug i just tried to do that for all weapon and every weapon by it stat like example

Weapon id is 22 id of pistol skill is 69

etc...

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...