Tarek1 Posted June 1, 2017 Share Posted June 1, 2017 فكره السكربت Terroristsيصبح في تيمacceptبلمس الماركر يظهر له نافذه اذا ضغط عليTerroristsاذا قام الاعب من جروب واذا قام لاعب من تيم Terrorists قتل لاعب اخر يجصل علي 1000 --Client Side marker1 = createMarker(2485.00000, -1667.00000, 12.34375,"cylinder",3,210, 105, 30) addEventHandler("onClientMarkerHit", marker1, function(hitElement) window = guiCreateWindow(467, 213, 475, 179, "Terrorists Job", false) guiWindowSetSizable(window, false) accept = guiCreateButton(9, 126, 139, 43, "Accept", false, window) close1 = guiCreateButton(321, 126, 139, 43, "Close", false, window) guiSetVisible(window,false) outputChatBox("your are not part of this Team") if getTeamName(getPlayerTeam(hitElement)) == "Player" and getElementData(hitElement, "Group") == "Terrorists" then outputChatBox("Welcome Terrorist") guiSetVisible(window,true) showCursor(true) end end ) addEventHandler("onClientGUIClick",guiRoot, function() if ( source == close1 ) then guiSetVisible(window,false) showCursor(false) else if ( source == accept ) then guiSetVisible(window,true) showCursor(false) triggerServerEvent ("getTeam",player) end end end ) --Server Side team1 = createTeam("Terrorist",210, 105, 30) addEvent("getTeam",true) addEventHandler("getTeam",resourceRoot, function() setPlayerTeam(team1) end ) addEventHandler ( "onPlayerWasted", root, function ( _, attacker ) if ( attacker and attacker ~= source and getPlayerTeam(attacker) and getTeamName(getPlayerTeam(attacker)) == "Terrorists" ) then givePlayerMoney(attacker,1000) end end ) Link to comment
iMr.WiFi..! Posted June 1, 2017 Share Posted June 1, 2017 في سطر 31 في الكلاينت عدل player الى localPlayer وسطر 8 الى 12 خرجهم من الحدث 1 Link to comment
Tarek1 Posted June 1, 2017 Author Share Posted June 1, 2017 4 minutes ago, iMr.WiFi..! said: في سطر 31 في الكلاينت عدل player الى localPlayer وسطر 8 الى 12 خرجهم من الحدث 4 minutes ago, iMr.WiFi..! said: في سطر 31 في الكلاينت عدل player الى localPlayer وسطر 8 الى 12 خرجهم من الحدث فقط ؟ Link to comment
iMr.WiFi..! Posted June 1, 2017 Share Posted June 1, 2017 Just now, Tarek1 said: فقط ؟ يعني تبي زيادة ؟؟ Link to comment
Tarek1 Posted June 1, 2017 Author Share Posted June 1, 2017 (edited) Just now, iMr.WiFi..! said: يعني تبي زيادة ؟؟ لا انا قصدي كدا ال Errorr فقط انا مجربتش الكود Edited June 1, 2017 by Tarek1 Link to comment
#F9SoOoL Posted June 1, 2017 Share Posted June 1, 2017 (edited) 53 minutes ago, Tarek1 said: فكره السكربت Terroristsيصبح في تيمacceptبلمس الماركر يظهر له نافذه اذا ضغط عليTerroristsاذا قام الاعب من جروب واذا قام لاعب من تيم Terrorists قتل لاعب اخر يجصل علي 1000 --Client Side marker1 = createMarker(2485.00000, -1667.00000, 12.34375,"cylinder",3,210, 105, 30) addEventHandler("onClientMarkerHit", marker1, function(hitElement) window = guiCreateWindow(467, 213, 475, 179, "Terrorists Job", false) guiWindowSetSizable(window, false) accept = guiCreateButton(9, 126, 139, 43, "Accept", false, window) close1 = guiCreateButton(321, 126, 139, 43, "Close", false, window) guiSetVisible(window,false) outputChatBox("your are not part of this Team") if getTeamName(getPlayerTeam(hitElement)) == "Player" and getElementData(hitElement, "Group") == "Terrorists" then outputChatBox("Welcome Terrorist") guiSetVisible(window,true) showCursor(true) end end ) addEventHandler("onClientGUIClick",guiRoot, function() if ( source == close1 ) then guiSetVisible(window,false) showCursor(false) else if ( source == accept ) then guiSetVisible(window,true) showCursor(false) triggerServerEvent ("getTeam",player) end end end ) --Server Side team1 = createTeam("Terrorist",210, 105, 30) addEvent("getTeam",true) addEventHandler("getTeam",resourceRoot, function() setPlayerTeam(team1) end ) addEventHandler ( "onPlayerWasted", root, function ( _, attacker ) if ( attacker and attacker ~= source and getPlayerTeam(attacker) and getTeamName(getPlayerTeam(attacker)) == "Terrorists" ) then givePlayerMoney(attacker,1000) end end ) -- client side function marker () marker1 = createMarker(2485.00000, -1667.00000, 12.34375,"cylinder",3,210, 105, 30) end addEventHandler("onClientResourceStart", getRootElement(), marker) addEventhandler("onClientMarkerHit", getRootElement(), function (hitElement) if ( source == marker1 ) and ( getElementType(hitElement) == "player" ) and ( getElementData(hitElement, 'Group') == 'Terrorists' ) then window = guiCreateWindow(467, 213, 475, 179, "Terrorists Job", false) guiWindowSetSizable(window, false) accept = guiCreateButton(9, 126, 139, 43, "Accept", false, window) close1 = guiCreateButton(321, 126, 139, 43, "Close", false, window) showCursor(true) outputChatBox("Welcome Terrorist", 255, 255, 255, true) end end) addEventHandler("onClientGUIClick", getRootElement(), function () if ( source == close1 ) then guiSetVisible(window,false) showCursor(false) end end) addEventHandler("onClientGUIClick", getRootElement(), function () if ( source == accept ) then guiSetVisible(window,false) showCursor(false) triggerServerEvent("getteam", getLocalPlayer()) end end) -- server side team1 = createTeam("Terrorist",210, 105, 30) addEvent("getteam",true) addEventHandler("getteam", root, function () setPlayerTeam(source, team1) end) function reward (ammo, attacker, weapon, bodypart) if ( attacker ) and ( attacker ~= source ) and ( getPlayerTeam(attacker) ) and ( getTeamName(getPlayerTeam(attacker)) == "Terrorists" ) then givePlayerMoney(attacker, 1000) end end addEventHandler("onPlayerWasted", getRootElement(), reward) انا عدلتههء لك ع ححسب طلبك ,, اذا طلعت فكرتك فيها خطأ ( وانا أشك صرآحةة ) فـ أنا آخلي مسؤوليتي .. Edited June 1, 2017 by #F9SoOoL 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