Jump to content

مساعده


Recommended Posts

  • Replies 73
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

انت مافهمتني لسا

انا اقصد لو جبت المتطلبات عشان اظبط كودي كيف ادمجه مع بعض

Posted
انت مافهمتني لسا

انا اقصد لو جبت المتطلبات عشان اظبط كودي كيف ادمجه مع بعض

تحتلف الطريقة اخوي من كود لثاني الطريقه يبالها ويكي لحالها ض1

Posted

انا حاولت اسوي كود المخفي صح ولالا

وجربوه لو صح

function invisible() 
if getPlayerMoney(source) >= 1500 then 
        if getElementAlpha( thePlayer ) == 0 then 
        setElementAlpha ( thePlayer, 0 ) 
setElementAlpha ( thePlayer, 255 ) 
    end 
end 
addCommandHandler ( "invis", toggleInvis 

Posted (edited)
انا حاولت اسوي كود المخفي صح ولالا

وجربوه لو صح

  
setElementAlpha ( thePlayer, 0 ) 
setElementAlpha ( thePlayer, 255 ) 
  

تخفيه وتظهره في نفس الوقت

وترى المثال واضح في الويكي مايحتاج تغير فيه

https://wiki.multitheftauto.com/wiki/SetElementAlpha

function toggleInvis ( thePlayer )  -- thePlayer is whoever executed the command 
        if getElementAlpha( thePlayer ) == 0 then       -- if the player is NOT invisible 
        setElementAlpha ( thePlayer, 0 )    -- set the players alpha to 0 (make them invisible) 
    else            -- else, if the source player IS visible 
        setElementAlpha ( thePlayer, 255 )  -- set the players alpha to 255 (make them 100% visible) 
    end 
end 
addCommandHandler ( "invis", toggleInvis ) 

Edited by Guest
Posted
function invisible() 
if getPlayerMoney(source) >= 1500 then 
        if getElementAlpha( thePlayer ) == 0 then 
        setElementAlpha ( thePlayer, 0 ) 
  
    end 
end 
addCommandHandler ( "invis", toggleInvis 

Posted (edited)
function invisible() 
if getPlayerMoney(source) >= 1500 then 
        if getElementAlpha( thePlayer ) == 0 then 
        setElementAlpha ( thePlayer, 0 ) 
  
    end 
end 
addCommandHandler ( "invis", toggleInvis 

تبي تشوف اذا كانت فلوس اكبر من 1500 ليه منت حاط سحب فلوس ولا شيء

ولازم تربط الاعب مع الوظيفة

ناقص قوس في الاخير

Edited by Guest
Posted

ججرب ذا

    function invisible(thePlayer, commandName) 
        if getPlayerMoney(thePlayer) >= 1500 then 
            if getElementAlpha( thePlayer ) >= 250 then 
                takePlayerMoney(thePlayer,1500) 
                setElementAlpha ( thePlayer, 0 ) 
            end 
        end 
    end 
    addCommandHandler ( "invis", invisible) 

Posted

سويت الكود صح ولالا

function invisible() 
        if getPlayerMoney(thePlayer) >= 1500 then 
            if getElementAlpha( thePlayer ) >= 250 then 
                takePlayerMoney(thePlayer,1500) 
        setElementAlpha ( thePlayer, 0 ) 
            end 
        end 
    end 
    addCommandHandler ( "invis", invisible) 

Posted
سويت الكود صح ولالا
function invisible() 
        if getPlayerMoney(thePlayer) >= 1500 then 
            if getElementAlpha( thePlayer ) >= 250 then 
                takePlayerMoney(thePlayer,1500) 
        setElementAlpha ( thePlayer, 0 ) 
            end 
        end 
    end 
    addCommandHandler ( "invis", invisible) 

اربط الاعب بالوظيفة

function invisible(player) 
    if getPlayerMoney(player) >= 1500 then 
        if getElementAlpha( player ) == 255 then 
           takePlayerMoney(player,1500) 
           setElementAlpha ( player, 0 ) 
        end 
    end 
end 
addCommandHandler ( "invis", invisible ) 

Posted

كذا

function invisible (Player) 
        if getPlayerMoney(Player) >= 1500 then 
            if getElementAlpha( Player ) >= 250 then 
                takePlayerMoney(Player,1500) 
        setElementAlpha ( Player, 0 ) 
            end 
        end 
    end 
    addCommandHandler ( "invis", invisible) 

Posted

هههههههههههههه

ياخي تستهبل؟

يعطونك الكود جاهز

تروح تغير فيه و تقول كذا؟

ههههههههههههههههههههه

Posted
ججرب ذا
    function invisible(thePlayer, commandName) 
        if getPlayerMoney(thePlayer) >= 1500 then 
            if getElementAlpha( thePlayer ) >= 250 then 
                takePlayerMoney(thePlayer,1500) 
                setElementAlpha ( thePlayer, 0 ) 
            end 
        end 
    end 
    addCommandHandler ( "invis", invisible) 

كذا
function invisible (Player) 
        if getPlayerMoney(Player) >= 1500 then 
            if getElementAlpha( Player ) >= 250 then 
                takePlayerMoney(Player,1500) 
        setElementAlpha ( Player, 0 ) 
            end 
        end 
    end 
    addCommandHandler ( "invis", invisible) 

WTF !!

Posted
هههههههههههههه

ياخي تستهبل؟

يعطونك الكود جاهز

تروح تغير فيه و تقول كذا؟

ههههههههههههههههههههه

تابل اشبك ما تشوف انه توه جالس يحاول في الكود

Posted
كذا
function invisible (Player) 
        if getPlayerMoney(Player) >= 1500 then 
            if getElementAlpha( Player ) >= 250 then 
                takePlayerMoney(Player,1500) 
        setElementAlpha ( Player, 0 ) 
            end 
        end 
    end 
    addCommandHandler ( "invis", invisible) 

end

انا معطيك الكود ماعد به شيء صالح

تغير فيه ؟ ليه

على الاقل جرب الكود قبل تسأل

Posted

سويت كود الكاميرا عليك

صح ولالا

g_Players = getElementsByType("player") 
for i,aPlayer in ipairs(g_Players) 
    if aPlayer == getLocalPlayer() then 
        g_CurrentSpectated = i 
        break 
    end 
end 
  
function spectatePrevious(player)          
  
     if g_CurrentSpectated == 1 then 
         g_CurrentSpectated = #g_Players 
     else 
         g_CurrentSpectated = g_CurrentSpectated - 1 
     end 
    setCameraTarget(g_Players[g_CurrentSpectated]) 
end 
  
  
function spectateNext() 
     if g_CurrentSpectated == #g_Players then 
         g_CurrentSpectated = 1 
     else 
         g_CurrentSpectated = g_CurrentSpectated + 1 
     end 
    setCameraTarget(g_Players[g_CurrentSpectated]) 
end 
  
bindKey("arrow_l", "down", spectatePrevious) 
bindKey("arrow_r", "down", spectateNext) 

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