Jump to content


  • Posts

  • Joined

  • Last visited

Posts posted by franku

  1. رمضان كريم وصيام مقبوا شباب.

    عندي هاذ الود, ما مشكله بس م يشتغل كيف مفروض

    انا بدي حين م اكتب كزماند nif يدخل اللاعب الي كتبها ب table اسمه infectedTable و اريد حين ادخل كومند sho يظهرلي اسماء كل اللعبين الي تبكو الكوماند "nif"

    addCommandHandler ( "nif", 
        function( player )
            local theVehicle = getPedOccupiedVehicle ( player )
            if ( theVehicle ) then
                setVehicleColor( theVehicle, 255, 255, 0 )
    function onInfection( player )
        if ( onCarHit()  ) then
            if ( infectedTeam ) then
                setPlayerTeam ( player, infectedTeam )
                local playerNameInf = getPlayerName( player )
                if ( playerNameInf ) then
                    table.insert ( infectedTable.infections, playerNameInf )
    addCommandHandler( 'sho', function( )
        for v, infecteds in pairs ( infectedTable.infections ) do
            outputChatBox ( 'Infected Players:' .. tostring( infecteds ), player )


    ارجو المساعده شباب.

    شباب كمان طلب, كيف ممكن اخد اسم اللاعب الي خبط سيارتي واعمله كيك؟ او اغيرله لون سيارته؟

    سلام شباب :)

  2. I have this external page on my system.. I'd like to know how to, instead of the picture I've manually set, put the member's profile picture. And whenever any user changes their profile picture, their photo on the page auto changes to the new one as well.

    I've tried lots of times to do that, but I failed. Please, help.



    Sorry for posting this here, didn't know where else I could post it.

  3. Mta has been lagging for me lately, it wasn't like that at all like, a week ago (I guess?). Whenever i go through objects like, trees etc, or even pass near any, it keeps lagging.. any solutions?

  4. Sup guys, so before I get into the actual question, I'd like to tell you that I haven't scripted in almost a year and I just started like a week ago again.

    So what i'm asking is, I have this code here (Below) from a script I made 3 days ago, what I'd like to know is, how do I turn it into OOP? And throw a metatable in it, plus making use of it. And why is OOP useful and how? (If you'd like to help explaining, mind not linking me to different pages? explain using your own words please, that'd be easier for me to understand. :) )

    Once I know why it's useful and how to use it, I'ma start using both OOP and metatables in future scripts of mine :)


    function stopEvent( thePlayer ) 
    local groupName = "EventManager" 
    local zzz= getPlayerAccount( thePlayer ) 
        if ( zzz) then 
            local accName = getAccountName( zzz) 
            if  ( isObjectInACLGroup ( "user."..accName, aclGetGroup ( groupName ) ) ) then 
                -- for k, thePlayer in pairs( getElementsByType( 'player' ) ) doe 
                removeEventHandler( "onFreezFight", resourceRoot, freezHandlar ) 
                removeEventHandler( "onFightStart", resourceRoot, spawnHandlre ) 
                    for _, thePlzzayer in pairs( getElementsByType( 'player' ) ) do 
                        takeAllWeapons( thePlzzayer ) 
                        setElementFrozen( thePlzzayer, false ) 
                        toggleControl ( thePlzzayer, "fire", true ) 
                        spawnPlayer ( thePlzzayer, xw, yw, zw ) 
                -- end 
            outputChatBox( '[Event] Event has stopped.', localPlayer, 255, 0, 0, true ) 
    addCommandHandler( 'stopit', stopEvent ) 

    Thank you.

  5. i think it should be like this im not very sure tho
    local players_Spawn = {} 
    function spawn(source) 
    function spawnThePlayer() 
          for _,p in pairs(players_Spawn) do 


    Gonna give it a try tmrw. Will get back with the errors (in case I couldn't fix them) if there were any.

  6. Wassup guys... I've got a cmdHandler.. My question is, is it possible to store whoever executes the commnd in a table and loop through them?

    Idea of what I wanna do; I wanna loop through the players that execute a command (like, /spawnMe) and spawn them somewhere else in the map. If i use ipairs, it spawns everybody on the server not only those used the cmd.

    Another thing i'd like a brief explanation of is, whats the difference between ipairs and pairs, return and break? Thanks in advance.

  7. فهمت غلط ياخي، حطيت مشكلتي بمحلين عشان يصلني الحل اسرع.

    كل ما في الامر انه ودي كومبوبوكس مع اسلحه وحين اللعب يختار سلاح ويضغط زر يصله السلاح واذا ما اختار سلاح من الكومبو يطلع له رساله تقول ظplease select weapon

  8. السلام عليكم عندي اوبجكت انا بدي يوم يضعط الاعب بالماوس على الاوبجت يتحول للاوبجكت الي ضغط عليها, كيف ممكن اساوي هيك اشي؟

    مش skins, بس mta objects

  • Create New...