Jump to content

Deletedthisaccount

Members
  • Posts

    55
  • Joined

Posts posted by Deletedthisaccount

  1. 22 minutes ago, JustP said:

    كيف فاتح جدول وغالقه بنفس الوقت؟

    
    local markers = {
    { .. },
    
    }
    

     

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

     

    والله اني مفهي الايام ذي , يعطيك العافيه أشتغل معي التصحيح حقك :D

     

    ==================================

     

     

    يغلق , @N3xT

  2. السلام عليكم . عسائكم بخير ؟ ..

     

    عندي مشكلة بـ هاذا الكود :

    ماقدر أحط أكثر من ماركر , المود مايشتغل !!

     

    م أفهم بـ الماركرات كثير أنا , الي عنده حل  ياليت يفيدنا <

     

     

    local sx, sy 			= guiGetScreenSize();
    
    local markersElements 	= {}
    local markers 			= {} 
    	{2087.62207, 2071.43994, 11.05790} 
    }

     

  3. 34 minutes ago, JustP said:
    
    addCommandHandler("تواجد", function ( player )
        if not ( isGuestAccount ( getPlayerAccount ( player ) ) ) then
    	    if ( getAccountData ( getPlayerAccount ( player ), "newdata" ) == false ) then
    		    if ( getElementData ( resourceRoot, "enabledTwaged" ) == true ) then
    			    setPlayerTime ( player, "+", getElementData ( resourceRoot, "hoursTwaged" ) )
    				setAccountData ( getPlayerAccount ( player ), "newdata", true )
    				outputChatBox("* You Have Been Get " .. getElementData ( resourceRoot, "hoursTwaged" ) .." Hours !", player, 255, 255, 0, true)
    			else
    			    outputChatBox("* This Command Not Enabled !", player, 255, 0, 0, true)
    			end
    		else
    		    outputChatBox("* You Already Use This Command !", player, 255, 0, 0, true)
    		end
    	else
    	    outputChatBox("* Please Register To Use This Command !", player, 255, 0, 0, true)
    	end
    end)
    

     

    جرب هذا بيشتغل معك

    يعطيك العافية الكود شغال 

    * You Have Been Get 50 Hours !
    * You Have Been Get 50 Hours !
    * You Have Been Get 50 Hours !
    * You Have Been Get 50 Hours !
    * You Have Been Get 50 Hours !
    * You Have Been Get 50 Hours !

     

    التوزيع ياخذونه أكثر من مره >> المود فيه لحسة مخ شوي ..

  4. 3 minutes ago, JustP said:

    مافي فايدة انك تنزل المود كله كان تقدر تنزل بس الي حق التوزيع عشان نفهم وين المشكلة

    عشان أعرف وين الخطاء بـ الضبط .

     

     

    addCommandHandler("تواجد", function ( player )
        if not ( isGuestAccount ( getPlayerAccount ( player ) ) ) then
    	    if ( getAccountData ( getPlayerAccount ( player ), "getatime" ) == false ) then
    		    if ( getElementData ( resourceRoot, "enabledTwaged" ) == true ) then
    			    setPlayerTime ( player, "+", getElementData ( resourceRoot, "hoursTwaged" ) )
    				setAccountData ( getPlayerAccount ( player ), "getatime", true )
    				outputChatBox("* You Have Been Get " .. getElementData ( resourceRoot, "hoursTwaged" ) .." Hours !", player, 255, 255, 0, true)
    			else
    			    outputChatBox("* This Command Not Enabled !", player, 255, 0, 0, true)
    			end
    		else
    		    outputChatBox("* You Already Use This Command !", player, 255, 0, 0, true)
    		end
    	else
    	    outputChatBox("* Please Register To Use This Command !", player, 255, 0, 0, true)
    	end
    end)

     

  5. السلام عليكم ورحمة الله وبركاته .

    شخباركم ؟ عساكم طيبين , عندي مشكلة بـ مود * الساعات * وهي أن لو واحد بياخذ التوزيع يجيبه أنه اخذه قبل ! وهو م أستلم التوزيع + فيكم كم خطاء للحين مب عارفهم , هاذي الاكواد .. الي يعرف يحل المشكلة يساعدني , والله يعطيه الف عافية ..

     

    exports.scoreboard:addScoreboardColumn('PlayTime')
    
    local t = { }
    local Groups = { "Console", "a" }
    
    function isPlayerAdmin(player)
        for k,v in ipairs ( Groups ) do
            if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup(v)) ) then
    		    return true
    		end
    	end
    end
    
    function checkValues( source,arg1,arg2)
        if (arg2 >= 60) then
            t[ source ][ 'min' ] = tonumber( t[ source ][ 'min' ] or 0 ) + 1
            t[ source ][ 'sec' ] = 0
        end
        if (arg1 >= 60) then
            t[ source ][ 'min' ] = 0
            t[ source ][ 'hour' ] = tonumber( t[ source ][ 'hour' ] or 0 ) + 1
        end
        return arg1, arg2
    end
    
    setTimer(
        function( )
            for _, v in pairs( getElementsByType( "player" ) ) do
                if (not t[ v ]) then
                    t[ v ] = {
                                ["hour"] = 0,
                                 ["min"] = 0,
                                 ["sec"] = 0
                                }
                end
    
                t[ v ][ 'sec' ] = tonumber( t[ v ][ 'sec' ] or 0 ) + 1
                local min,sec = checkValues (
                        v,
                        t[ v ][ 'min' ] or 0,
                        t[ v ][ 'sec' ] or 0
    						)
    	local hour = tonumber( t[ v ][ 'hour' ] or 0 )
    
                setElementData(
                    v,
                    "PlayTime",
                    tostring( hour )..':'..tostring( min )..':'..tostring( sec )
                )
            end
        end,
        1000, 0
    )
    
    function onPlayerQuit ( )
        local playeraccount = getPlayerAccount ( source )
        if ( playeraccount ) and not isGuestAccount ( playeraccount ) then
            local sValue = getElementData( source,'PlayTime' )
    	local hour = tonumber( t[ source ][ 'hour' ] or 0 )
    	local min = tonumber( t[ source ][ 'min' ] or 0 )
    	local sec = tonumber( t[ source ][ 'sec' ] or 0 )
            setAccountData ( playeraccount, "PlayTime-hour", tostring(hour) )
            setAccountData ( playeraccount, "PlayTime-min", tostring(min) )
            setAccountData ( playeraccount, "PlayTime-sec", tostring(sec) )
            setAccountData ( playeraccount, "PlayTime", tostring(sValue) )
            local row = executeSQLQuery ( "SELECT * FROM TopTime WHERE serial = ?", getPlayerSerial ( source ) )
    	    if ( #row ~= 0 ) then
    		    executeSQLQuery("UPDATE TopTime SET hour = ?, min = ?, scou = ? WHERE serial = ?", tostring ( t [ source ] [ "hour" ] ), tostring ( t [ source ] [ "min" ] ), tostring ( t [ source ] [ "sec" ] ), tostring ( getPlayerSerial ( source ) ) )
    	    end
        end
        t[ source ] = nil
    end
    
    function onPlayerLogin (_, playeraccount )
        if ( playeraccount ) then
            local time = getAccountData ( playeraccount, "PlayTime" )
    	    local hou = getAccountData ( playeraccount, "PlayTime-hour")
    	    local min = getAccountData ( playeraccount, "PlayTime-min")
    	    local sec = getAccountData ( playeraccount, "PlayTime-sec")
            if ( time ) then
                setElementData ( source, "PlayTime", time )
                t[ source ]["hour"] = tonumber(hou)
                t[ source ]["min"] = tonumber(min)
                t[ source ]["sec"] = tonumber(sec)
            else
                setElementData ( source, "PlayTime",0 )
                setAccountData ( playeraccount, "PlayTime",0 )
    			t[ source ]["hour"] = 0
                t[ source ]["min"] = 0
                t[ source ]["sec"] = 0
            end
        end
    end
    addEventHandler ( "onPlayerQuit", root, onPlayerQuit )
    addEventHandler ( "onPlayerLogin", root, onPlayerLogin )
    
    addEventHandler ( "onPlayerLogout", root, function ( acc )
        local sValue = getElementData( source,'PlayTime' )
    	local hour = tonumber( t[ source ][ 'hour' ] or 0 )
    	local min = tonumber( t[ source ][ 'min' ] or 0 )
    	local sec = tonumber( t[ source ][ 'sec' ] or 0 )
        setAccountData ( acc, "PlayTime-hour", tostring(hour) )
        setAccountData ( acc, "PlayTime-min", tostring(min) )
        setAccountData ( acc, "PlayTime-sec", tostring(sec) )
        setAccountData ( acc, "PlayTime", tostring(sValue) )
    	local row = executeSQLQuery ( "SELECT * FROM TopTime WHERE serial = ?", getPlayerSerial ( source ) )
    	if ( #row ~= 0 ) then
    		executeSQLQuery("UPDATE TopTime SET hour = ?, min = ?, scou = ? WHERE serial = ?", tostring ( t [ source ] [ "hour" ] ), tostring ( t [ source ] [ "min" ] ), tostring ( t [ source ] [ "sec" ] ), tostring ( getPlayerSerial ( source ) ) )
    	end
        t[ source ]["hour"] = 0
        t[ source ]["min"] = 0
        t[ source ]["sec"] = 0
    end )
    
    addEventHandler("onResourceStart", resourceRoot, function ()
        for k,v in ipairs ( getElementsByType ( "player" ) ) do
    	    if not ( isGuestAccount ( getPlayerAccount ( v ) ) ) then
    		    if ( getAccountData ( getPlayerAccount ( v ), "PlayTime" ) ) then
    			    local hou = getAccountData ( getPlayerAccount ( v ), "PlayTime-hour")
    	            local min = getAccountData ( getPlayerAccount ( v ), "PlayTime-min")
    	            local sec = getAccountData ( getPlayerAccount ( v ), "PlayTime-sec")
    				if not ( t [ v ] ) then 
    				    t[ v ] = {
                            ["hour"] = 0,
                            ["min"] = 0,
                            ["sec"] = 0
                        }
    				end
    				t[ v ]["hour"] = tonumber(hou)
                	t[ v ]["min"] = tonumber(min)
                	t[ v ]["sec"] = tonumber(sec)
    			end
    		end
    	end
    end)
    
    addEventHandler("onResourceStop", resourceRoot, function ()
        for k,v in ipairs ( getElementsByType ( "player" ) ) do
    	    if not ( isGuestAccount ( getPlayerAccount ( v ) ) ) then
                local sValue = getElementData( v,'PlayTime' )
    	        local hour = tonumber( t[ v ][ 'hour' ] or 0 )
    	        local min = tonumber( t[ v ][ 'min' ] or 0 )
    	        local sec = tonumber( t[ v ][ 'sec' ] or 0 )
                setAccountData ( getPlayerAccount ( v ), "PlayTime-hour", tostring(hour) )
                setAccountData ( getPlayerAccount ( v ), "PlayTime-min", tostring(min) )
                setAccountData ( getPlayerAccount ( v ), "PlayTime-sec", tostring(sec) )
                setAccountData ( getPlayerAccount ( v ), "PlayTime", tostring(sValue) )
    			local row = executeSQLQuery ( "SELECT * FROM TopTime WHERE serial = ?", getPlayerSerial ( v ) )
    			if ( #row ~= 0 ) then
    				executeSQLQuery("UPDATE TopTime SET hour = ?, min = ?, scou = ? WHERE serial = ?", tostring ( t [ v ] [ "hour" ] ), tostring ( t [ v ] [ "min" ] ), tostring ( t [ v ] [ "sec" ] ), tostring ( getPlayerSerial ( v ) ) )
    			end
    		end
    	end
    end)
    
    function setPlayerTime ( Player, Type, Hour )
    	if ( Type == "-" ) then
    	    t[ Player ][ "hour" ] = t [ Player ][ "hour" ] - tonumber ( Hour )
    	else
    	    t[ Player ][ "hour" ] = t [ Player ][ "hour" ] + tonumber ( Hour )
    	end
    end
    
    function getPlayerHours ( Player )
        return t [ Player ][ "hour" ] or 0
    end
    
    addCommandHandler("giveTimeacc", function ( player, _, accname, time )
        if ( accname ) then
            if ( time ) then
    	        if ( tonumber ( time ) <= 9000 ) then
    		        if not ( isGuestAccount ( getPlayerAccount ( player ) ) ) then
    			        if ( isPlayerAdmin ( player ) ) then
    				        if ( getAccount ( tostring ( accname ) ) ) then
    						    setAccountData ( getAccount ( tostring ( accname ) ), "PlayTime-hour", tostring ( time ) )
    							for k,v in ipairs ( getElementsByType("player") ) do
    							    if not ( isGuestAccount ( getPlayerAccount ( v ) ) ) then
    								    if ( getAccountName ( getPlayerAccount ( v ) ) == tostring ( accname ) ) then
    									    t [ v ] [ "hour" ] = tonumber ( time )
    									end
    								end
    							end
    							outputChatBox("* ok", player, 255, 255, 0, true)
    						else
    						    outputChatBox("* No Account With This Name !", player, 255, 0, 0, true)
    						end
    					else
    					    outputChatBox("* You Are Not Admin !", player, 255, 0, 0, true)
    					end
    				else
    				    outputChatBox("* Please Login To Use This Command !", player, 255, 0, 0, true)
    				end
    			else
    			    outputChatBox("* U Can't Give Time More 100 Hour !", player, 255, 0, 0, true)
    			end
    		else
    		    outputChatBox("* Please Write a Hour !", player, 255, 0, 0, true)
    		end
    	else
    	    outputChatBox("* Please Write Name of Account !", player, 255, 0, 0, true)
    	end
    end)
    
    addCommandHandler("TimeF", function ( player, _, enable, time )
        if ( enable ) then
    	    if ( time ) then
    		    if ( tonumber ( time ) <= 100 ) then
                    if not ( isGuestAccount ( getPlayerAccount ( player ) ) ) then
    	                if ( isPlayerAdmin ( player ) ) then
    		                if ( enable == "true" ) then
    		                    if ( getElementData ( resourceRoot, "enabledTwaged" ) == true ) then
    			                    for k,v in ipairs ( getAccounts () ) do
    						            setAccountData ( v, "getatime", false )
    					            end
    								setElementData ( resourceRoot, "hoursTwaged", tonumber ( time ) )
    								outputChatBox ("* Ok !", player, 255, 255, 0, true)
    							else
    							    setElementData ( resourceRoot, "enabledTwaged", true )
    								 for k,v in ipairs ( getAccounts () ) do
    						            setAccountData ( v, "getatime", false )
    					            end
    								setElementData ( resourceRoot, "hoursTwaged", tonumber ( time ) )
    								outputChatBox ("* Ok !", player, 255, 255, 0, true)
    							end
    						else
    						    setElementData ( resourceRoot, "enabledTwaged", false )
    						end
    					else
    					    outputChatBox("* You Are Not Admin !", player, 255, 0, 0, true)
    					end
    				else
    				    outputChatBox("* Please Login To Use This Command !", player, 255, 0, 0, true)
    				end
    			else
    			    outputChatBox("* U Can't Give Time More 100 Hour !", player, 255, 0, 0, true)
    			end
    		else
    		    outputChatBox("* Please Write a Hours !", player, 255, 0, 0, true)
    		end
    	else
    	    outputChatBox("* Please Write a Type of Give Time !", player, 255, 0, 0, true)
    	end
    end)
    
    addCommandHandler("تواجد", function ( player )
        if not ( isGuestAccount ( getPlayerAccount ( player ) ) ) then
    	    if ( getAccountData ( getPlayerAccount ( player ), "getatime" ) == false ) then
    		    if ( getElementData ( resourceRoot, "enabledTwaged" ) == true ) then
    			    setPlayerTime ( player, "+", getElementData ( resourceRoot, "hoursTwaged" ) )
    				setAccountData ( getPlayerAccount ( player ), "getatime", true )
    				outputChatBox("* You Have Been Get " .. getElementData ( resourceRoot, "hoursTwaged" ) .." Hours !", player, 255, 255, 0, true)
    			else
    			    outputChatBox("* This Command Not Enabled !", player, 255, 0, 0, true)
    			end
    		else
    		    outputChatBox("* You Already Use This Command !", player, 255, 0, 0, true)
    		end
    	else
    	    outputChatBox("* Please Register To Use This Command !", player, 255, 0, 0, true)
    	end
    end)

     

  6.  

    On 01/05/2019 at 17:21, MR.AsaD said:

    ذا مثلا زر

    {'btn', id='✦ انتحار ✦', onclick=killLocalPlayer, width = 121},

    كيف بخليه صورة و كلمة انتحار م تروح منه 

     

    function guiCreateButton(x3, y3, width3, height3, titleBarText3, relative3 , Wnd)
        local mainBackground3 = guiCreateStaticImage ( x3, y3, width3, height3, "pic.png", relative3 , Wnd)
        local mainBackgroundLabel3 = guiCreateLabel ( -0.2, 0.1, 700, 100, "               "..titleBarText3, true, mainBackground3 )
        guiSetFont ( mainBackgroundLabel3, guiCreateFont ( "Font1.ttf", 10 ) ) --  الخطوط .
        guiSetEnabled ( mainBackgroundLabel3, false )
        return mainBackground3
    end

     

    • Thanks 1
  7. وعليكم السلام ورحمة الله وبركاته .. 

    شف اليوتيوب به مودات ( ماهي ذيك المودات الي تجذب الزوار ) ض1 ..

     

    آما بخصوص انك تبي مودات حصريه وتسذا , شف لك مبرمج له خبره ,  ومضمون

     

    بـ التوفيق ::roll: 

     

×
×
  • Create New...