Jump to content

طلب فنكشنـآت ~ #


Recommended Posts

السلامُ عليْكمُ ورَحمَة الله وبرَكآتُهُ ..

اخبـآركم ي الطييبين ~

أمـآ بعد #

سويت لوحة سجن وكل شيء تمام حق السجن

بس باقي لي المدة

يعني السجن نفسه والباقي سويته بس باقي لي فنكشنات المدة ~ مثلاً دقيقة دقيقتين الخ ~

والسلام عليكم :P

Link to comment
toggleControl ( "aim_weapon", false ) -- تقفل تحريك السلاح 
toggleControl ( "sprint", false ) -- تقفل الركض 
toggleControl ( "fire", false ) -- تقفل الطلق بالسلاح 
toggleControl ( "next_weapon", false ) -- تقفل تغير السلاح 
toggleControl ( "previous_weapon", false ) -- نفس الي فوق 
toggleControl ( "jump", false ) -- تقفل النقز 
unbindKey -- تحذف زر نافذه السيارات 
-- باقي التايمر ماعرف له 
-- ادري تعليق ماله فايده بس يزيد لك افكار عشان يظبط السكربت اكثر 
  

Link to comment

وهذا هو الكود حقي ~

addEvent("onJail",true) 
addEventHandler("onJail",root, 
    function (player,time) 
        local player = getPlayerFromName(player) 
if time == "1 min" then 
if getElementData( player, "jailed") then  return outputChatBox("The player Is ALREADY in Jail !!",player,255,0,0) end  
fadeCamera(player,false) 
setTimer(function()  
fadeCamera(player,true) 
setElementPosition ( player,646.57916, -7659.33105, 12.86875) 
end,4000,1) 
setElementData(player,"jailed",true) 
        toggleControl (player, "fire", false) 
        toggleControl (player, "aim_weapon", false) 
        toggleControl (player, "weapon", false) 
        toggleControl (player, "vehicle_fire", false) 
        toggleControl (player, "vehicle_secondary_fire", false)  
        outputChatBox(getPlayerName(player).." have Been Jailed By " .. getPlayerName(source),root,255,0,0,false) 
    end 
end 
) 

Link to comment

قصدك بقى 05:00:00

كذا؟

استخدم مود mission timer

موجود في المودات

الاصلية

https://wiki.multitheftauto.com/wiki/Re ... ssiontimer

createMissionTimer ( duration, countdown, format, x, y, bg, font, scale, r, g, b )

duration - The time in milliseconds

countdown - A bool of whether to countdown or count up. Setting it to true will count down from the duration, setting it to false will count up to the duration (latter isnt tested yet)

format - A string detailing the format of the timer text to be shown. You can chose whether to show minutes, seconds or centiseconds using these 3 strings:

%m - minutes

%s - seconds

%cs - centiseconds

This allows you to add normal text onto the timer as well as showing the time left (eg: "Time left: %m:%s")

x,y - Position on the screen, this uses "smart positioning". It can be relative or absolute - the deathmatch gamemode creates it at 0.5,20. This means the x value is in the centre, the y is 20pixels from the top. If you specify a negative value it draws the other way, i.e. -20 would be 20pixels from the bottom rather than the top. The same can be done for x.

bg - Whether to draw the default rounded-rectangle behind the timer. Setting this to false will hide it

font - The font of the timer. Looks best in default-bold

scale - The size of the text/bg.

r,g,b - The red/green/blue components to make up the colour of the timer text (defaults to white)

^ هذا صنع المؤقت

To remove a missiontimer from the screen, use destroyElement.

لحذف المؤقت استخدم destroyElement

The "deathmatch" gamemode is an example use of missiontimer. It uses the "createMissionTimer" function to create a timer, and then the onMissionTimerElapsed event to trigger at the end:

g_MissionTimer = exports.missiontimer:createMissionTimer (g_TimeLimit,true,"%m:%s",0.5,20,true,"default-bold",1,255,255,255) 
    addEventHandler ( "onMissionTimerElapsed", g_MissionTimer, onTimeElapsed ) 

Then you use the onTimeElapsed function that you attached to the handler at the end of the timer.

onMissionTimerElapsed

اذا الوقت انتهى

Link to comment
قصدك بقى 05:00:00

كذا؟

استخدم مود mission timer

موجود في المودات

الاصلية

https://wiki.multitheftauto.com/wiki/Re ... ssiontimer

createMissionTimer ( duration, countdown, format, x, y, bg, font, scale, r, g, b )

duration - The time in milliseconds

countdown - A bool of whether to countdown or count up. Setting it to true will count down from the duration, setting it to false will count up to the duration (latter isnt tested yet)

format - A string detailing the format of the timer text to be shown. You can chose whether to show minutes, seconds or centiseconds using these 3 strings:

%m - minutes

%s - seconds

%cs - centiseconds

This allows you to add normal text onto the timer as well as showing the time left (eg: "Time left: %m:%s")

x,y - Position on the screen, this uses "smart positioning". It can be relative or absolute - the deathmatch gamemode creates it at 0.5,20. This means the x value is in the centre, the y is 20pixels from the top. If you specify a negative value it draws the other way, i.e. -20 would be 20pixels from the bottom rather than the top. The same can be done for x.

bg - Whether to draw the default rounded-rectangle behind the timer. Setting this to false will hide it

font - The font of the timer. Looks best in default-bold

scale - The size of the text/bg.

r,g,b - The red/green/blue components to make up the colour of the timer text (defaults to white)

^ هذا صنع المؤقت

To remove a missiontimer from the screen, use destroyElement.

لحذف المؤقت استخدم destroyElement

The "deathmatch" gamemode is an example use of missiontimer. It uses the "createMissionTimer" function to create a timer, and then the onMissionTimerElapsed event to trigger at the end:

g_MissionTimer = exports.missiontimer:createMissionTimer (g_TimeLimit,true,"%m:%s",0.5,20,true,"default-bold",1,255,255,255) 
    addEventHandler ( "onMissionTimerElapsed", g_MissionTimer, onTimeElapsed ) 

Then you use the onTimeElapsed function that you attached to the handler at the end of the timer.

onMissionTimerElapsed

اذا الوقت انتهى

م فهمت صرآحة ..

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