Jump to content

مساعده


Teto

Recommended Posts

Posted (edited)

السلام عليكم 

 

    Criminal تغلق النافذه ويتم نقله الي تيم ال Get the Job يخرج من القائمه وعندما يضغط علي Exit فكره السكربت : عندما يدخل الاعب  الماركر تظهر نافذه عندما يضغط الاعب علي زر 

 

 

Client Side

 

 

[lua]createTeam("Criminal",252,11,11)
marker1 = createMarker(1625.8000488281,-1510.5,12.60000038147,"cylinder",1,254,0,0) -- صنع ماركر  
function test(  )                          
GUIEditor = {                              
    button = {},
    window = {}
}
    
               --صنع النافذه
        GUIEditor.window[1] = guiCreateWindow(342, 110, 712, 482, "(RLU)Criminal Job", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0505")

        GUIEditor.button[1] = guiCreateButton(9, 413, 143, 59, "Get the Job !", false, GUIEditor.window[1])
        GUIEditor.button[2] = guiCreateButton(705, 417, 0, 15, "", false, GUIEditor.window[1])
        GUIEditor.button[3] = guiCreateButton(704, 417, 0, 15, "", false, GUIEditor.window[1])
        GUIEditor.button[4] = guiCreateButton(572, 410, 131, 62, "Exit", false, GUIEditor.window[1])   
        showCursor ( true )        
    end
    addEventHandler("onClientMarkerHit",marker1,test)
--Exit button
    function buttonClose()
     if ( source == GUIEditor.button[4] ) then
      guiSetVisible ( GUIEditor.window[1] , false )
 
    showCursor( false )
  guiSetInputEnabled ( false )
    
    end

end

function buttonOpen( player )
     if ( source == GUIEditor.button[1] ) then
     guiSetVisible ( GUIEditor.window[1] , false )
     guiSetInputEnabled ( false )
         showCursor( false )
        setPlayerTeam(player,"Criminal")
    
    end
    
    
    
    
    
  -- برمجه للشخصيه 
 thePed = createPed(0,1625.80774, -1509.70374, 13.59852,180)
function cancelPedDamage(player)
    cancelEvent() -- Cancels the onClientPedDamage event
    
end
addEventHandler("onClientPedDamage", thePed, cancelPedDamage) -- When thePed is damaged, cancelPedDamage is called[/lua]

 

meta.xml

 

[lua]<meta>
<script src="c.lua" type="client" />

</meta>[/lua]

Edited by Teto
Posted (edited)
39 minutes ago, Teto said:

السلام عليكم 

 

    Criminal تغلق النافذه ويتم نقله الي تيم ال Get the Job يخرج من القائمه وعندما يضغط علي Exit فكره السكربت : عندما يدخل الاعب  الماركر تظهر نافذه عندما يضغط الاعب علي زر 

 

 

Client Side

 

 

[lua]createTeam("Criminal",252,11,11)
marker1 = createMarker(1625.8000488281,-1510.5,12.60000038147,"cylinder",1,254,0,0) -- صنع ماركر  
function test(  )                          
GUIEditor = {                              
    button = {},
    window = {}
}
    
               --صنع النافذه
        GUIEditor.window[1] = guiCreateWindow(342, 110, 712, 482, "(RLU)Criminal Job", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0505")

        GUIEditor.button[1] = guiCreateButton(9, 413, 143, 59, "Get the Job !", false, GUIEditor.window[1])
        GUIEditor.button[2] = guiCreateButton(705, 417, 0, 15, "", false, GUIEditor.window[1])
        GUIEditor.button[3] = guiCreateButton(704, 417, 0, 15, "", false, GUIEditor.window[1])
        GUIEditor.button[4] = guiCreateButton(572, 410, 131, 62, "Exit", false, GUIEditor.window[1])   
        showCursor ( true )        
    end
    addEventHandler("onClientMarkerHit",marker1,test)
--Exit button
    function buttonClose()
     if ( source == GUIEditor.button[4] ) then
      guiSetVisible ( GUIEditor.window[1] , false )
 
    showCursor( false )
  guiSetInputEnabled ( false )
    
    end

end

function buttonOpen( player )
     if ( source == GUIEditor.button[1] ) then
     guiSetVisible ( GUIEditor.window[1] , false )
     guiSetInputEnabled ( false )
         showCursor( false )
        setPlayerTeam(player,"Criminal")
    
    end
    
    
    
    
    
  -- برمجه للشخصيه 
 thePed = createPed(0,1625.80774, -1509.70374, 13.59852,180)
function cancelPedDamage(player)
    cancelEvent() -- Cancels the onClientPedDamage event
    
end
addEventHandler("onClientPedDamage", thePed, cancelPedDamage) -- When thePed is damaged, cancelPedDamage is called[/lua]

 

meta.xml

 

[lua]<meta>
<script src="c.lua" type="client" />

</meta>[/lua]

--Client Side ####
[lua]createTeam("Criminal",252,11,11)
marker1 = createMarker(1625.8000488281,-1510.5,12.60000038147,"cylinder",1,254,0,0) -- صنع ماركر  
function test(  )                          
GUIEditor = {                              
    button = {},
    window = {}
}
    
               
        GUIEditor.window[1] = guiCreateWindow(342, 110, 712, 482, "(RLU)Criminal Job", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0505")

        GUIEditor.button[1] = guiCreateButton(9, 413, 143, 59, "Get the Job !", false, GUIEditor.window[1])
        GUIEditor.button[2] = guiCreateButton(705, 417, 0, 15, "", false, GUIEditor.window[1])
        GUIEditor.button[3] = guiCreateButton(704, 417, 0, 15, "", false, GUIEditor.window[1])
        GUIEditor.button[4] = guiCreateButton(572, 410, 131, 62, "Exit", false, GUIEditor.window[1])   
        showCursor ( true )        
    end
    addEventHandler("onClientMarkerHit",marker1,test)

    function buttonClose()
     if ( source == GUIEditor.button[4] ) then
      guiSetVisible ( GUIEditor.window[1] , false )
 
    showCursor( false )
  guiSetInputEnabled ( false )
    
    end

end

function buttonOpen( player )
     if ( source == GUIEditor.button[1] ) then
     guiSetVisible ( GUIEditor.window[1] , false )
     guiSetInputEnabled ( false )
         showCursor( false )
       triggerServerEvent("Team",localPlayer)
    
    end
    
    
    
    
    
  -- برمجه للشخصيه 
 thePed = createPed(0,1625.80774, -1509.70374, 13.59852,180)
function cancelPedDamage(player)
    cancelEvent() -- Cancels the onClientPedDamage event
    
end
addEventHandler("onClientPedDamage", thePed, cancelPedDamage) -- When thePed is damaged, cancelPedDamage is called[/lua]

 

--meta.xml

 

[lua]<meta>
<script src="c.lua" type="client" />
<script src="s.lua" type="server" />

</meta>[/lua]
 -- server side ###
  addEvent('Team',true)
addEventHandler('Team',root,
function ()
 setPlayerTeam(source,"Criminal")
 end
 )

ماغيرت شي بس خليت الاعب في تيم معين لما يضغط على بوتون 

وادا في خطا في اللوحة منك انت :)  

Edited by mahmod3
Posted
43 minutes ago, mahmod3 said:

--Client Side ####
[lua]createTeam("Criminal",252,11,11)
marker1 = createMarker(1625.8000488281,-1510.5,12.60000038147,"cylinder",1,254,0,0) -- صنع ماركر  
function test(  )                          
GUIEditor = {                              
    button = {},
    window = {}
}
    
               
        GUIEditor.window[1] = guiCreateWindow(342, 110, 712, 482, "(RLU)Criminal Job", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0505")

        GUIEditor.button[1] = guiCreateButton(9, 413, 143, 59, "Get the Job !", false, GUIEditor.window[1])
        GUIEditor.button[2] = guiCreateButton(705, 417, 0, 15, "", false, GUIEditor.window[1])
        GUIEditor.button[3] = guiCreateButton(704, 417, 0, 15, "", false, GUIEditor.window[1])
        GUIEditor.button[4] = guiCreateButton(572, 410, 131, 62, "Exit", false, GUIEditor.window[1])   
        showCursor ( true )        
    end
    addEventHandler("onClientMarkerHit",marker1,test)

    function buttonClose()
     if ( source == GUIEditor.button[4] ) then
      guiSetVisible ( GUIEditor.window[1] , false )
 
    showCursor( false )
  guiSetInputEnabled ( false )
    
    end

end

function buttonOpen( player )
     if ( source == GUIEditor.button[1] ) then
     guiSetVisible ( GUIEditor.window[1] , false )
     guiSetInputEnabled ( false )
         showCursor( false )
       triggerServerEvent("Team",localPlayer)
    
    end
    
    
    
    
    
  -- برمجه للشخصيه 
 thePed = createPed(0,1625.80774, -1509.70374, 13.59852,180)
function cancelPedDamage(player)
    cancelEvent() -- Cancels the onClientPedDamage event
    
end
addEventHandler("onClientPedDamage", thePed, cancelPedDamage) -- When thePed is damaged, cancelPedDamage is called[/lua]

 

--meta.xml

 

[lua]<meta>
<script src="c.lua" type="client" />
<script src="s.lua" type="server" />

</meta>[/lua]
 -- server side ###
  addEvent('Team',true)
addEventHandler('Team',root,
function ()
 setPlayerTeam(source,"Criminal")
 end
 )

ماغيرت شي بس خليت الاعب في تيم معين لما يضغط على بوتون 

وادا في خطا في اللوحة منك انت :)  

في مشكله في سطر رقم 49 ممكن مساعده ؟

في الكلينت سايد

Posted
10 hours ago, Teto said:

في مشكله في سطر رقم 49 ممكن مساعده ؟

في الكلينت سايد

 thePed = createPed(0,1625.80774, -1509.70374, 13.59852,180)
function cancelPedDamage(thePed)
    cancelEvent(thePed,true)
    
end
addEventHandler("onClientPedDamage", thePed, cancelPedDamage)

جرب كدا هادا الكود مب مجرب بس انت جربه

 

Posted
Just now, mahmod3 said:

 thePed = createPed(0,1625.80774, -1509.70374, 13.59852,180)function cancelPedDamage(thePed)    cancelEvent(thePed,true)    
end
addEventHandler("onClientPedDamage", thePed, cancelPedDamage)

جرب كدا هادا الكود مب مجرب بس انت جربه

 

 




Syntax*

bool cancelEvent () --- هنا بس تكنسل ماتحط بداخله شيء ^^


--- ع حسب علمي انك ماتقدر تحطه في الكلنت و تحط داخل القوسين شيء

 

 thePed = createPed(0,1625.80774, -1509.70374, 13.59852,180)
function PedDamage ( attacker )
	cancelEvent() 
end
addEventHandler ( "onClientPedDamage", getRootElement(),PedDamage )


--

جرب كذا

Posted
21 minutes ago, iMr ~ MnHmAr said:

 




Syntax*

bool cancelEvent () --- هنا بس تكنسل ماتحط بداخله شيء ^^


--- ع حسب علمي انك ماتقدر تحطه في الكلنت و تحط داخل القوسين شيء

 


 thePed = createPed(0,1625.80774, -1509.70374, 13.59852,180)
function PedDamage ( attacker )
	cancelEvent() 
end
addEventHandler ( "onClientPedDamage", getRootElement(),PedDamage )


--

جرب كذا

مشكور ع المعلومة الجديده     :)

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