Jump to content

طلب فنكشن


Recommended Posts

Posted
ابغى مثلن احرك اوبجكت بزر

اضغط مثلن التاب ويتحرك

طلبي ابغى اضغط التاب 5 مرات بعدين يفتح

  
    local ClickCount = 1 
        
    bindKey('tap','down', 
        function (  ) 
            if ClickCount and ClickCount < 2 then 
                ClickCount = ClickCount +1 
            return end 
                outputChatBox( tostring ( ClickCount ) ) 
             ClickCount = 1 
        end 
    ) 

iprestege

Lоаdіпg.. ██████████████████████████ ( 98% ) [R.L.A] Server

* [R.L.A] xIRomand~ *

Posted
ابغى مثلن احرك اوبجكت بزر

اضغط مثلن التاب ويتحرك

طلبي ابغى اضغط التاب 5 مرات بعدين يفتح

  
    local ClickCount = 1 
        
    bindKey('tap','down', 
        function (  ) 
            if ClickCount and ClickCount < 2 then 
                ClickCount = ClickCount +1 
            return end 
                outputChatBox( tostring ( ClickCount ) ) 
             ClickCount = 1 
        end 
    ) 

iprestege

  
      
        local ClickCount = 1 
            
        bindKey('tab','down', 
            function (  ) 
                if ClickCount and ClickCount < 2 then 
                    ClickCount = ClickCount +1 
                return end 
                    outputChatBox( tostring ( ClickCount ) ) 
                 ClickCount = 1 
            end 
        ) 

tab not tap

Hide it :wrestler35:

Posted
bindKey -- up 
isTimer 
setTimer 

+

killTimer 

وش الخطا

  
local gate = createObject ( 3095, 2969.1999511719, -700.20001220703, 1.500, 0, 0, 0 )  
local marker2 = createMarker ( 2969.291015625,-700.45721435547,2.100, 'cylinder', 2, 255, 0, 0 )  
Timer = { } 
addEventHandler ( "onResourceStart", resourceRoot, 
    function Timer ( player ) 
        if isElementWithinMarker ( player,marker2 ) then 
            if not isPedInVehicle ( player ) then 
                if not isTimer ( Timer [player] ) then 
                    setElementFrozen ( player,true ) 
            Timer [player] = setTimer ( function (  player  ) 
                        setElementFrozen ( player,false ) 
                        givePlayerMoney ( player,10000 ) 
                        moveObject ( gate, 10000, 2970.1999511719, -691, 687.20001220703, 0, 0, 0 ) 
                        setTimer ( moveObject,40000,1,gate, 10000, 2969.1999511719, -700.20001220703, 1.500, 0, 0, 0 ) 
                        triggerClientEvent ( player,'onShowMoney',player ) 
                    end,10000,1,player  
                    ) 
                end 
            end 
   
    function ( ) 
        for _, v in ipairs ( getElementsByType ( "player" ) ) do 
            bindKey ( v, "tab", "up", Timer ) 
if isTimer(Timer[player]) then  
Timer[player] = setTimer(function(player) Timer[player] = nil end, 10000, 1, player) 
killTimer ( Timer )  
        end 
    end 
) 

Posted
local counter = 0 
  
bindKey( 'tab', 'down', 
    function( ) 
        if( isElementWithinMarker( ... ) )then 
        counter = ( counter + 1 ) 
            if( counter == 5 )then 
                -- كودك 
                counter = 0 
            end 
        end 
    end 
) 

سويت لك مثال على حسب موضوعك لكن انت غيرت رايك في ردودك

╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗

║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║

║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║

║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║

╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝

«سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك»

M7mdAl7arthy : لتواصل سكايب

Posted
مشكووووور ومافصرت ياعاشق الشرق

هلاوسسهلا

╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗

║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║

║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║

║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║

╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝

«سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك»

M7mdAl7arthy : لتواصل سكايب

Posted

جربت طلعلي خطا مكتوب كذااا يعني في رمز غريب او كذا

SCRIPT ERROR: asdasd\server.lua:17: unexpected symbol near ')'

ERROR: Loading script failed: asdasd\server.lua:17: unexpected symbol near ')'

Posted
جربت طلعلي خطا مكتوب كذااا يعني في رمز غريب او كذا

SCRIPT ERROR: asdasd\server.lua:17: unexpected symbol near ')'

ERROR: Loading script failed: asdasd\server.lua:17: unexpected symbol near ')'

حط سطر ١٧ هنا

╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗

║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║

║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║

║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║

╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝

«سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك»

M7mdAl7arthy : لتواصل سكايب

Posted

هذا الكود كامل

  
local gate = createObject ( 3095, 2969.1999511719, -700.20001220703, 1.500, 0, 0, 0 )  
local marker2 = createMarker ( 2969.291015625,-700.45721435547,2.100, 'cylinder', 2, 255, 0, 0 )  
local counter = 0 
        bindKey ( source, "tab", "down", OpenObject ) 
function OpenObject ( player ) 
             if isElementWithinMarker ( player,marker2 ) then 
        counter = ( counter + 1 ) 
            if( counter == 5 )then 
                        givePlayerMoney ( player,10000 ) 
                        moveObject ( gate, 10000, 2970.1999511719, -691, 687.20001220703, 0, 0, 0 ) 
                        setTimer ( moveObject,40000,1,gate, 10000, 2969.1999511719, -700.20001220703, 1.500, 0, 0, 0 ) 
                        triggerClientEvent ( player,'onShowMoney',player ) 
                counter = 0 
       end 
        end 
    end 
  
) 

Posted

سطر 19 قوس زايد

+ انت مستخدم

bindKey فوق الوظيفة

لازم يكون تحتها

+

كودك مابشتغل لازم تحط ايفينت عند دخول الاعبين وتشغيل المود

عشان تحط لهم الزر

EDIT:

شف ذا الموضوع

viewtopic.php?f=160&t=48002

╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗

║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║

║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║

║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║

╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝

«سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك»

M7mdAl7arthy : لتواصل سكايب

Posted
طيب شلت القوس الزايد باقي خطأ

WARNING: asdasd\server.lua:5: Bad argument @ 'bindKey'

انا قلت لك

شف الموضوع ذا

viewtopic.php?f=160&t=48002

لازم تستخدم ايفينت عند تشغيل المود وعند دخول الاعب

╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗

║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║

║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║

║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║

╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝

«سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك»

M7mdAl7arthy : لتواصل سكايب

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