Jump to content

Tarek1

Members
  • Posts

    95
  • Joined

  • Last visited

Everything posted by Tarek1

  1. addEventHandler("onPlayerDamage",getRootElement(),function() if getElementType() == "ped" then cancelEvent() end ) تمام كدا ؟؟
  2. --Server Side طلب كود للسرفر سايد Ped لل damageلما الاعب يعمل Ped لا يموت --Server side Test = creatPed()
  3. --Server side -- و اذا كان الاعب في عربيه في ديمنشن 1 و خرج من العربيه يكون بنفس الديمنشن function onPlayerExitVehicle ( theVehicle, seat, jacker ) if ( getElementDimension ( source ) == 1 and seat == 1 ) then setElementDimension ( source, 1 ) setElementDimension ( theVehicle, 1 ) end end addEventHandler ( "onPlayerVehicleExit", root, onPlayerExitVehicle ) -- -- اذا كان الاعب في ديمنشن 1 و مات ينزل في نفس الديمنشن addEventHandler( "onPlayerWasted", getRootElement( ),function() if ( getElementDimension ( source ) == 1 then setElementDimension (source,1) end end end ) -- اذا كتب الاعب هذه الكومند يكون في ديمنشن صفر addCommandHandler("leave",function() setElementDimension( source,0) end ) -- اذا كان تيم الشخص ميدك لا يتسطيع ان يقتل الاعبون addEventHandler ( "onPlayerDamage", getRootElement (),function() if ( attacker ) and ( attacker ~= source ) and ( getPlayerTeam(attacker) ) and ( getTeamName(getPlayerTeam(attacker)) == "Medic" ) then cancelEvent() end end ) -- مساعده هل يمكن جعل تيم ال Police لا يتسطيع ان يقتل تيم اخر ؟؟
  4. Search in the script Some thing called " Bomber" > change Nil to false
  5. خلاص صلحتوا كان مشكله تافه
  6. علشان اوضح للي هيساعدني كمان بيجيلي error expecting string at argument 1 local targetPlayer = getPlayerFromNick ( who ) حطيتها ما بين " " نفس المشكله بردوا
  7. /loc playerrname:مثلاcommandفكره عمل الاسكربت : عندما يقوم الاعب بكتابه playername = اسم الاعب الذي يجب الذهاب اليه commandيقوم الاسكربت بعمل سهم فوق الاعب الذي كتب ال والسهم يشير الي اتجاه الاعب اخر ما توصلت اليه ملحوظه : الاكواد من علي wiki --Client Side function locatePlayer( sourcePlayer, command, who ) local targetPlayer = getPlayerFromNick ( who ) if ( targetPlayer ) then local x,y,z = getElementPosition ( sourcePlayer ) local xp,yp,zp = getElementPosition ( targetPlayer ) local dir = nil if (yp > y) then dir = "N" else dir = "S" end if (xp > x) then dir = dir .. "E" else dir = dir .. "W" end local distance = math.ceil ( getDistanceBetweenPoints3D(x, y, z, xp, yp, zp) ) outputChatBox( who .. " found " .. dir .. " (" .. distance .. ")", sourcePlayer) end end addCommandHandler ( "loc", locatePlayer )
  8. السلام عليكم مش شغال output المشكله ان من ايه المشكله ؟
  9. attempt to call global "addEventHandler" line 6 ( nil value ) function marker () marker1 = createMarker(2485.00000, -1667.00000, 12.34375,"cylinder",3,210, 105, 30) end addEventHandler("onClientResourceStart", getRootElement(), marker) addEventhandler("onClientMarkerHit", marker1, 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) guiSetVisible(window,false) showCursor(true) outputChatBox("Welcome Terrorist", 255, 255, 255, true) end end)
  10. لا انا قصدي كدا ال Errorr فقط انا مجربتش الكود
  11. فكره السكربت 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 )
  12. فكره السكربت ان الاعب من تيم ال Terrorists يحصل 1000 $ اذا قتل لاعب function rewardOnWasted ( ammo, killer, killerweapon, bodypart ) --if there is a killer, and that killer is not the same person as whoever died team1 = createTeam("Terroirsts",255,2552,55) if ( killer ~= team1 ) and ( killer ~= source ) then givePlayerMoney ( killer, 1000 ) --reward the killer with 1000 cash. end end addEventHandler ( "onPlayerWasted", getRootElement(), rewardOnWasted )
  13. function Te(player) if ( getElementType (attacker) == "player" ) then if getPlayerTeam(attacker) == "Terrorists" then givePlayerMoney(player,250) end end end
  14. local w = getPedWeapon ( localPlayer ) local d = getElementData ( localPlayer, "URGSQL:WeaponStats" ) if not ( d[allowedWeapons[w]]) then -- الخطا : attempt to index local 'd' (a boolean value)
  15. addEventHandler("onClientMarkerHit",[[markerName]], function() if ( player == localPlayer and not isPedInVehicle ( player ) ) then local team = getTeamFromName ( 'Criminals' ) local pteam = getPlayerTeam ( player ) if ( pteam ~= team ) then return false end guiSetVisible ( [[windowName]] , true ) guiWindowSetSizable([[windowTeam]], true) showCursor ( true ) guiSetInputEnabled ( true ) end end ) Try this
  16. اها امال الويكي معمول ليه علشان نتامله :D?
  17. المطلوب ان فين الخطا
  18. theTeam = "Police" local allTeams = getElementsByType ( "team" ) for index, theTeam in ipairs(allTeams) do if ( getTeamFriendlyFire ( theTeam ) == false ) then setTeamFriendlyFire ( theTeam, true ) end end فكره السكربت : الاعبون اللي في تيم بوليس لا يستطيعوا قتل بعضهم
×
×
  • Create New...