Jump to content

ممكن مساعده


sajad

Recommended Posts

السلام عليكم شباب

انا حبيت ابرمج مقر سوات

وبغيت تشوفو اكوادي

كود رسباون

  onWasted = function() 
        if getPlayerTeam( source ) and getTeamName( getPlayerTeam( source ) ) == 'Police' and getElementData ( source , "S.W.A.T" ) == groupName then 
                function sp( source ) 
                setElementPosition( source, 1223.4812,-1639.51074,10.8 ) 
                setPedArmor( source, 100 ) 
                giveWeapon( source, 46 ) 
                setPedSkin( source, 285 ) 
                end 
                setTimer(sp,1000,1,source) 
        end 
    end 
    addEventHandler ( "onPlayerSpawn", getRootElement(), onWasted ) 

كود دم ودرع

marker = createMarker ( 1223.4812,-1639.51074,10.8, "cylinder", 2, 255, 0, 255, 255 ) 
      
addEventHandler ( "onMarkerHit", marker, 
    function ( player ) 
        if getElementType ( player ) == "player" then 
            local playerTeam = getPlayerTeam ( player ) 
            if playerTeam then 
                if playerTeam == getTeamFromName ( "S.W.A.T" ) then 
                    setPedStat ( player, 24, 989 ) 
                    setElementHealth ( player, 200 ) 
                    setPedArmor ( player, 100 ) 
                    setPedSkin ( player, 285 ) 
                else 
                    outputChatBox ( "* You most be 'S.W.A.T'", player, 0, 0, 255, true ) 
                end 
            end 
        end 
    end 
, false ) 

كود باب

local GroupName = "S.W.A.T" 
local gateID = "980" 
local Gx, Gy, Gz = "1220.97656, -1690.26758, 36.5781" 
local Grx, Gry, Grz = "1120.93656, -1490.26743, 36.5781" 
local Gx1, Gy2, Gz3 = "1120.93656, -1490.26743, 36.5781" 
local Time = "9" 
  
local gate = createObject ( gateID, Gx, Gy, Gz, Grx, Gry, Grz ) 
local marker = ( Gx, Gy, Gz, "cylinder", 7, 0, 0, 0, 0 ) 
  
addEventHandler ( "onMarkerHit", marker, 
    function ( plr ) 
        if ( getElementType ( plr ) == "player" ) and ( getElementData ( plr, "S.W.A.T" ) == GroupName ) then 
            moveObject ( gate, Time * 1000, Gx1, Gy2, Gz3 ) 
        end 
    end 
) 
  
addEventHandler ( "onMarkerLeave", marker, 
    function ( plr ) 
        if ( getElementType ( plr ) == "player" ) and ( getElementData ( plr, "S.W.A.T== GroupName ) then 
            moveObject ( gate, Time * 1000, Gx, Gy, Gz ) 
        end 
    end 
) 
  
addEventHandler ( "onPlayerQuit", root, 
    function ( ) 
        if ( isElementWithinMarker ( source, marker ) ) and ( getElementData ( plr, "S.W.A.T" ) == GroupName ) then 
            moveObject ( gate, Time * 1000, Gx, Gy, Gz ) 
        end 
    end 
) 
 

واتمنى ابي كود السيارات لقروب + كل التيمات

وشكرأأ على المشاهده

Link to post

بعدين انت عندك فـ الكود الثالث غير هذول متحقق من تيمه باسم الداتا .. وش تقصد ؟

onWasted = function() 
    if getPlayerTeam( source ) and getTeamName( getPlayerTeam( source ) ) == 'Police' and getElementData ( source , "S.W.A.T" ) then 
                function sp( source ) 
                setElementPosition( source, 1223.4812,-1639.51074,10.8 ) 
                setPedArmor( source, 100 ) 
                giveWeapon( source, 46 ) 
                setPedSkin( source, 285 ) 
                end 
                setTimer(sp,1000,1,source) 
        end 
    end 
addEventHandler ( "onPlayerSpawn", getRootElement(), onWasted ) 

local GroupName = "S.W.A.T" 
local gateID = "980" 
local Gx, Gy, Gz = "1220.97656, -1690.26758, 36.5781" 
local Grx, Gry, Grz = "1120.93656, -1490.26743, 36.5781" 
local Gx1, Gy2, Gz3 = "1120.93656, -1490.26743, 36.5781" 
local Time = "9" 
  
local gate = createObject ( gateID, Gx, Gy, Gz, Grx, Gry, Grz ) 
local marker = createMarker ( Gx, Gy, Gz, "cylinder", 7, 0, 0, 0, 0 ) 
  
addEventHandler ( "onMarkerHit", marker, 
    function ( plr ) 
        if ( getElementType ( plr ) == "player" ) and ( getElementData ( plr, GroupName ) then 
            moveObject ( gate, Time * 1000, Gx1, Gy2, Gz3 ) 
        end 
    end 
) 
  
addEventHandler ( "onMarkerLeave", marker, 
    function ( plr ) 
        if ( getElementType ( plr ) == "player" ) and ( getElementData ( plr, GroupName ) then 
           moveObject ( gate, Time * 1000, Gx, Gy, Gz ) 
       end 
   end 
) 
  
addEventHandler ( "onPlayerQuit", root, 
   function ( ) 
       if ( isElementWithinMarker ( source, marker ) ) and ( getElementData ( source, GroupName ) ) then 
           moveObject ( gate, Time * 1000, Gx, Gy, Gz ) 
       end 
   end 
) 
Edited by Guest
Link to post
تبيه للقروب ولا التيم ؟

ابية لقروب بس ابي البوابة تفتح لكل التيمات

يعني مثل النو تيم والشرطة والمسعفين ابيهم ابيهم يفتح لهم الباب يعني مو محددد

Link to post
بعدين انت عندك فـ الكود الثالث غير هذول متحقق من تيمه باسم الداتا .. وش تقصد ؟

onWasted = function() 
    if getPlayerTeam( source ) and getTeamName( getPlayerTeam( source ) ) == 'Police' and getElementData ( source , "S.W.A.T" ) then 
                function sp( source ) 
                setElementPosition( source, 1223.4812,-1639.51074,10.8 ) 
                setPedArmor( source, 100 ) 
                giveWeapon( source, 46 ) 
                setPedSkin( source, 285 ) 
                end 
                setTimer(sp,1000,1,source) 
        end 
    end 
addEventHandler ( "onPlayerSpawn", getRootElement(), onWasted ) 

local GroupName = "S.W.A.T" 
local gateID = "980" 
local Gx, Gy, Gz = "1220.97656, -1690.26758, 36.5781" 
local Grx, Gry, Grz = "1120.93656, -1490.26743, 36.5781" 
local Gx1, Gy2, Gz3 = "1120.93656, -1490.26743, 36.5781" 
local Time = "9" 
  
local gate = createObject ( gateID, Gx, Gy, Gz, Grx, Gry, Grz ) 
local marker = createMarker ( Gx, Gy, Gz, "cylinder", 7, 0, 0, 0, 0 ) 
  
addEventHandler ( "onMarkerHit", marker, 
    function ( plr ) 
        if ( getElementType ( plr ) == "player" ) and ( getElementData ( plr, GroupName ) then 
            moveObject ( gate, Time * 1000, Gx1, Gy2, Gz3 ) 
        end 
    end 
) 
  
addEventHandler ( "onMarkerLeave", marker, 
    function ( plr ) 
        if ( getElementType ( plr ) == "player" ) and ( getElementData ( plr, GroupName ) then 
           moveObject ( gate, Time * 1000, Gx, Gy, Gz ) 
       end 
   end 
) 
  
addEventHandler ( "onPlayerQuit", root, 
   function ( ) 
       if ( isElementWithinMarker ( source, marker ) ) and ( getElementData ( source, GroupName ) ) then 
           moveObject ( gate, Time * 1000, Gx, Gy, Gz ) 
       end 
   end 
) 

االكود مو تبعي والله واحد ناشره

وانا كتبتة وانا جديد بالبرمجة

Link to post
بعدين انت عندك فـ الكود الثالث غير هذول متحقق من تيمه باسم الداتا .. وش تقصد ؟

onWasted = function() 
    if getPlayerTeam( source ) and getTeamName( getPlayerTeam( source ) ) == 'Police' and getElementData ( source , "S.W.A.T" ) then 
                function sp( source ) 
                setElementPosition( source, 1223.4812,-1639.51074,10.8 ) 
                setPedArmor( source, 100 ) 
                giveWeapon( source, 46 ) 
                setPedSkin( source, 285 ) 
                end 
                setTimer(sp,1000,1,source) 
        end 
    end 
addEventHandler ( "onPlayerSpawn", getRootElement(), onWasted ) 

[/b]

'onPlayerSpawn' > 'onPlayerWasted' 

Link to post
بعدين انت عندك فـ الكود الثالث غير هذول متحقق من تيمه باسم الداتا .. وش تقصد ؟

onWasted = function() 
    if getPlayerTeam( source ) and getTeamName( getPlayerTeam( source ) ) == 'Police' and getElementData ( source , "S.W.A.T" ) then 
                function sp( source ) 
                setElementPosition( source, 1223.4812,-1639.51074,10.8 ) 
                setPedArmor( source, 100 ) 
                giveWeapon( source, 46 ) 
                setPedSkin( source, 285 ) 
                end 
                setTimer(sp,1000,1,source) 
        end 
    end 
addEventHandler ( "onPlayerSpawn", getRootElement(), onWasted ) 

[/b]

'onPlayerSpawn' > 'onPlayerWasted' 

اخطاءه كثيرة .. صححت له بعض الاغلاط الموجودة ..

Link to post
بعدين انت عندك فـ الكود الثالث غير هذول متحقق من تيمه باسم الداتا .. وش تقصد ؟

onWasted = function() 
    if getPlayerTeam( source ) and getTeamName( getPlayerTeam( source ) ) == 'Police' and getElementData ( source , "S.W.A.T" ) then 
                function sp( source ) 
                setElementPosition( source, 1223.4812,-1639.51074,10.8 ) 
                setPedArmor( source, 100 ) 
                giveWeapon( source, 46 ) 
                setPedSkin( source, 285 ) 
                end 
                setTimer(sp,1000,1,source) 
        end 
    end 
addEventHandler ( "onPlayerSpawn", getRootElement(), onWasted ) 

[/b]

شكرأأ لانن جديد بالبرمجة الله يجازيكم كل خير

'onPlayerSpawn' > 'onPlayerWasted' 

اخطاءه كثيرة .. صححت له بعض الاغلاط الموجودة ..

Link to post

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