Mando Posted January 26, 2014 Posted January 26, 2014 السلام عليكم استخدم شو عشان لو انا ضغط علي 4 ازرار معينين مثلآ " اتصال بالشرطة " يجي عند الشرطة اسمي وقام بالاتصال ونفس اللكلام في الاسعاف + التاكسي
فاّرس Posted January 26, 2014 Posted January 26, 2014 تقدر تسويها لو ضغطت الزر يرسل كلام للي في تيم الشرطه ...
Mando Posted January 26, 2014 Author Posted January 26, 2014 تقدر تسويها لو ضغطت الزر يرسل كلام للي في تيم الشرطه ... اقصد مثلك كدا بس مايكرار الكلام اذا ضغط كتير
Mando Posted January 26, 2014 Author Posted January 26, 2014 تايمر فهمتها اللي هيا هذه setTimer صح ؟؟ , طيب وش المغيرات ؟
Mando Posted January 26, 2014 Author Posted January 26, 2014 قصدك اذا كتبت في ايدت ؟ لا اقصد زر اضغط عليه يجي اسم الاعب اللي ضغط بس يجي لكل تيم Police ونفس الشيء في الاسعاف
iPrestege Posted January 26, 2014 Posted January 26, 2014 تايمر فهمتها اللي هيا هذه setTimer صح ؟؟ , طيب وش المغيرات ؟ صح وسوي متغيير تتحقق بانة مضغوط الزر قبل الوقت اللي بالتايمر ولالا .
iPrestege Posted January 26, 2014 Posted January 26, 2014 ازاي ؟ تقدر تستخدم هذي اسهل لك مع التايمر واسرع .. guiSetEnabled setTimer addEventHandler 'onClientGUIClick' -- The Event!
Mando Posted January 26, 2014 Author Posted January 26, 2014 addEventHandler( "onClientGUIClick", root setTimer ( function() function ChangeMyButtonEnabled ( ) if ( guiGetEnabled ( MyButton ) == true ) then guiSetEnabled ( MyButton, false ) else guiSetEnabled ( MyButton, true ) end end MyButton = guiCreateButton(0.477,0.8268,0.1946,0.0784,"Call Police",true,MyGuiWindow) end, 5000, 1 ) هريسة ! طيب ماحد يقول هريسة بليز
iPrestege Posted January 26, 2014 Posted January 26, 2014 addEventHandler( "onClientGUIClick", root setTimer ( function() function ChangeMyButtonEnabled ( ) if ( guiGetEnabled ( MyButton ) == true ) then guiSetEnabled ( MyButton, false ) else guiSetEnabled ( MyButton, true ) end end MyButton = guiCreateButton(0.477,0.8268,0.1946,0.0784,"Call Police",true,MyGuiWindow) end, 5000, 1 ) هريسة ! طيب ماحد يقول هريسة بليز addEventHandler ( 'onClientGUIClick',MyButton, function ( ) outputChatBox ( '* The Button Was Clicked!' ) guiSetEnabled ( source,false ) setTimer ( guiSetEnabled,5000,1,source,true ) end,false )
iPrestege Posted January 26, 2014 Posted January 26, 2014 الزر اللي بيتقفل لمده 5 ثواني وهو MyButton^
Mando Posted January 26, 2014 Author Posted January 26, 2014 اها شكرآ لكن كيف اخليه اول لما يضغط يرسل رسالة كدا Mando قام بلاتصال بالشرطة ونفس الحكاية اقدر اخليه للسعاف والتاكسي ؟؟
iPrestege Posted January 26, 2014 Posted January 26, 2014 -- Client Side 'onClientGUIClick' -- Event addEventHandler triggerServerEvent -- Server Side getPlayersInTeam getTeamFromName outputChatBox
Mando Posted January 26, 2014 Author Posted January 26, 2014 كـلـنـت addEventHandler ('onClientGUIClick', root,function () if ( source == GUIEditor.button[1] ) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) triggerServerEvent ( 'call', localPlayer) end end ) سـيـرفـر addEvent( 'call', true ) addEventHandler( 'call', root,function() getPlayersInTeam ( source, getTeamFromName('Police' )) outputChatBox ( " قام بلاتصال بالشرطة".. name .. "", getRootElement(), 255, 255, 255, true ) end ) الوحة انا مسويه بس ماحب احطها بص تصحيح لو سمحت
./BlackBird# Posted January 26, 2014 Posted January 26, 2014 addEvent( 'call', true ) addEventHandler( 'call', root,function() cops = getPlayersInTeam ( getTeamFromName('Police' )) for _,v in ipairs(cops) do outputChatBox ( "بالاتصال على الشرطة "..getPlayerName(client).." لقد قام",v, 255, 255, 255, true ) end end )
Mando Posted January 26, 2014 Author Posted January 26, 2014 addEvent( 'call', true ) addEventHandler( 'call', root,function() cops = getPlayersInTeam ( getTeamFromName('Police' )) for _,v in ipairs(cops) do outputChatBox ( "بالاتصال على الشرطة "..getPlayerName(client).." لقد قام",v, 255, 255, 255, true ) end end ) مشكور حبي بجرب
K1NG Posted January 26, 2014 Posted January 26, 2014 addEvent( 'call', true ) addEventHandler( 'call', root,function() cops = getPlayersInTeam ( getTeamFromName('Police' )) for _,v in ipairs(cops) do outputChatBox ( "بالاتصال على الشرطة "..getPlayerName(client).." لقد قام",v, 255, 255, 255, true ) end end ) صاحب الموضوع فيه عندهـ نقص بأكواد الكلنت من ناحية اقفال الزر + يمديكـ تسوي الحدث بطريقة مختصرة لأنه بيسويها ع أكثر من تيم بدال مايسوي تريقر كل شوي --- : بالنسبة لصاحب الموضوع، جرب هذا * Client Side: function close ( theButton ) guiSetVisible ( GUIEditor.window[1], false ) showCursor ( false ) guiSetEnabled ( theButton, false ) setTimer ( guiSetEnabled, 5000, 1, theButton, true ) end addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == GUIEditor.button[1] ) then triggerServerEvent ( "call", localPlayer, "Police" ) close ( source ) --[[ elseif ( source == GUIEditor.button[2] ) then triggerServerEvent ( "call", localPlayer, "Medic" ) close ( source ) elseif ( source == GUIEditor.button[3] ) then triggerServerEvent ( "call", localPlayer, "Mechanic" ) close ( source ) --]] end end, false ) * Server Side: addEvent ( "call", true ) addEventHandler ( "call", root, function ( teamName ) for _, v in ipairs ( getPlayersInTeam ( getTeamFromName ( teamName ) ) ) do outputChatBox ( teamName .. " قام بالإتصال بفريق الـ " .. getPlayerName ( client ), v, 255, 255, 255, true ) end end ) على فكرة يوم تبي تسويها على تيم آخر مايحتاج تسوي تريقر آخر بجانب السيرفر بس تسوي شرط زيادة بجانب الكلاينت مثل ماني مسويلكـ بزر الإسعاف والميكآنيكـ كـ أمثلة
Mando Posted January 26, 2014 Author Posted January 26, 2014 مشكور كنق + مجنون فيك بس في مشكلة كـلـنت GUIEditor = { button = {}, window = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(230, 271, 255, 196, "لوحة اللاعب", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) GUIEditor.button[1] = guiCreateButton(403, 425, 77, 36, "Call Police", false) GUIEditor.button[2] = guiCreateButton(234, 291, 77, 35, "Call Medic", false) GUIEditor.label[1] = guiCreateLabel(293, 393, 245, 17, "ملاحظة : كـل أسـبـوع يـتـم الـتـحديـث", false) end ) bindKey ( "F3" , "down" , function() if ( guiGetVisible ( GUIEditor.window[1] ) == true ) then guiSetVisible ( GUIEditor.window[1] ,false ) showCursor (false ) guiSetInputEnabled(false) elseif ( guiGetVisible ( GUIEditor.window[1] ) == false ) then guiSetVisible ( GUIEditor.window[1] ,true ) showCursor (true) end end ) addEventHandler ( "onClientGUIClick", resourceRoot, function ( ) if ( source == GUIEditor.button[1] ) then triggerServerEvent ( "call", localPlayer, "Police" ) close ( source ) elseif ( source == GUIEditor.button[2] ) then triggerServerEvent ( "call", localPlayer, "Medic" ) close ( source ) elseif ( source == GUIEditor.button[3] ) then triggerServerEvent ( "call", localPlayer, "Mechanic" ) close ( source ) end end, false ) سيرفر addEvent ( "call", true ) addEventHandler ( "call", root, function ( teamName ) for _, v in ipairs ( getPlayersInTeam ( getTeamFromName ( teamName ) ) ) do outputChatBox ( teamName .. " قام بالإتصال بفريق الـ " .. getPlayerName ( client ), v, 255, 255, 255, true ) end end ) مايجي شيء في debugscript 3 ولما اضغط call Police وانا في تيم Police مايجي شيء في الشات + مشكور اخي كنق فكرتك حلوه فعلآ كنت بتعب وبدي كود فتح نافذة واغلاقها ومدري هذه مشكلة ولا اية موداللي يسوي نافذة هذه كل ماسوي زر واجي اسوي زر تاني يختفي يكون وار النافذة ولما احط كود اغلاق النافذة وفتحها النافذة تختفي الازرار لا الميتا "Mando" version="1.0" type="script" name="Call System"Call Police , Call Medic" /> .lua" type="client"> server">
فاّرس Posted January 26, 2014 Posted January 26, 2014 > author="Mando" version="1.0" type="script" name="Call System" description="Call Police , Call Medic" /> ="client.lua" type="client">> ="server.lua" type="server">>>
Mando Posted January 26, 2014 Author Posted January 26, 2014 > author="Mando" version="1.0" type="script" name="Call System" description="Call Police , Call Medic" /> ="client.lua" type="client">> ="server.lua" type="server">>> نفس المشكلة مايجي قام الاتصال وكدا
EH10 Posted January 26, 2014 Posted January 26, 2014 اتوقع ماحطيت اسم التيم + مادخلت التيم teamName = بدلة باسم التيم
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now