Teto Posted September 25, 2016 Share Posted September 25, 2016 (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 September 25, 2016 by Teto Link to comment
Abdul KariM Posted September 25, 2016 Share Posted September 25, 2016 setPlayerTeam -- Server Side player = nil Link to comment
mahmod3 Posted September 25, 2016 Share Posted September 25, 2016 (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 September 25, 2016 by mahmod3 Link to comment
Teto Posted September 25, 2016 Author Share Posted September 25, 2016 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 ممكن مساعده ؟ في الكلينت سايد Link to comment
Ahmed Ly Posted September 25, 2016 Share Posted September 25, 2016 addEvent('Team',true) addEventHandler('Team',root, function () setPlayerTeam(source,getTeamFromName("Criminal")) end ) Link to comment
mahmod3 Posted September 26, 2016 Share Posted September 26, 2016 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) جرب كدا هادا الكود مب مجرب بس انت جربه Link to comment
!#NssoR_) Posted September 26, 2016 Share Posted September 26, 2016 addEventHandler("onClientPedDamage", thePed ,cancelEvent()) Link to comment
iMr ~ MnHmAr Posted September 26, 2016 Share Posted September 26, 2016 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 ) -- جرب كذا Link to comment
mahmod3 Posted September 26, 2016 Share Posted September 26, 2016 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 ) -- جرب كذا مشكور ع المعلومة الجديده Link to comment
iPrestege Posted September 26, 2016 Share Posted September 26, 2016 كود نصور الصحيح كذا اي بيد بيصير له كنسل ايفنت بالرووت 1 Link to comment
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