Jump to content

مساعده


Recommended Posts

  • Replies 73
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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

وجربوه لو صح

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

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

وجربوه لو صح

  
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
Link to comment
function invisible() 
if getPlayerMoney(source) >= 1500 then 
        if getElementAlpha( thePlayer ) == 0 then 
        setElementAlpha ( thePlayer, 0 ) 
  
    end 
end 
addCommandHandler ( "invis", toggleInvis 

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

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

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

Edited by Guest
Link to comment

ججرب ذا

    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) 

Link to comment

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

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

Link to comment
سويت الكود صح ولالا
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 ) 

Link to comment

كذا

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) 

Link to comment
ججرب ذا
    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 !!

Link to comment
كذا
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

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

تغير فيه ؟ ليه

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

Link to comment

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

صح ولالا

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) 

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