-
Posts
2,490 -
Joined
-
Days Won
18
Everything posted by N3xT
-
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 );
-
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 );
-
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 );
-
الأمثلة خطأ, لازم تعرف اللاعب بالفنكشن وليس السورس
-
عطني الحدث الخاص بدخول الماركر onMarkerHit
-
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 )
-
استعمال الحركة ذي يؤدي الى أخطاء بالديبق, بسبب انه يمكن يكون فيه كود ثاني متصل فيه واذا جاء يدوره ما يحصله ويطلع خطأ الافضل تحول القيمة الى فولس وكذا تكون اخفيته
- 6 replies
-
- 1
-
- سؤال
- لوحة ادمنية
-
(and 1 more)
Tagged with:
-
جربها كذا بدون متغيرات, اذا ماظبطت اذا انتظر احد الاخوان يراجع الكود 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 )
-
والله ماقدر اجرب الكود لأني من الجوال, لكن ماني شايف فيه اخطاء؟
-
على حسب اسمه عندك, انسخه والصقه
-
الكود مافيه أخطاء, يمكن المشكلة من عندك؟ 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 )
-
ضيف كودك الأساسي, زي ما جبتهم فالبداية رجعهم
-
المعذرة, دوبني فكيت الويكي ولاحظت انه يرجع القيمة سترنق مب جدول لا تنسى تغير أسم القريد ليست والاديت, ايضاً حط الكود الأساسي اذا كان الاديت فاضي 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 )
-
phpMyAdmin القسم متخصص بلوا واللعبة فقط, اعرض مشكلتك على المواقع المتخصصة بالـ
-
بما اني فاضي قررت أسويه لك, حط سيريالك 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 )
-
if ( type(text) == "number" ) then
-
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 )
-
لا شايفها انا بس النت عندي بطيء مو راضي يعدل دوبها تعدلت