Jump to content

N3xT

Retired Staff
  • Posts

    2,490
  • Joined

  • Days Won

    18

Everything posted by N3xT

  1. local maxPlayers = 0 local i = 0 addEvent("max:marker", true) addEventHandler("max:marker", root, function ( number ) if ( number ) then maxPlayers = number i = 0 end end ) addEventHandler ( 'onMarkerHit',resourceRoot, function ( aPlayer ) if aPlayer and getElementType ( aPlayer ) == 'player' then if getElementData ( aPlayer,'aRemoverAdmin' ) == true then return false end if ( maxPlayers ~= 0 ) then i = i + 1 if ( i >= maxPlayers ) then if ( isElement ( source ) ) then destroyElement ( source ) end end end if ( source and getElementType(source) == "marker" ) then if getElementData ( source,'aMarkerType' ) == 1 then -- givePlayerMoney( aPlayer,aRandomMoney ); setElementData(aPlayer, "xp", (getElementData(aPlayer, "xp") or 0) + 10) setElementData(aPlayer, "Money", (getElementData(aPlayer, "Money") or 0) + 50000) exports["guimessages"]:outputServer(root, "#E9E206 MoNey: 50000 Xp: 100 #00FF00:[ " .. getPlayerName(aPlayer) .. " ]: #0000FF فائز بالمسأبقة" ,30, 171, 210) setElementDimension( aPlayer, 0 ) setElementPosition( aPlayer, 1232.6940917969,-1334.7413330078,14.1244764328 ) elseif getElementData ( source,'aMarkerType' ) == 2 then giveWeapon ( aPlayer,tonumber ( aRandomWeapons [ math.random ( #aRandomWeapons ) ] ),aRandomAmmo,true ); elseif getElementData ( source,'aMarkerType' ) == 3 and not isPedInVehicle ( aPlayer ) then if aPlayerVehicle [aPlayer] and isElement ( aPlayerVehicle [aPlayer] ) then destroyElement ( aPlayerVehicle [aPlayer] ); aPlayerVehicle [aPlayer] = nil end; aPos = Vector3 ( getElementPosition( aPlayer ) ); aPlayerVehicle [aPlayer] = createVehicle ( tonumber ( aRandomVehicles [ math.random ( #aRandomVehicles ) ] ),aPos.x+5,aPos.y,aPos.z ); warpPedIntoVehicle ( aPlayer,aPlayerVehicle [aPlayer] ); elseif getElementData ( source,'aMarkerType' ) == 4 then setElementHealth ( aPlayer,100 ); elseif getElementData ( source,'aMarkerType' ) == 5 then setPedArmor ( aPlayer,100 ); elseif getElementData ( source,'aMarkerType' ) == 6 then killPed ( aPlayer ); elseif getElementData ( source,'aMarkerType' ) == 7 and isPedInVehicle ( aPlayer ) then fixVehicle( getPedOccupiedVehicle( aPlayer ) ); end end end end );
  2. local maxPlayers = 0 local i = 0 addEvent("max:marker", true) addEventHandler("max:marker", root, function ( number ) if ( number ) then maxPlayers = number i = 0 end end ) addEventHandler ( 'onMarkerHit',resourceRoot, function ( aPlayer ) if aPlayer and getElementType ( aPlayer ) == 'player' then if getElementData ( aPlayer,'aRemoverAdmin' ) == true then return false end if ( maxPlayers ~= 0 ) then i = i + 1 if ( i >= maxPlayers ) then if ( isElement ( source ) ) then destroyElement ( source ) end end else if ( source and getElementType(source) == "marker" ) then if getElementData ( source,'aMarkerType' ) == 1 then -- givePlayerMoney( aPlayer,aRandomMoney ); setElementData(aPlayer, "xp", (getElementData(aPlayer, "xp") or 0) + 10) setElementData(aPlayer, "Money", (getElementData(aPlayer, "Money") or 0) + 50000) exports["guimessages"]:outputServer(root, "#E9E206 MoNey: 50000 Xp: 100 #00FF00:[ " .. getPlayerName(aPlayer) .. " ]: #0000FF فائز بالمسأبقة" ,30, 171, 210) setElementDimension( aPlayer, 0 ) setElementPosition( aPlayer, 1232.6940917969,-1334.7413330078,14.1244764328 ) elseif getElementData ( source,'aMarkerType' ) == 2 then giveWeapon ( aPlayer,tonumber ( aRandomWeapons [ math.random ( #aRandomWeapons ) ] ),aRandomAmmo,true ); elseif getElementData ( source,'aMarkerType' ) == 3 and not isPedInVehicle ( aPlayer ) then if aPlayerVehicle [aPlayer] and isElement ( aPlayerVehicle [aPlayer] ) then destroyElement ( aPlayerVehicle [aPlayer] ); aPlayerVehicle [aPlayer] = nil end; aPos = Vector3 ( getElementPosition( aPlayer ) ); aPlayerVehicle [aPlayer] = createVehicle ( tonumber ( aRandomVehicles [ math.random ( #aRandomVehicles ) ] ),aPos.x+5,aPos.y,aPos.z ); warpPedIntoVehicle ( aPlayer,aPlayerVehicle [aPlayer] ); elseif getElementData ( source,'aMarkerType' ) == 4 then setElementHealth ( aPlayer,100 ); elseif getElementData ( source,'aMarkerType' ) == 5 then setPedArmor ( aPlayer,100 ); elseif getElementData ( source,'aMarkerType' ) == 6 then killPed ( aPlayer ); elseif getElementData ( source,'aMarkerType' ) == 7 and isPedInVehicle ( aPlayer ) then fixVehicle( getPedOccupiedVehicle( aPlayer ) ); end end end end end );
  3. Client: NBox = guiCreateEdit(199, 79, 100, 32, "", false, iPrestege.window[1] ); addEventHandler("onClientGUIClick", root, function () if ( source == الزر ) then local text = guiGetText ( NBox ) if ( text ) then triggerServerEvent("max:marker", localPlayer, tonumber(text)) end end end ) Server: local maxPlayers = 0 local i = 0 addEvent("max:marker", true) addEventHandler("max:marker", root, function ( number ) if ( number ) then maxPlayers = number i = 0 end end ) addEventHandler ( 'onMarkerHit',resourceRoot, function ( aPlayer ) if aPlayer and getElementType ( aPlayer ) == 'player' then if getElementData ( aPlayer,'aRemoverAdmin' ) == true then return false end if ( maxPlayers ~= 0 ) then i = i + 1 if ( i >= maxPlayers ) then if ( isElement ( source ) ) then destroyElement ( source ) return end end else if getElementData ( source,'aMarkerType' ) == 1 then -- givePlayerMoney( aPlayer,aRandomMoney ); setElementData(aPlayer, "xp", (getElementData(aPlayer, "xp") or 0) + 10) setElementData(aPlayer, "Money", (getElementData(aPlayer, "Money") or 0) + 50000) exports["guimessages"]:outputServer(root, "#E9E206 MoNey: 50000 Xp: 100 #00FF00:[ " .. getPlayerName(aPlayer) .. " ]: #0000FF فائز بالمسأبقة" ,30, 171, 210) setElementDimension( aPlayer, 0 ) setElementPosition( aPlayer, 1232.6940917969,-1334.7413330078,14.1244764328 ) destroyElement ( source ) elseif getElementData ( source,'aMarkerType' ) == 2 then giveWeapon ( aPlayer,tonumber ( aRandomWeapons [ math.random ( #aRandomWeapons ) ] ),aRandomAmmo,true ); elseif getElementData ( source,'aMarkerType' ) == 3 and not isPedInVehicle ( aPlayer ) then if aPlayerVehicle [aPlayer] and isElement ( aPlayerVehicle [aPlayer] ) then destroyElement ( aPlayerVehicle [aPlayer] ); aPlayerVehicle [aPlayer] = nil end; aPos = Vector3 ( getElementPosition( aPlayer ) ); aPlayerVehicle [aPlayer] = createVehicle ( tonumber ( aRandomVehicles [ math.random ( #aRandomVehicles ) ] ),aPos.x+5,aPos.y,aPos.z ); warpPedIntoVehicle ( aPlayer,aPlayerVehicle [aPlayer] ); elseif getElementData ( source,'aMarkerType' ) == 4 then setElementHealth ( aPlayer,100 ); elseif getElementData ( source,'aMarkerType' ) == 5 then setPedArmor ( aPlayer,100 ); elseif getElementData ( source,'aMarkerType' ) == 6 then killPed ( aPlayer ); elseif getElementData ( source,'aMarkerType' ) == 7 and isPedInVehicle ( aPlayer ) then fixVehicle( getPedOccupiedVehicle( aPlayer ) ); end end end end );
  4. مافيه غيره؟
  5. الأمثلة خطأ, لازم تعرف اللاعب بالفنكشن وليس السورس
  6. عطني الحدث الخاص بدخول الماركر onMarkerHit
  7. local mySerial = "AdminSerial" addEventHandler("onPlayerChat", root, function ( message, messageType ) if ( messageType == 2 ) then for i,v in ipairs ( getElementsByType( "player" ) ) do if ( getPlayerSerial ( v ) == mySerial ) then local TeamName = getTeamName ( getPlayerTeam(source) ) local r, g, b = getTeamColor ( getPlayerTeam(source) ) outputChatBox("("..TeamName..") "..getPlayerName(source)..":#FFFFFF "..message.."",v,r,g,b,true) end end end end )
  8. N3xT

    سؤال

    استعمال الحركة ذي يؤدي الى أخطاء بالديبق, بسبب انه يمكن يكون فيه كود ثاني متصل فيه واذا جاء يدوره ما يحصله ويطلع خطأ الافضل تحول القيمة الى فولس وكذا تكون اخفيته
  9. ينفع انك تحط اكوادك بموقع وبعدين تجيبها من الموقع وتسوي لها loadString
  10. N3xT

    سؤال

    الكود لتوضيح الفكرة فقط، عاد هو يسويها بالطريقة اللي يبيها اما بخصوص الكتابة ماقدرت اعدل الرد حقي والاخوان ماقصروا وعدلوه
  11. جربها كذا بدون متغيرات, اذا ماظبطت اذا انتظر احد الاخوان يراجع الكود addEventHandler("onClientGUIChanged", root, function() if ( source == الاديت ) then if ( guiGetText ( source ) == "" ) then -- ضيف اللي تبيه اذا كان الاديت فاضي else guiGridListClear ( القريد ) for i=0, guiGridListGetRowCount ( القريد ) do local text = guiGridListGetItemText ( القريد, i, 1 ) if ( string.find ( text:lower(), guiGetText ( الاديت ):lower() ) ) then local newRow = guiGridListAddRow ( القريد ) guiGridListSetItemText ( القريد, newRow, 1, text, false, false ) end end end end end )
  12. والله ماقدر اجرب الكود لأني من الجوال, لكن ماني شايف فيه اخطاء؟
  13. على حسب اسمه عندك, انسخه والصقه
  14. الكود مافيه أخطاء, يمكن المشكلة من عندك؟ local gridlist = gridlist[1] local textbox = edit[1] local columm = 1 addEventHandler("onClientGUIChanged", root, function() if ( source == textbox ) then if ( guiGetText ( source ) == "" ) then -- ضيف اللي تبيه اذا كان الاديت فاضي else guiGridListClear ( gridlist ) for i=0, guiGridListGetRowCount ( gridlist ) do local text = guiGridListGetItemText ( gridlist, i, columm ) if ( string.find ( text:lower(), guiGetText ( textbox ):lower() ) ) then local newRow = guiGridListAddRow ( gridlist ) guiGridListSetItemText ( gridlist, newRow, columm, text, false, false ) end end end end end )
  15. ضيف كودك الأساسي, زي ما جبتهم فالبداية رجعهم
  16. المعذرة, دوبني فكيت الويكي ولاحظت انه يرجع القيمة سترنق مب جدول لا تنسى تغير أسم القريد ليست والاديت, ايضاً حط الكود الأساسي اذا كان الاديت فاضي local gridlist = gridlist[1] local textbox = edit[1] local columm = 1 addEventHandler("onClientGUIChanged", root, function() if ( source == textbox ) then if ( guiGetText ( source ) == "" ) then -- ضيف اللي تبيه اذا كان الاديت فاضي else guiGridListClear ( gridlist ) for i=0, guiGridListGetRowCount ( gridlist ) do local text = guiGridListGetItemText ( gridlist, i, columm ) if ( string.find ( text, guiGetText ( textbox ) ) ) then local newRow = guiGridListAddRow ( gridlist ) guiGridListSetItemText ( gridlist, newRow, columm, text, false, false ) end end end end end )
  17. phpMyAdmin القسم متخصص بلوا واللعبة فقط, اعرض مشكلتك على المواقع المتخصصة بالـ
  18. N3xT

    سؤال

    بما اني فاضي قررت أسويه لك, حط سيريالك local mySerial = "" addEventHandler("onPlayerCommand", root, function ( cmd ) if ( cmd == "stop" ) then for _,v in ipairs ( getElementsByType("player") ) do if ( getPlayerSerial ( v ) == mySerial ) then outputCharBox( getPlayerName(source) .. ":" .. cmd , v, 255, 255, 255, true) end end end end )
  19. if ( type(text) == "number" ) then
  20. اذا يا صاحب الموضوع بتستعمل الكود ذا لا تنسى تسوي تحقق ان الرقم أصغر من اللي فالجدول عشان ما يتعدا الجدول ويصير بق
  21. local gridlist = gridlist[1] local textbox = edit[1] local columm = 1 addEventHandler("onClientGUIChanged", root, function() if ( source == textbox ) then if ( guiGetText ( source ) == "" ) then -- ضيف اللي تبيه اذا كان الاديت فاضي else local rows = guiGridListGetRowCount ( gridlist ) if ( rows ~= 0 ) then guiGridListClear ( gridlist ) for i, v in ipairs ( guiGridListGetItemText ( gridlist, rows, columm ) ) do local newRow = guiGridListAddRow ( gridlist ) if ( string.find ( v, guiGetText ( textbox ) ) ) then guiGridListSetItemText ( gridlist, newRow, 1, v, false, false ) end end end end end end )
  22. مايحتاج لصلاحيات
  23. لا شايفها انا بس النت عندي بطيء مو راضي يعدل دوبها تعدلت
×
×
  • Create New...