Jump to content

التيمات


Recommended Posts

Posted

باك من الرجعه

يدي كود لتيم الشرطه وتيم النوتيم الا بدي لما اضغط على بوتون 1 يحول اللاعب للتيم حق بوتون 1

ولما اضغط على بوتون2 يحولتي للتيم حق بوتون 2

محتاج الكود سرييع ضروري يعيال

  • Replies 71
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

بالله كود زي هذا ماتعرف تسوية؟ كل اللي عليك تسوي حدث بالكلنت عند الضغط على البوتون كذا يسوي ترايقر اذا حصل تيم الاعب كذا يحطة كذا او العكس مثل مافهمت منك .

  

Posted

اخوي حاول تسوي الاكواد وبساعدك وبصحح لك اخطاءك , لا تتعود على الاكواد الجاهزة

بشرح لك الفنكشنات

---------------------------------------------------------------

'onClientGUIClick' 

هذا حدث الضغط على الزر ,

---------------------------------------------------------------

triggerServerEvent 

هذا ترايقر يستخدم اذا كانت الاكواد ( الفنكشنات ) سيرفر وباقي الاكواد كلينت ف ما راح يشتغل الكود الا اذا سويت ترايقر

---------------------------------------------------------------

setPlayerTeam 

هذا الكود ( الفنكشن ) وضع اللاعب بتيم معين ..

مثلآ سويت زر وسميته تيم كي اس اي

ابي اذا ضغطت على زر تيم كي اس اي , يدخلني للتيم

---------------------------------------------------------------

اتمنى فهمت علي , وحاول تسويهم , ولا تتعود على النسخ واللصق ( الاكواد الجاهزة ) ء

بالتوفيق

Quote

"I ain't saying I'm the best, but I should be in the top ten; give me a list of names, I'ma top them,
I'm just playing with ya. I don't care where the top is,
Leave me at the bottom, let me work for it.
"

 

_________________________________________________________________________________________________________________

ACM

90183-bed46f22aafe8af7dc65cdd73fff2f76-medium_jpg.jpg?buster=1481325396W_#9661

Posted
--#Client 
  
addEventHandler( "onClientGUIClick", root, 
function () 
if source == btn1 then 
triggerServerEvent ( "GiveMeTeam1",localPlayer )   
elseif source == btn2 then 
triggerServerEvent ( "GiveMeTeam2",localPlayer ) 
    end 
end 
) 
  
--------------- 
--#Server 
local Police = createTeam ( Police ) 
local NoTeam = createTeam ( NoTeam ) 
  
addEvent ( "GiveMeTeam1",true ) 
addEventHandler ( "GiveMeTeam1", root, 
function() 
setPlayerTeam(source, Police ) 
end 
) 
  
addEvent ( "GiveMeTeam2",true ) 
addEventHandler ( "GiveMeTeam2", root, 
function() 
setPlayerTeam(source, NoTeam ) 
end 
) 

صراحة الكود سهل مثل كود

giveWeapon 

Chillin' with some demons, satans and vamps

Posted

--#Client 
  
addEventHandler ( "onClientGUIClick", root, 
function () 
if ( source == btn1 ) then 
triggerServerEvent ( "GiveMeTeam1", localPlayer )   
end 
if ( source == btn2 ) then 
triggerServerEvent ( "GiveMeTeam2", localPlayer ) 
    end 
end 
) 
  
--------------- 
--#Server 
  
addEvent ( "GiveMeTeam1",true ) 
addEventHandler ( "GiveMeTeam1", root, 
function() 
setPlayerTeam(source, getTeamFromName ("Police1")) 
end 
) 
  
addEvent ( "GiveMeTeam2",true ) 
addEventHandler ( "GiveMeTeam2", root, 
function() 
setPlayerTeam(source, getTeamFromName ("Police")) 
end 
) 
Posted (edited)

عليكم السلام

تفضل

كلينت

addEventHandler("onClientGUIClick",root, 
  
    function (  ) 
  
    if source == Button1 then  
  
    triggerServerEvent("LoginTeam1",localPlayer) 
  
    elseif source == Button2 then 
  
    triggerServerEvent("LoginTeam2",localPlayer) 
  
        end 
         
end     ); 

سيرفر

addEvent("LoginTeam1", true ) 
  
addEventHandler("LoginTeam1",root, 
  
    function(   ) 
  
    local aTeam = getPlayerTeam ( client ) 
         
    if aTeam and aTeam == getTeamFromName ( "NoTeam" ) then 
         
    setPlayerTeam ( client , getTeamFromName ( "Police" ) ) 
      
    outputChatBox ("تم دخول التيم", client , 255 , 255 , 255 , true ) 
      
    else 
      
    outputChatBox("انت في التيم الان ", client , 255 , 0 , 0 , true ) 
  
        end 
  
end     ); 
  
  
addEvent("LoginTeam2", true ) 
  
addEventHandler("LoginTeam2",root, 
  
    function(   ) 
  
    local eTeam = getPlayerTeam ( client ) 
         
    if eTeam and eTeam == getTeamFromName ( "Police" ) then 
         
    setPlayerTeam ( client , getTeamFromName ( "NoTeam" ) ) 
      
    outputChatBox ("تم دخول التيم", client , 0 , 0 , 255 , true ) 
      
    else 
      
    outputChatBox("انت في التيم الان ", client , 255 , 0 , 0 , true ) 
   
    end 
     
end     ); 

#,+( _xiRoc[K]; > كودك مافيه تحقق

#x1AhMeD,-09 ايضا كودك مافي تحقق + انت مسوي تيم عشان تدخله فيه

ومايحتاج نسوي تيم نقدر تجيب تيم من اسمه عن طريق

getTeamFromName 

بالتوفيق

Edited by Guest

[ Skype : kreee89 - Discord : Abdul_KariM#1326 / طلبات البرمجة

https://www.paypal.me/AbdulKariMx / اذا حاب تدعمني

Posted

فرحانين ؟

ليه ما خليتوه يحاول يسوي الفنكشنات !!!َ

Quote

"I ain't saying I'm the best, but I should be in the top ten; give me a list of names, I'ma top them,
I'm just playing with ya. I don't care where the top is,
Leave me at the bottom, let me work for it.
"

 

_________________________________________________________________________________________________________________

ACM

90183-bed46f22aafe8af7dc65cdd73fff2f76-medium_jpg.jpg?buster=1481325396W_#9661

Posted
فرحانين ؟

ليه ما خليتوه يحاول يسوي الفنكشنات !!!َ

خله يتعلم من الكود وش سوينا

يعني لما تعطيه الفانكشنات و تسوي قدامو الكود هيفهم شوي

Chillin' with some demons, satans and vamps

Posted
فرحانين ؟

ليه ما خليتوه يحاول يسوي الفنكشنات !!!َ

^

https://forum.multitheftauto.com/viewtopic.php?f=160&t=88499&p=798295&hilit=%D8%A7%D8%A8%D9%8A+%D8%A7%D9%84%D9%83%D9%88%D8%AF+%D8%AC%D8%A7%D9%87%D8%B2#p798295

زي ماكنت تطلب الاكواد جاهزة

حنا بعد نعطي اكواد جاهزة :)

[ Skype : kreee89 - Discord : Abdul_KariM#1326 / طلبات البرمجة

https://www.paypal.me/AbdulKariMx / اذا حاب تدعمني

Posted
فرحانين ؟

ليه ما خليتوه يحاول يسوي الفنكشنات !!!َ

^

https://forum.multitheftauto.com/viewtopic.php?f=160&t=88499&p=798295&hilit=%D8%A7%D8%A8%D9%8A+%D8%A7%D9%84%D9%83%D9%88%D8%AF+%D8%AC%D8%A7%D9%87%D8%B2#p798295

زي ماكنت تطلب الاكواد جاهزة

حنا بعد نعطي اكواد جاهزة :)

قلتها بنفسك , ( كنت ) ء !

لا تتكلم عن الماضي

الانسان يتغير ويحترف .. :)

Quote

"I ain't saying I'm the best, but I should be in the top ten; give me a list of names, I'ma top them,
I'm just playing with ya. I don't care where the top is,
Leave me at the bottom, let me work for it.
"

 

_________________________________________________________________________________________________________________

ACM

90183-bed46f22aafe8af7dc65cdd73fff2f76-medium_jpg.jpg?buster=1481325396W_#9661

Posted
^

طيب ذا يعني محترف

لو انه محترف ماجا وطلب ااكواد جاهزه

وان شاء الله يوصل مرحلة الاحتراف

عطيته شرح للفنكشنات الي عطوهه له الشباب ,

وقلت له وش يسسوي ,

----

واعترف لك وللباقي

صح كنت متعود على الاكواد الجاهزة بس الحين لا أطلب الفنكشنات الي ما اعرف لها , واسويها بنفسي

والحين حبيت أنصح غيري ما يتعود على الاكواد الجاهزة , عشان يحترف بوقت قصير ..

+ خلاص لا تغير مسار الموضوع لو سمحت

Quote

"I ain't saying I'm the best, but I should be in the top ten; give me a list of names, I'ma top them,
I'm just playing with ya. I don't care where the top is,
Leave me at the bottom, let me work for it.
"

 

_________________________________________________________________________________________________________________

ACM

90183-bed46f22aafe8af7dc65cdd73fff2f76-medium_jpg.jpg?buster=1481325396W_#9661

Posted

ذذ انا حطيت اكوادك وما زبط شوف

لكلينت سايد

--==================================================Open Panel F4======================================================================= 
bindKey("F4", "down", 
function () 
    if guiGetVisible(wndf4) == true then 
        guiSetVisible(wndf4, false) 
        guiSetVisible(wndf4, false) 
        guiSetVisible(wndf4, false) 
        guiSetVisible(wndf4, false) 
        guiSetInputEnabled(false) 
    elseif not isCursorShowing () then 
        guiSetVisible(wndf4, true) 
        guiSetInputEnabled(true) 
    end 
end ) 
--============================================================================================================================================ 
--================================================================================================================================ 
--======================================F4 Jop Panel ======================================= 
  
GUIEditor = { 
    button = {}, 
    window = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
local screenW, screenH = guiGetScreenSize() 
        wndf4 = guiCreateWindow((screenW - 354) / 2, (screenH - 104) / 2, 354, 104, "Jop Systeam", false) 
        guiWindowSetMovable(wndf4, false) 
        guiSetAlpha(GUIEditor.window[1], 1.00) 
        guiSetProperty(wndf4, "CaptionColour", "FF00FF90") 
  
        btn1 = guiCreateButton(10, 45, 152, 44, "Start Job", false, wndf4) 
        guiSetProperty(btn1, "NormalTextColour", "FF24FF00") 
        btn2 = guiCreateButton(189, 45, 152, 44, "Quit Job", false, wndf4) 
        guiSetProperty(btn2, "NormalTextColour", "FFFF0000")     
    end 
) 
--================================================================================================= 
--=============================================F4==================================================== 
addEventHandler("onClientGUIClick",root, 
  
    function (  ) 
  
    if source == btn1 then 
  
    triggerServerEvent("No Team",localPlayer) 
  
    elseif source == btn2 then 
  
    triggerServerEvent("Player",localPlayer) 
  
        end 
        
end     ); 
--============================================================================= 

سيرفر سايد

--==========================================F4================================================================== 
addEvent("LoginTeam1", true ) 
  
addEventHandler("LoginTeam1",root, 
  
    function(   ) 
  
    local aTeam = getPlayerTeam ( client ) 
        
    if aTeam and aTeam == getTeamFromName ( "No Team ) then 
        
    setPlayerTeam ( client , getTeamFromName ( "Player" ) ) 
      
    outputChatBox ("تم دخول التيم", client , 255 , 255 , 255 , true ) 
      
    else 
      
    outputChatBox("انت في التيم الان ", client , 255 , 0 , 0 , true ) 
  
        end 
  
end     ); 
  
  
addEvent("LoginTeam2", true ) 
  
addEventHandler("LoginTeam2",root, 
  
    function(   ) 
  
    local eTeam = getPlayerTeam ( client ) 
        
    if eTeam and eTeam == getTeamFromName ( "Player" ) then 
        
    setPlayerTeam ( client , getTeamFromName ( "No Team" ) ) 
      
    outputChatBox ("تم دخول التيم", client , 0 , 0 , 255 , true ) 
      
    else 
      
    outputChatBox("انت في التيم الان ", client , 255 , 0 , 0 , true ) 
  
    end 
    
end     ); 
--===================================================================================================================================== 
 

Posted

سيرفر :

--==========================================F4================================================================== 
addEvent("LoginTeam1", true ) 
  
addEventHandler("LoginTeam1",root, 
  
    function(   ) 
  
    local aTeam = getPlayerTeam ( client ) 
        
    if aTeam and aTeam == getTeamFromName ( "No Team" ) then 
      
   setPlayerTeam ( client , getTeamFromName ( "Player" ) ) 
    
   outputChatBox ("تم دخول التيم", client , 255 , 255 , 255 , true ) 
    
   else 
    
   outputChatBox("انت في التيم الان ", client , 255 , 0 , 0 , true ) 
  
       end 
  
end     ); 
  
  
addEvent("LoginTeam2", true ) 
  
addEventHandler("LoginTeam2",root, 
  
   function(   ) 
  
   local eTeam = getPlayerTeam ( client ) 
      
   if eTeam and eTeam == getTeamFromName ( "Player" ) then 
      
   setPlayerTeam ( client , getTeamFromName ( "No Team" ) ) 
    
   outputChatBox ("تم دخول التيم", client , 0 , 0 , 255 , true ) 
    
   else 
    
   outputChatBox("انت في التيم الان ", client , 255 , 0 , 0 , true ) 
  
   end 
  
end     ); 
--===================================================================================================================================== 

Discord: LoOs#1111

_____________________________

76561198299431254.png

Posted

^

لوس

لاحظ اسم الترايقرات بالكلينت

تفضل سيرفر

addEvent("No Team", true ) 
  
addEventHandler("No Team",root, 
  
    function(   ) 
  
    local aTeam = getPlayerTeam ( client ) 
        
    if aTeam and aTeam == getTeamFromName ( "No Team" ) then 
      
   setPlayerTeam ( client , getTeamFromName ( "Player" ) ) 
    
   outputChatBox ("تم دخول التيم", client , 255 , 255 , 255 , true ) 
    
   else 
    
   outputChatBox("انت في التيم الان ", client , 255 , 0 , 0 , true ) 
  
       end 
  
end     ); 
  
  
addEvent("Player", true ) 
  
addEventHandler("Player",root, 
  
   function(   ) 
  
   local eTeam = getPlayerTeam ( client ) 
      
   if eTeam and eTeam == getTeamFromName ( "Player" ) then 
      
   setPlayerTeam ( client , getTeamFromName ( "No Team" ) ) 
    
   outputChatBox ("تم دخول التيم", client , 0 , 0 , 255 , true ) 
    
   else 
    
   outputChatBox("انت في التيم الان ", client , 255 , 0 , 0 , true ) 
  
   end 
  
end     ); 

[ Skype : kreee89 - Discord : Abdul_KariM#1326 / طلبات البرمجة

https://www.paypal.me/AbdulKariMx / اذا حاب تدعمني

Posted
^

لوس

لاحظ اسم الترايقرات بالكلينت

تفضل سيرفر

addEvent("No Team", true ) 
  
addEventHandler("No Team",root, 
  
    function(   ) 
  
    local aTeam = getPlayerTeam ( client ) 
        
    if aTeam and aTeam == getTeamFromName ( "No Team" ) then 
      
   setPlayerTeam ( client , getTeamFromName ( "Player" ) ) 
    
   outputChatBox ("تم دخول التيم", client , 255 , 255 , 255 , true ) 
    
   else 
    
   outputChatBox("انت في التيم الان ", client , 255 , 0 , 0 , true ) 
  
       end 
  
end     ); 
  
  
addEvent("Player", true ) 
  
addEventHandler("Player",root, 
  
   function(   ) 
  
   local eTeam = getPlayerTeam ( client ) 
      
   if eTeam and eTeam == getTeamFromName ( "Player" ) then 
      
   setPlayerTeam ( client , getTeamFromName ( "No Team" ) ) 
    
   outputChatBox ("تم دخول التيم", client , 0 , 0 , 255 , true ) 
    
   else 
    
   outputChatBox("انت في التيم الان ", client , 255 , 0 , 0 , true ) 
  
   end 
  
end     ); 

لا انا شفت في خطا بالسيرفر بالسترنق

وحليتها وبس :|

مانتبهت للاسامي حقت الترايقر

Discord: LoOs#1111

_____________________________

76561198299431254.png

Posted (edited)
ابي لما اضغط على بوتون بعد 10 ثواني يموت اللاعب

+ ممكن السكايب حقك ؟

^

تقضل

addEventHandler("onClientGUIClick",root, 
  
    function (  ) 
  
    if source == Button1 then  
     
    if isTimer ( TheTimer ) then killTimer ( TheTimer ) TheTimer = nil end 
     
    TheTimer = setTimer( 
  
    function (  ) 
      
    setElementHealth(localPlayer,0) 
  
                end , 1000*10,1) 
  
        end  
     
end ) ; 

سكايب مادخله كثير والله

+

لو تبي اطلع لك الثواني بالشاشة

اسويه لك ماعندك مشكلة

Edited by Guest

[ Skype : kreee89 - Discord : Abdul_KariM#1326 / طلبات البرمجة

https://www.paypal.me/AbdulKariMx / اذا حاب تدعمني

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