Jump to content

ابي مساعدة بكود


Mers[o]n

Recommended Posts

لو سمحتو يا شباب انا عملت لوحة بسيطة

لوحة عادية محدش يقدر يفتحها غير الي موجود سريالة ف الملف

لكن انا عملت كدة واشتغل معي 

مشكلتي انا مسوي 

function money()
if getPlayerSerial (source) == serial then
givePlayerMoney ( money, 1000 ) 

OutPut( "حصلت علي 1000 من الفلوس ودلوقتي انتطر ساعتين حتي يتم حصول علي المال مرة تانية",source,0,255,0)
end
end
addEvent ("money",true)
addEventHandler ("money",root,Destroy)
المشكلة ان الزر مش بيعطي حاجة .. انا عامل السريال في ملف تاني .. والكود الي ادامكم دا كود في ملف السيرفر

فا انا عايز اعرف كدة صح ولا غلط

serial = "0270F1580ABGE33949941DD0XD52BEB7"

اسم الملف الي فية السريال : serial.lua

موجود ف الميتا كلنيت وباول سطر

<script src="serial.lua" type="client" />

فارجوكم ساعدوني .. !! 


 

Link to comment

الاكواد كالتالي :-

--@Clinet Side

addEventHandler ( "onClientGUIClick" , root , function ( ) 
if اسم الزر == source then 
triggerServerEvent ( "money" , localPlayer )
end 
end  )

addEvent("onOpenPM",true)
addEventHandler("onOpenPM",root,
	function ()
		guiSetVisible(اسم لوحتك,true)
		showCursor(true)
		guiSetInputEnabled(true)
	end
)

--@Server Side

addCommandHandler("الكلمة الي تكتبها بف 8 عشان تظهر اللوحة",
	function (cmd)
		if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(cmd)),aclGetGroup("اسم قروب الاسل")) then
			triggerClientEvent(cmd,"onOpenPM",cmd)
		else
			outputChatBox( '* لآ تملك صلاحيات لهذآ', cmd, 255, 0, 0, true )
		end
	end
)

  addEvent ( "money" , true ) 
addEventHandler ( "money" , root , 
 function moneyy ( )
   givePlayerMoney( moneyy, 1000 )
outputChatBox( '* تم اعطائك 1000 فلوس', moneyy, 255, 0, 0, true )
 end 
)

سويتها لك ع قروب اسل , 

Edited by [#]THaLLeK ~ 777 !
Link to comment
3 hours ago, [#]THaLLeK ~ 777 ! said:

الاكواد كالتالي :-


--@Clinet Side

addEventHandler ( "onClientGUIClick" , root , function ( ) 
if اسم الزر == source then 
triggerServerEvent ( "money" , localPlayer )
end 
end  )

addEvent("onOpenPM",true)
addEventHandler("onOpenPM",root,
	function ()
		guiSetVisible(اسم لوحتك,true)
		showCursor(true)
		guiSetInputEnabled(true)
	end
)

--@Server Side

addCommandHandler("الكلمة الي تكتبها بف 8 عشان تظهر اللوحة",
	function (cmd)
		if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(cmd)),aclGetGroup("اسم قروب الاسل")) then
			triggerClientEvent(cmd,"onOpenPM",cmd)
		else
			outputChatBox( '* لآ تملك صلاحيات لهذآ', cmd, 255, 0, 0, true )
		end
	end
)

  addEvent ( "money" , true ) 
addEventHandler ( "money" , root , 
 function moneyy ( )
   givePlayerMoney( moneyy, 1000 )
outputChatBox( '* تم اعطائك 1000 فلوس', moneyy, 255, 0, 0, true )
 end 
)

سويتها لك ع قروب اسل , 

غلط عزيزي هو يبي فلوس كل ساعتين

Link to comment

جرب اخوي @

 

 

?--@Clinet Side

addEventHandler ( "onClientGUIClick" , root , function ( ) 
if source == اسم الزر then

givePlayerMoney( 1000  )

outPutChatBox("لقد تم حصولك علي 1000 $ انتظر كل دقيقيتين")

setTimer( function( )
givePlayerMoney( 1000  )

outPutChatBox("لقد تم حصولك علي 1000 $ انتظر كل دقيقيتين")
end ,2 * 60000 ,0)
end 
end )

addEvent("onOpenPM",true)
addEventHandler("onOpenPM",root,
    function ()
        guiSetVisible(اسم لوحتك,true)
        showCursor(true)
        guiSetInputEnabled(true)
    end
)

--@Server Side

addCommandHandler("الكلمة الي تكتبها بف 8 عشان تظهر اللوحة",
    function (cmd)
        if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(cmd)),aclGetGroup("اسم قروب الاسل")) then
            triggerClientEvent(cmd,"onOpenPM",cmd)
        else
            outputChatBox( '* لآ تملك صلاحيات لهذآ', cmd, 255, 0, 0, true )
        end
    end
)

Link to comment

طلبك الاول

--- هنا السيريالات الي تبيها تقدر تحط سيريالات بكيفك
serials = {
["serial1"] = true,
["serial2"] = true,
["serial3"] = true,
["serial4"] = true,
}
----------

function wnd() -- كود تح اللوحة
getSerial = getPlayerSerial(localPlayer)
if ( serials[getSerial] ) then  
if (guiGetVisible(اسم لوحتك) == false) then
guiSetVisible(اسم لوحتك,true)
showCursor(true)
else
guiSetVisible(اسم لوحتك,false)
showCursor(false)
end
end
end
addCommandHandler("command",wnd) -- كلمة فتح اف 8 للوحة

طلبك الثاني
 

-- Client
function guiAntiFlood(element, timer) -- to Mezo
    if getElementType ( element ) == "gui-button" then
        local atimer = tonumber(timer)
        if atimer == nil or atimer == '' or not tonumber(atimer) then
            error("Bad Argument the Argument 2 must number")
        else
        end
        guiSetEnabled(element,false)
        setTimer(function()
        guiSetEnabled(element,true)
        end,tonumber(atimer),1)
    else
        error("Bad Argument 1 the element must button")
  end
end

mins = 120 -- عدد الدقائق وبعدها يفتح الزر

addEventHandler("onClientGUIClick",root,
function()
if ( source == اسم الزر ) then
if ( serials[getSerial] ) then  
guiAntiFlood( button , 60000*mins) -- طبعا تعدل اسم الزر الي هو button تحطه بأسم الزر الي عندك
triggerServerEvent("money", localPlayer)
end
end
end)

--Server
addEvent("money",true)
addEventHandler("money",root,
function()
givePlayerMoney(source,1000)
outputChatBox( "حصلت علي 1000 من الفلوس ودلوقتي انتطر ساعتين حتي يتم حصول علي المال مرة تانية",source,0,255,0)
playSoundFrontEnd(source, 20)
end)

 

Edited by #Himoo
Link to comment
4 hours ago, #Himoo said:

طلبك الاول


--- هنا السيريالات الي تبيها تقدر تحط سيريالات بكيفك
serials = {
["serial1"] = true,
["serial2"] = true,
["serial3"] = true,
["serial4"] = true,
}
----------

function wnd() -- كود تح اللوحة
getSerial = getPlayerSerial(localPlayer)
if ( serials[getSerial] ) then  
if (guiGetVisible(اسم لوحتك) == false) then
guiSetVisible(اسم لوحتك,true)
showCursor(true)
else
guiSetVisible(اسم لوحتك,false)
showCursor(false)
end
end
end
addCommandHandler("command",wnd) -- كلمة فتح اف 8 للوحة

طلبك الثاني
 


-- Client
function guiAntiFlood(element, timer) -- to Mezo
    if getElementType ( element ) == "gui-button" then
        local atimer = tonumber(timer)
        if atimer == nil or atimer == '' or not tonumber(atimer) then
            error("Bad Argument the Argument 2 must number")
        else
        end
        guiSetEnabled(element,false)
        setTimer(function()
        guiSetEnabled(element,true)
        end,tonumber(atimer),1)
    else
        error("Bad Argument 1 the element must button")
  end
end

mins = 120 -- عدد الدقائق وبعدها يفتح الزر

addEventHandler("onClientGUIClick",root,
function()
if ( source == اسم الزر ) then
if ( serials[getSerial] ) then  
guiAntiFlood( button , 60000*mins) -- طبعا تعدل اسم الزر الي هو button تحطه بأسم الزر الي عندك
triggerServerEvent("money", localPlayer)
end
end
end)

--Server
addEvent("money",true)
addEventHandler("money",root,
function()
givePlayerMoney(source,1000)
outputChatBox( "حصلت علي 1000 من الفلوس ودلوقتي انتطر ساعتين حتي يتم حصول علي المال مرة تانية",source,0,255,0)
playSoundFrontEnd(source, 20)
end)

 

شكرا و يغلق !

  • Like 1
Link to comment
  • 2 weeks later...
On 11/4/2017 at 11:27, #Himoo said:

طلبك الاول


--- هنا السيريالات الي تبيها تقدر تحط سيريالات بكيفك
serials = {
["serial1"] = true,
["serial2"] = true,
["serial3"] = true,
["serial4"] = true,
}
----------

function wnd() -- كود تح اللوحة
getSerial = getPlayerSerial(localPlayer)
if ( serials[getSerial] ) then  
if (guiGetVisible(اسم لوحتك) == false) then
guiSetVisible(اسم لوحتك,true)
showCursor(true)
else
guiSetVisible(اسم لوحتك,false)
showCursor(false)
end
end
end
addCommandHandler("command",wnd) -- كلمة فتح اف 8 للوحة

طلبك الثاني
 


-- Client
function guiAntiFlood(element, timer) -- to Mezo
    if getElementType ( element ) == "gui-button" then
        local atimer = tonumber(timer)
        if atimer == nil or atimer == '' or not tonumber(atimer) then
            error("Bad Argument the Argument 2 must number")
        else
        end
        guiSetEnabled(element,false)
        setTimer(function()
        guiSetEnabled(element,true)
        end,tonumber(atimer),1)
    else
        error("Bad Argument 1 the element must button")
  end
end

mins = 120 -- عدد الدقائق وبعدها يفتح الزر

addEventHandler("onClientGUIClick",root,
function()
if ( source == اسم الزر ) then
if ( serials[getSerial] ) then  
guiAntiFlood( button , 60000*mins) -- طبعا تعدل اسم الزر الي هو button تحطه بأسم الزر الي عندك
triggerServerEvent("money", localPlayer)
end
end
end)

--Server
addEvent("money",true)
addEventHandler("money",root,
function()
givePlayerMoney(source,1000)
outputChatBox( "حصلت علي 1000 من الفلوس ودلوقتي انتطر ساعتين حتي يتم حصول علي المال مرة تانية",source,0,255,0)
playSoundFrontEnd(source, 20)
end)

 

متجي تايمر ؟
ولا لا

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