mo7taref2014 Posted May 8, 2015 Posted May 8, 2015 السلام عليكم و رحمة الله و بركاته انا محتاج كود اذا قتلت 3 اشخاص من تيم الشرطه يصير علي علامه بالخريطه ____________________________________________________________________________________ Learning lua language
TAPL Posted May 8, 2015 Posted May 8, 2015 'onPlayerWasted' getPlayerTeam getTeamName getElementType getElementData or table setElementData or table createBlipAttachedTo
mo7taref2014 Posted May 8, 2015 Author Posted May 8, 2015 ممكن توضح اكثر ؟ ____________________________________________________________________________________ Learning lua language
yazan Posted May 8, 2015 Posted May 8, 2015 هريسه بطعم الكود ريد addEventHandler("onPlayerWasted", root, function(_, killer) if killer and getElementType(killer) == "player" then local playerTeam = getPlayerTeam (source) if ( playerTeam ) then local t = getTeamName ( polic ) fi = getElementData ( killer, "poo" ) if ( fi == 1 ) then setElementData ( killer, "poo", 2 ) else setElementData ( killer, "poo", 1 ) if ( fi == 2 ) then setElementData ( killer, "poo", 3 ) else setElementData ( killer, "poo", 2 ) if ( fi == 3 ) then myBlip = createBlipAttachedTo ( killer, 52 ) end end end end end end) سبحان الله ---------------------------------- LUA 56%
Walid Posted May 8, 2015 Posted May 8, 2015 local kills = {} addEventHandler("onPlayerWasted", root, function(_, killer) if killer and getElementType(killer) == "player" and killer ~= source then local playerTeam = getPlayerTeam (source) if ( playerTeam ) then if getTeamName(playerTeam) == "Police Team " then -- put police team here kills[killer] = (kills[killer] or 0) + 1 check(killer) end end end end) -- 3 حقق ما إذا كان قد قتل أكثر من function check(killer) if isElement (killer) then if kills[killer]>= 3 then myBlip = createBlipAttachedTo ( killer, 52 ) end end end Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
mo7taref2014 Posted May 9, 2015 Author Posted May 9, 2015 شكرا لكم عندي سوال كيف ازيد التيمات ؟ واذا مات ال killer تختفي البلب ويعيد من الاول ____________________________________________________________________________________ Learning lua language
' A F . Posted May 9, 2015 Posted May 9, 2015 تسوي تيم createTeam تختفي البلب destroyElement Dis ; AF.#0941
mo7taref2014 Posted May 9, 2015 Author Posted May 9, 2015 ممكن تركبهم ؟ ____________________________________________________________________________________ Learning lua language
Walid Posted May 9, 2015 Posted May 9, 2015 ممكن تركبهم ؟ -- كيف ازيد التيمات ؟ teamPolice = createTeam ( "Police Team", 0, 255, 0 ) local blips = {} local kills = {} addEventHandler("onPlayerWasted", root, function(_, killer) if killer and getElementType(killer) == "player" and killer ~= source then local playerTeam = getPlayerTeam (source) if ( playerTeam ) then if getTeamName(playerTeam) == "Police Team " then -- put police team here kills[killer] = (kills[killer] or 0) + 1 check(killer) else if isElement(blips[killer]) then -- تختفي البلب destroyElement (blips[killer]) end end end end end) -- 3 حقق ما إذا كان قد قتل أكثر من function check(killer) if isElement (killer) then if kills[killer]>= 3 then blips[killer] = createBlipAttachedTo ( killer, 52 ) end end end Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now