Jump to content

stats


rabe3

Recommended Posts

السلام عليكم

تبع السلاح عندما اقتل شخص بلسلاح يزيد مهارت السلاح +1 بس مايعمل مدري ليش stats عندي مود يزيد

exports.scoreboard:addScoreboardColumn("WepPoints",getRootElement(),6,60) 
  
function PlayerKill ( killer, weapon, bodypart) 
local slot = getPedWeapon(killer) 
  
for _,player in ipairs(getElementsByType("player")) do 
bindKey(player,"next_weapon",PlayerKill) 
bindKey(player,"previous_weapon",PlayerKill) 
  
  
  
if (killer and killer ~= source) then 
if ( bodypart == 9) then 
setPedStat(killer, stat, getPedStat(killer, stat)+5) 
setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) 
  
elseif (killer and killer ~= source) then 
if ( bodypart ==  -- s8) -->
setPedStat(killer, stat, getPedStat(killer, stat)+1) 
setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) 
  
elseif (killer and killer ~= source) then 
if ( bodypart == 7) then 
setPedStat(killer, stat, getPedStat(killer, stat)+1) 
setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) 
  
elseif (killer and killer ~= source) then 
if ( bodypart == 6) then 
setPedStat(killer, stat, getPedStat(killer, stat)+1) 
setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) 
  
elseif (killer and killer ~= source) then 
if ( bodypart == 5) then 
setPedStat(killer, stat, getPedStat(killer, stat)+1) 
setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) 
  
elseif (killer and killer ~= source) then 
if ( bodypart == 4) then 
setPedStat(killer, stat, getPedStat(killer, stat)+1) 
setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) 
  
elseif (killer and killer ~= source) then 
if ( bodypart == 3) then 
setPedStat(killer, stat, getPedStat(killer, stat)+1) 
setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) 
                                    end 
                                end 
                            end 
                        end 
                    end 
                end 
            end 
        end 
    end 
end 
  
addEventHandler("onPlayerWasted",getRootElement(),PlayerKill) 

Link to comment

عليكم السلام

ايش هذا؟

local slot = getPedWeapon(killer) 
  
for _,player in ipairs(getElementsByType("player")) do 
bindKey(player,"next_weapon",PlayerKill) 
bindKey(player,"previous_weapon",PlayerKill) 

وين معرف؟ stat المتغير

Link to comment
عليكم السلام

ايش هذا؟

local slot = getPedWeapon(killer) 
  
for _,player in ipairs(getElementsByType("player")) do 
bindKey(player,"next_weapon",PlayerKill) 
bindKey(player,"previous_weapon",PlayerKill) 

وين معرف؟ stat المتغير

مش فاهم

Link to comment
عليكم السلام

ايش هذا؟

local slot = getPedWeapon(killer) 
  
for _,player in ipairs(getElementsByType("player")) do 
bindKey(player,"next_weapon",PlayerKill) 
bindKey(player,"previous_weapon",PlayerKill) 

وين معرف؟ stat المتغير

مش فاهم

يعني مثلا هذا

setPedStat(killer, stat, getPedStat(killer, stat)+5) 

stat المتغير

وين معرف؟ مو معرف

Link to comment
عليكم السلام

ايش هذا؟

local slot = getPedWeapon(killer) 
  
for _,player in ipairs(getElementsByType("player")) do 
bindKey(player,"next_weapon",PlayerKill) 
bindKey(player,"previous_weapon",PlayerKill) 

وين معرف؟ stat المتغير

مش فاهم

يعني مثلا هذا

setPedStat(killer, stat, getPedStat(killer, stat)+5) 

stat المتغير

وين معرف؟ مو معرف

ممكن تسويه لي لاني مش فاهم

Link to comment

جرب

exports.scoreboard:addScoreboardColumn("WepPoints",getRootElement(),6,60) 
  
function PlayerKill ( killer, weapon, bodypart, stat) 
local slot = getPedWeapon(killer) 
  
for _,player in ipairs(getElementsByType("player")) do 
bindKey(player,"next_weapon",PlayerKill) 
bindKey(player,"previous_weapon",PlayerKill) 
  
  
  
if (killer and killer ~= source) then 
if ( bodypart == 9) then 
setPedStat(killer, stat, getPedStat(killer, stat)+5) 
setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) 
  
elseif (killer and killer ~= source) then 
setPedStat(killer, stat, getPedStat(killer, stat)+1) 
setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) 
  
elseif (killer and killer ~= source) then 
if ( bodypart == 7) then 
setPedStat(killer, stat, getPedStat(killer, stat)+1) 
setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) 
  
elseif (killer and killer ~= source) then 
if ( bodypart == 6) then 
setPedStat(killer, stat, getPedStat(killer, stat)+1) 
setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) 
  
elseif (killer and killer ~= source) then 
if ( bodypart == 5) then 
setPedStat(killer, stat, getPedStat(killer, stat)+1) 
setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) 
  
elseif (killer and killer ~= source) then 
if ( bodypart == 4) then 
setPedStat(killer, stat, getPedStat(killer, stat)+1) 
setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) 
  
elseif (killer and killer ~= source) then 
if ( bodypart == 3) then 
setPedStat(killer, stat, getPedStat(killer, stat)+1) 
setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) 
                                    end 
                                end 
                            end 
                        end 
                    end 
                end 
            end 
        end 
    end 
  
addEventHandler("onPlayerWasted",getRootElement(),PlayerKill) 

+

كان عندك

end

زايده

Link to comment
جرب
exports.scoreboard:addScoreboardColumn("WepPoints",getRootElement(),6,60) 
  
function PlayerKill ( killer, weapon, bodypart, stat) 
local slot = getPedWeapon(killer) 
  
for _,player in ipairs(getElementsByType("player")) do 
bindKey(player,"next_weapon",PlayerKill) 
bindKey(player,"previous_weapon",PlayerKill) 
  
  
  
if (killer and killer ~= source) then 
if ( bodypart == 9) then 
setPedStat(killer, stat, getPedStat(killer, stat)+5) 
setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) 
  
elseif (killer and killer ~= source) then 
setPedStat(killer, stat, getPedStat(killer, stat)+1) 
setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) 
  
elseif (killer and killer ~= source) then 
if ( bodypart == 7) then 
setPedStat(killer, stat, getPedStat(killer, stat)+1) 
setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) 
  
elseif (killer and killer ~= source) then 
if ( bodypart == 6) then 
setPedStat(killer, stat, getPedStat(killer, stat)+1) 
setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) 
  
elseif (killer and killer ~= source) then 
if ( bodypart == 5) then 
setPedStat(killer, stat, getPedStat(killer, stat)+1) 
setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) 
  
elseif (killer and killer ~= source) then 
if ( bodypart == 4) then 
setPedStat(killer, stat, getPedStat(killer, stat)+1) 
setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) 
  
elseif (killer and killer ~= source) then 
if ( bodypart == 3) then 
setPedStat(killer, stat, getPedStat(killer, stat)+1) 
setElementData(killer,"WepPoints",tonumber(getPedStat(killer,stat))) 
                                    end 
                                end 
                            end 
                        end 
                    end 
                end 
            end 
        end 
    end 
  
addEventHandler("onPlayerWasted",getRootElement(),PlayerKill) 

+

كان عندك

end

زايده

مايعمل شوف صور

http://im42.gulfup.com/9aK31.png

Link to comment

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...