Jump to content

ربط سلاح بامر


Recommended Posts

getTeamFromName 
setPlayerTeam 
"onPlayerDamage" -- weapon  

هو يقول الي يضرب لاعب في تيم محدد بسلاح محدد ينتقل لمكان محدد,

يعني ما يحتاج تسوي سيت للاعب

عارف المفروض spawnPlayer

بس اشوفكم تعطونة setPosition

ذذذذذذذذذذذذذذ!!

Link to comment

مآله آي معنى كودكـ !!

Server Side !

addEventHandler("onPlayerDamage",getRootElement(), 
    function (  attacker, attackerWeapon  ) 
        if ( attacker and attacker ~= source and attackerWeapon == 3 ) then 
        local id = getElementModel ( source ) 
        local Dimension = getElementDimension ( source ) 
        local Interior = getElementInterior ( source ) 
        spawnPlayer ( source , x , y , z , 0 , id , Interior , Dimension ,getTeamFromName ("Team Name") )  
    end 
end 
) 
Link to comment
يصير اسويه لقروب معين بالاسل ؟؟

اشتغل هو ؟ اية يصير لية لا :

isObjectInACLGroup 
getAccountName 
getPlayerAccount 

بس تبية للاعب صح يعني يتحقق الاعب هو بالقروب او لا صح؟

مو القآتل ذذذذ؟

Link to comment

addEventHandler("onPlayerDamage",getRootElement(), 
    function (  attacker, attackerWeapon  ) 
        if isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( attacker ) ), aclGetGroup ( "Group Name" ) ) then 
        if ( attacker and attacker ~= source and attackerWeapon == 3 ) then 
        local id = getElementModel ( source ) 
        local Dimension = getElementDimension ( source ) 
        local Interior = getElementInterior ( source ) 
        spawnPlayer ( source , x , y , z , 0 , id , Interior , Dimension ,getTeamFromName ("Team Name") )  
         end 
    end 
end 
) 

جربة كذآ ورد لي خبر ~

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