Jump to content

PaiN^

Members
  • Posts

    2,258
  • Joined

  • Last visited

Everything posted by PaiN^

  1. You're welcome
  2. You want this marker to give a truck and a trucker job to how ever touches it ?
  3. if ( btn1 ) is inside the window, Then there's no need to set it visibility . It'll change with the windows visibility ^^ + --> server function setTT () setElementPosition(source, 375.8310546875, -65.7509765625, 1001.507812) setCameraTarget(source, source) end addEvent("setT", true) addEventHandler("setT", getRootElement(), setTT)
  4. هو يبغى في الكود لو مات اللاعب يرجع لنفس السباون -_-"كودك بس لو ضغط الصورة ولو مات مدري وين السباون بيكون
  5. إنت إللي عندك أخطاء إللي بكودك ما لها قيمة else لآن الـ أما إللي بكودي إذا إنقتل بسلاح يعني هو بالحرب, فيروح لسباون الحرب أما إذا إنقتل بأي شي ثاني فراح يكون بالهجولة, فيروح لسباون الهجولة
  6. أعتقد يسير كذا --> server addEvent("spawn1",true) addEventHandler("spawn1", root, function spawn1 () spawnPlayer(source,x ,y ,z) end ) addEvent("spawn2",true) addEventHandler("spawn2", root, function spawn2 () spawnPlayer(source,x ,y ,z) end ) addEventHandler("onPlayerWasted", root, function (attacker,weapon) if (getElementType(attacker) == "player") then if (getElementType(weapon) == "weapon") then spawnPlayer(source, x, y, z) -- هنا بدل بإحداثيات الحرب else spawnPlayer(source, x, y, z) -- هنا بدل بإحداثيات الهجولة end end end ) --> client key = "حط الزر" GUIEditor_Window = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(1,0,798,599,"ختيار قيم مود",false) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Image[1] = guiCreateStaticImage(12,43,361,489,"images/mtalogo.png",false,GUIEditor_Window[1]) GUIEditor_Image[2] = guiCreateStaticImage(379,48,406,490,"images/shruk.png",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(518,31,205,30,"هجولة",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Label[2] = guiCreateLabel(151,21,193,34,"حرب",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Label[3] = guiCreateLabel(16,548,244,50,"by yaZan",false,GUIEditor_Window[1]) function openWin () if guiGetVisible (GUIEditor_Window[1]) then guiSetVisible (GUIEditor_Window[1], false) showCursor(false) else guiSetVisible (GUIEditor_Window[1], true) showCursor(true) end end bindKey(key, "down", openWin) addEventHandler("onClientPlayerJoin", root, function () guiSetVisible ( GUIEditor_Window[1] ,true) showCursor (true) end ) addEventHandler("onClientGUIClick",root, function () if source == GUIEditor_Image[1] then triggerServerEvent("spawn1",getLocalPlayer()) guiSetVisible ( GUIEditor_Window[1] ,false) showCursor (false) elseif source == GUIEditor_Image[2] then triggerServerEvent("spawn2",getLocalPlayer()) guiSetVisible ( GUIEditor_Window[1] ,false) showCursor (false) end end ) جربه وقولي
  7. يجرب على كود خربان أصلا
  8. وش فايدته هذا أعرف وش يسوي بس أقصد ماله داعي بالكود ذذ
  9. عندك إند ناقص + فنكشن ماله لزمة guiSetPutEnabled + مسوي فنكشنين زي بعض بالضبط في السيرفر بس الإسمـ يختلف + أنا تعديلي أصلا فيه أغلاط ذذ
  10. إذا كان قصدك أول ما اللاعب يخش تطلعله جرب هذا --> server addEvent("spawn1",true) addEventHandler("spawn1",root, function() spawnPlayer(source,x+math.random(-1,1),y+math.random(-1,1),z) end) addEvent("spawn2",true) addEventHandler("spawn2",root, function() spawnPlayer(source,x+math.random(-1,1),y+math.random(-1,1),z) end) --> Client GUIEditor_Window = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(1,0,798,599,"ختيار قيم مود",false) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Image[1] = guiCreateStaticImage(12,43,361,489,"images/mtalogo.png",false,GUIEditor_Window[1]) GUIEditor_Image[2] = guiCreateStaticImage(379,48,406,490,"images/shruk.png",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(518,31,205,30,"هجولة",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Label[2] = guiCreateLabel(151,21,193,34,"حرب",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Label[3] = guiCreateLabel(16,548,244,50,"by yaZan",false,GUIEditor_Window[1]) addEventHandler("onClientPlayerJoin", root, function () guiSetVisible ( GUIEditor_Window[1] ,true) showCursor (true) end ) function ButtonCLick() if source == GUIEditor_Image[1] then triggerServerEvent("spawn1",getLocalPlayer()) guiSetVisible ( GUIEditor_Window[1] ,false) showCursor (false) elseif source == GUIEditor_Image[2] then triggerServerEvent("spawn2",getLocalPlayer()) guiSetVisible ( GUIEditor_Window[1] ,false) showCursor (false) end end addEventHandler("onClientGUIClick",root,ButtonCLick,false)
  11. بالنسبة للطلب الأول فأعتقد كودي يسويها أما الثاني فما أعرفله لاكن أسهلك لو تسوي 3 لوح كل وحدة فيها مطارين وتحط كل وحدة في مطار
  12. !! يب فيه
  13. جرب حقي فيه إغلاق ^-^
  14. *أكواد برستيج بعد النعديل --> Server addEvent("onClick[1]",true) addEventHandler("onClick[1]",root, function () local Money = getPlayerMoney(source) if ( Money >= 100) then takePlayerMoney(source,100) spawnPlayer (source,x,y,z) outputChatBox("القد وصلت بـ سلام ",source, 0, 255, 0, true) else outputChatBox("ليس لديك مال كافي لـ السفر",source, 255, 0, 0, true) end end ) addEvent("onClick[2]",true) addEventHandler("onClick[2]",root, function () local Money = getPlayerMoney(source) if ( Money >= 100) then takePlayerMoney(source,100) spawnPlayer (source,x,y,z) outputChatBox("القد وصلت بـ سلام ",source, 0, 255, 0, true) else outputChatBox("ليس لديك مال كافي لـ السفر",source, 255, 0, 0, true) end end ) addEvent("onClick[3]",true) addEventHandler("onClick[3]",root, function () local Money = getPlayerMoney(source) if ( Money >= 100) then takePlayerMoney(source,100) spawnPlayer (source,x,y,z) outputChatBox("القد وصلت بـ سلام ",source, 0, 255, 0, true) else outputChatBox("ليس لديك مال كافي لـ السفر",source, 255, 0, 0, true) end end ) --> Client GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} KSA11 = guiCreateWindow(441,226,543,443," ( خدمة الطيران )",false) guiSetAlpha(KSA11,1) GUIEditor_Button[1] = guiCreateButton(112,61,314,71,"سوفا تاخذك لـ المطار 1",false,KSA11) GUIEditor_Button[2] = guiCreateButton(111,307,314,71,"سوفا تاخذك لـ المطار 3",false,KSA11) GUIEditor_Button[3] = guiCreateButton(112,180,314,71,"سوفا تاخذك لـ المطار 2",false,KSA11) GUIEditor_Memo[1] = guiCreateMemo(53,392,457,42,"كل رحله سوفا تكلفك 500 رياـل ..! ",false,KSA11) GUIEditor_Button[4] = guiCreateButton(10,30,46,39,"اغلاق",false,KSA11) GUIEditor_Label[1] = guiCreateLabel(213,142,87,27,"رحله سعيده \"{SMILIES_PATH}/icon_smile.gif\" alt=\"\" title=\"Smile\" />",false,KSA11) guiLabelSetColor(GUIEditor_Label[1],255,0,255) GUIEditor_Label[2] = guiCreateLabel(215,268,87,27,"رحله سعيده \"{SMILIES_PATH}/icon_smile.gif\" alt=\"\" title=\"Smile\" />",false,KSA11) guiLabelSetColor(GUIEditor_Label[2],255,255,0) GUIEditor_Label[3] = guiCreateLabel(213,35,87,27,"رحله سعيده \"{SMILIES_PATH}/icon_smile.gif\" alt=\"\" title=\"Smile\" />",false,KSA11) guiLabelSetColor(GUIEditor_Label[3],0,255,0) marker = createMarker(x, y, z, "cylinder") addEventHandler("onClientMarkerHit", marker, function (player) if (getElementType(player) == "player") and (player == localPlayer) then guiSetVisible(KSA11, true) showCursor(player, true) end end ) addEventHandler("onClientGUIClick",root, function () if ( source == GUIEditor_Button[1] ) then triggerServerEvent("onClick[1]",localPlayer) guiSetVisible( KSA11, false ) showCursor( source, false ) elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent("onClick[2]",localPlayer) guiSetVisible( KSA11, false ) showCursor( source, false ) elseif ( source == GUIEditor_Button[3] ) then triggerServerEvent("onClick[3]",localPlayer) guiSetVisible( KSA11, false ) showCursor( source, false ) elseif ( source == GUIEditor_Button[4] ) then guiSetVisible( KSA11, false ) showCursor( source, false ) end end ) +
  15. !!ما فهمتكـ ؟؟
  16. =) وإطرحها هنا وبنعدلها لك إن شاء الله GUIEditorسوي اللوحة بالـ
  17. يا ضاوي guiLabelSetColor -_-"يلون اللييل مو الأزرار الصح guiSetProperty( الزر, "NormalTextColor", "FF00FF00" )
  18. createMarker -- function guiSetVisible -- function isElementWithinMarker -- function "onMarkerHit" -- event "onMarkerLeave" -- event
  19. triggerClientEvent triggerServerEvent ^-^
  20. LoooooL -- Server function openDoor(door, position) local vehicle = getPedOccupiedVehicle(source) local Type = getElementModel( vehicle ) local ID = 411 if ( Type == ID ) then outputChatBox( "It's a BUS !", source, 255, 0, 0, true ) else if getPedOccupiedVehicleSeat(source) == 0 then if door == 0 then if position==0 then setVehicleDoorOpenRatio(vehicle, 0, 0, 0.5) end if position==100 then setVehicleDoorOpenRatio(vehicle, 0, 1, 0.5) end if position>0 and position<100 then setVehicleDoorOpenRatio(vehicle, 0, position/100, 0.5) end end if door == 1 then if position==0 then setVehicleDoorOpenRatio(vehicle, 1, 0, 0.5) end if position==100 then setVehicleDoorOpenRatio(vehicle, 1, 1, 0.5) end if position>0 and position<100 then setVehicleDoorOpenRatio(vehicle, 1, position/100, 0.5) end end end end end addEvent(":~", true) addEventHandler(":~", getRootElement(), openDoor) function enableVehicleControl() if isPedInVehicle( localPlayer ) then if guiGetVisible(GUIEditor_Window[1]) == false then guiSetVisible(GUIEditor_Window[1], true) showCursor(true) else guiSetVisible(GUIEditor_Window[1], false) showCursor(false) end end end addCommandHandler("cveh", enableVehicleControl) function closeButton() guiSetVisible(GUIEditor_Window[1], false) showCursor(false) end addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], closeButton, false ) function updateRatio(Scrolled) local position = guiScrollBarGetScrollPosition(Scrolled) local door = getElementData(Scrolled, "Type") triggerServerEvent(":~", getLocalPlayer(), door, position) end addEventHandler("onClientGUIScroll", getRootElement(), updateRatio) Will fix it there as well =) + Thank you Prestege
  21. @ Mr.Pres[T]ege Yes car + He already made a topic about it and i answered him viewtopic.php Same idea, Only different vehicle =)
  22. I didn't understand
  23. -- Server function openDoor(door, position) local vehicle = getPedOccupiedVehicle(source) local Type = getElementModel( vehicle ) local ID = 411 if ( Type == ID ) then outputChatBox( "It's a BUS !", source, 255, 0, 0, true ) else if getPedOccupiedVehicleSeat(source) == 0 then if door == 0 then if position==0 then setVehicleDoorOpenRatio(vehicle, 0, 0, 0.5) end if position==100 then setVehicleDoorOpenRatio(vehicle, 0, 1, 0.5) end if position>0 and position<100 then setVehicleDoorOpenRatio(vehicle, 0, position/100, 0.5) end end if door == 1 then if position==0 then setVehicleDoorOpenRatio(vehicle, 1, 0, 0.5) end if position==100 then setVehicleDoorOpenRatio(vehicle, 1, 1, 0.5) end if position>0 and position<100 then setVehicleDoorOpenRatio(vehicle, 1, position/100, 0.5) end end end end end addEvent(":~", true) addEventHandler(":~", getRootElement(), openDoor) function enableVehicleControl() if isPedInVehicle( localPlayer ) then if guiGetVisible(GUIEditor_Window[1]) == false then guiSetVisible(GUIEditor_Window[1], true) showCursor(true) else guiSetVisible(GUIEditor_Window[1], false) showCursor(false) end end end addCommandHandler("cveh", enableVehicleControl) function closeButton() guiSetVisible(GUIEditor_Window[1], false) showCursor(false) end addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], closeButton, false ) function updateRatio(Scrolled) local position = guiScrollBarGetScrollPosition(Scrolled) local door = getElementData(Scrolled, "Type") triggerServerEvent(":~", getLocalPlayer(), door, position) end addEventHandler("onClientGUIScroll", getRootElement(), updateRatio)
×
×
  • Create New...