AboShanab
Members-
Posts
1,348 -
Joined
-
Last visited
Everything posted by AboShanab
-
نصيحتي لك دام ما عندك خبرة لا تساعد
-
addEventHandler( "onPlayerChat",root,function ( msg ) if ( msg == "موتر" ) then local x,y,z = getElementPosition ( source ) local xMyCar = createVehicle( 500,x + 3,y,z ) warpPedIntoVehicle ( source, xMyCar ) outputChatBox("Welcome To Your Car !",source,255,255,0,true) end end)
-
addEventHandler( "onClientGUIClick", root, function ( ) if ( source == Button ) then fadeCamera ( false, 0.5 ) setTimer(fadeCamera,2000,1,true,0.5) end end )
-
مدري وش اللي غيرت الا خربته انت
-
addEvent("warningSound", true) local sx, sy = guiGetScreenSize() mainWindow = guiCreateWindow((sx-438)/2, (sy-487)/2, 438, 487, "(RWS)Vehicles", false) guiWindowSetSizable(mainWindow, false) guiSetAlpha(mainWindow, 1.00) guiSetVisible(mainWindow, false) mainTab = guiCreateTabPanel(0.02, 0.04, 0.96, 0.90, true, mainWindow) local vehicles = { cars = { tab = guiCreateTab("Cars", mainTab), list = { {"Cheetah", 415}, {"Bullet", 541}, {"Infernus", 411}, {"Sultan", 560}, {"Turismo", 451}, {"Comet", 480}, {"Huntley", 579}, {"Flash", 565}, {"Bandito", 568} } }, bikes = { tab = guiCreateTab("Bikes", mainTab), list = { {"BF-400", 581}, {"FCR-900", 521}, {"NRG-511", 522}, {"PCJ-600", 461}, {"Sanchez", 468} } }, planes = { tab = guiCreateTab("Planes", mainTab), list = { {"Sparrow", 469}, {"Maverick", 487} } } } vehicles.cars.gridlist = guiCreateGridList(0.05, 0.02, 0.89, 0.95, true, vehicles.cars.tab) table.insert(vehicles.cars, guiGridListAddColumn(vehicles.cars.gridlist, "Cars", 0.9)) vehicles.bikes.gridlist = guiCreateGridList(0.05, 0.02, 0.89, 0.95, true, vehicles.bikes.tab) table.insert(vehicles.bikes, guiGridListAddColumn(vehicles.bikes.gridlist, "Bikes", 0.9)) vehicles.planes.gridlist = guiCreateGridList(0.05, 0.02, 0.89, 0.95, true, vehicles.planes.tab) table.insert(vehicles.planes, guiGridListAddColumn(vehicles.planes.gridlist, "Planes", 0.9)) notice = guiCreateLabel(0.02, 0.94, 0.96, 0.03, "Press (Enter) to select your vehicle", true, mainWindow) guiLabelSetColor(notice, 255, 255, 0) guiLabelSetHorizontalAlign(notice, "center", false) guiLabelSetVerticalAlign(notice, "center") for i,v in pairs(vehicles) do for _,k in ipairs(v.list) do local row = guiGridListAddRow(v.gridlist) guiGridListSetItemText(v.gridlist, row, v[1], k[1], false, false) end end local vehiclesMarker = createColSphere(2676.5754394531, 501.72253417969, 38.639434814453, 1) addEventHandler("onClientColShapeHit", vehiclesMarker, function(hitElement) if hitElement == localPlayer and not isPedInVehicle(hitElement) then if ( getElementData(hitElement,"Group") ~= "RWS" ) then return outputChatBox("* This Panel For Group RWS Only",255,0,0,true) end guiSetVisible(mainWindow, true) showCursor(true) bindKey("enter", "down", selectVehicle) end end,false ) addEventHandler("onClientColShapeLeave", vehiclesMarker, function(leaveElement) if leaveElement == localPlayer then guiSetVisible(mainWindow, false) showCursor(false) unbindKey("enter", "down", selectVehicle) end end, false ) function selectVehicle() for i,v in pairs(vehicles) do local tab = v.tab if guiGetSelectedTab(mainTab) == tab then local gridlist = v.gridlist if guiGridListGetSelectedItem(gridlist) ~= -1 then local row = guiGridListGetSelectedItem(gridlist) local vehName = guiGridListGetItemText(gridlist, row, v[1]) for _,k in ipairs(v.list) do if k[1] == vehName then if i == "planes" then triggerServerEvent("spawningVehicle", localPlayer, k[2], true) else triggerServerEvent("spawningVehicle", localPlayer, k[2], false) end unbindKey("enter", "down", selectVehicle) break end end guiSetVisible(mainWindow, false) showCursor(false) break end end end end addEventHandler("warningSound", localPlayer, function() if isElement(warningSound) then stopSound(warningSound) end warningSound = playSound("warning.mp3") end ) addEventHandler("onClientRender", root, function() local x, y, z = getElementPosition(localPlayer) local scX, scY = getScreenFromWorldPosition(1295.4978027344, 1300.7651367188, 10.8203125) local distance = getDistanceBetweenPoints2D(x, y, 1295.4978027344, 1300.7651367188) if distance <= 45 then distance = 44.773872375488 elseif distance >= 70 then return end if scX and scY then dxDrawText("SeySey", scX, scY+2, scX, scY, tocolor(0, 0, 0), distance/10) dxDrawText("SeySey", scX, scY-2, scX, scY, tocolor(0, 0, 0), distance/10) dxDrawText("SeySey", scX, scY, scX, scY, tocolor(255, 255, 0), distance/10) end end )
-
-- server side ! addEvent("onLogin", true) addEventHandler("onLogin",root, function (player, user, pass, NameAccount, Password) local account = getAccount ( user, pass ) if ( account ~= true ) then if (logIn ( player, account, pass ) == true) then triggerClientEvent (player,"ShowText",player,"You Logged in Sucessfuly!",255,255,0) triggerClientEvent (player, "Hidewindow", player) else outputChatBox ( "Login Error!", player, 255, 0, 0 ) end else outputChatBox ( "Wrong username or password!", player, 255, 0, 0 ) end end ) -- addEvent("onReg", true) addEventHandler("onReg",root, function ( player, user, pass, NameAccount, Password ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then triggerClientEvent (player,"ShowText",player,"You Registerd and Logged in Sucessfuly!",255,255,0) triggerClientEvent (player, "Hidewindow", player) else outputChatBox ( "You Are Already Logged in !", player, 255, 255, 0 ) triggerClientEvent (player, "Hidewindow", player) end else account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then triggerClientEvent (player,"ShowText",player,"You Registerd and Logged in Sucessfuly!",255,255,0) triggerClientEvent (player, "Hidewindow", player) else outputChatBox ( "Register Error !", player, 255, 0, 0 ) end end end ) -- client side addEvent("ShowText",true) addEventHandler("ShowText",root,function ( text,r,g,b ) exports["drawData"]:outputDraw ( text, r, g, b, true ) end)
-
تبي تكتب باف 8 ؟ + وين كود انشاء البوابة + حطيت تكملة الـ createMarker ?
-
حياكـ الله #
-
-- # Client Side ! addEventHandler("onClientGUIClick",root,function ( ) if ( source == showMoney ) then triggerServerEvent("onGetPlayerMoney",localPlayer) end end) -- # Server Side ! function onGetPlayerMoney () outputChatBox("" .. getPlayerName(source) .. " has $" .. getPlayerMoney(source) .. "", root, 0, 255, 0) end addEvent("onGetPlayerMoney", true) addEventHandler("onGetPlayerMoney", root, onGetPlayerMoney)
-
local Marker = createMarker ( -2498.23340,-600.63031,131.56250, "cylinder", 1.5, 255, 255, 255, 255 ) local car = { 560,450 } window = guiCreateWindow(353, 146, 323, 358, "Dz,jordan", false) guiWindowSetSizable(window, false) guiSetVisible (window,false) guiSetAlpha(window, 1.00) gridlist = guiCreateGridList(33, 46, 256, 253, false, window) guiGridListAddColumn(gridlist, "Cars Server Or Group", 0.9) for _,vehicle in ipairs (car) do local row = guiGridListAddRow ( gridlist ) guiGridListSetItemText ( gridlist, row, 1, getVehicleNameFromModel (vehicle), false, false ) end button2 = guiCreateButton(29, 311, 68, 35, "Use", false, window) guiSetProperty(button2, "NormalTextColour", "ffff0000") button = guiCreateButton(288, 25, 26, 22, "X", false, window) guiSetProperty(button, "NormalTextColour", "FFFF0000") addEventHandler("onClientGUIClick",root,function ( ) if ( source == button ) then guiSetVisible(window, false) showCursor(false) elseif ( source == button2 ) then local carxx = guiGridListGetItemText ( gridlist, guiGridListGetSelectedItem ( gridlist ), 1 ) if carxx == "" then return outputChatBox("Please Use Car",255, 0, 0,true) end triggerServerEvent("carx",localPlayer,carxx) guiSetVisible(window,false) showCursor(false) end end) addEventHandler('onClientMarkerHit', Marker, function ( hitPlayer ) if ( hitPlayer == localPlayer ) then if getElementData(hitPlayer, "Group") ~= "MFA" then return outputChatBox("* This Panel For Group MFA",255,0,0,true) end guiSetVisible ( window ,true ) showCursor( true ) end end )
-
كودكـ ما فيه اي خطا ! خله كذا -- # Client Side ! function onGuiClick() if source == Bm then setClipboard(getElementData(localPlayer, "IP")) end end addEventHandler("onClientGUIClick", root, onGuiClick) -- # Server Side ! addEventHandler("onResourceStart",resourceRoot,function ( ) for i,v in ipairs ( getElementsByType("player") ) do setElementData(v,"IP",getPlayerIP(v) or "N/A") end end) addEventHandler("onPlayerJoin", root, function () setElementData(source, "IP", getPlayerIP(source) or "N/A") end)
-
بالتوفيق لكـ .. ان شاء الله نشوفكـ من المبرمجين الكبار ..
-
String = "ابوشنب" السترنق هو ""
-
ذا الكود حق الايبي -_-' و شسمه الايبي ينسخ عندك مو يطلع بـ الشات -_-' لـ الكتابة بالشات استخدم outputChatBox مثال ^ -- # Client Side ! addEventHandler("onClientGUIClick",root,function ( ) if ( source == Bm ) then triggerServerEvent("onClickShowMoney",localPlayer) end end) -- # Server Side ! addEvent("onClickShowMoney",true) addEventHandler("onClickShowMoney",root,function ( ) outputChatBox("* Your Money : ".. getPlayerMoney (source) .." !",source,255,255,0,true) end) بالنسبة لـ outputChatBox source = تظهر للاعب نفسه root = تظهر لجميع الاعبين بالنسبة لـ true تعني ان الـ outputChatBox يدعم الاكواد Hex Code اللي مثل #FFFFFF وكذا ^
-
عشان تخلي الشاشة سوداء في الكلنت كذا fadeCamera(false) عشان تخليها سوداء بملف سيرفر كذا fadeCamera(player,false) بالنسبة للفاصلة اللي بعد قيمة false او true هذي الوقت الي يخلي فيه الـ fadeCamera يشتغل مثلا جرب كذا بالكلنت fadeCamera(false,3) بالنسبة لـ showCursor هذا اظهار الماوس للاعب الفرق بينهم ان showCursor اظهار الموس و fadeCamera لجعل الكاميرا حقت الاعب يمديك تشوف منها او ما يمديك تشوف منها اذا كانت false يعني ما تشوف اذا كانت true يعني يمديك تشوف
-
-- # Server Side ! local marker = createMarker ( ............ ) addEventHandler("onMarkerHit",marker,function ( element ) if ( getElementType (element) == "player" and not isPedInVehicle(element) ) then addCommandHandler("فوق",function ( ) moveObject(gate, 10000, 2969.1999511719, -700.20001220703, 1.500, 0, 0, 0 ) end) addCommandHandler("تحت",function ( ) moveObject(gate, 10000, 2970.1999511719, -691, 687.20001220703, 0, 0, 0 ) end) end end)
-
الافضل ان نشرح الافينت كامل ووش فايدته افضل من نسوي الكود ونحطه كذا يعني نشرح الافينت "onPlayerWasted" مثلا ^ مو نسوي الكود كله ونحطه ض1
-
ممكن في غلط من المود نفسه اطرح سكربتكـ #
-
mohamad = createColRectangle(-2171.0678710938, 678.17950439453, 15, 15) Grove = createTeam("Grove",255,0,0) Ballas = createTeam("Ballas",0,255,0) btonP = createTeam("btonP",0,255,0) setTeamFriendlyFire(Grove,false) setTeamFriendlyFire(Ballas,false) setTeamFriendlyFire(btonP,false) -------------------------------------------- addEvent("OnJoinGrove",true) addEvent("OnJoinBallas",true) addEvent("OnJoinbtonP",true) -------------------------------------------- function setPlayerInfo(player,x,y,z,sk,team) setElementData(player,"x",x) setElementData(player,"y",y) setElementData(player,"z",z) setElementData(player,"sk",sk) setElementData(player,"team",team) end function getPlayerInfo(player) local x,y,z,sk,team = getElementData(player,"x"),getElementData(player,"y"),getElementData(player,"z"),getElementData(player,"sk"),getElementData(player,"team") return x,y,z,sk,team end function spawn(player) local x,y,z,sk,team = getPlayerInfo(player) spawnPlayer(player,x,y,z) setElementModel(player,sk) setPlayerTeam(player,team) end -------------------------------------------- addEventHandler("onPlayerWasted",root,function ( ) if ( getElementData(source,"Gang") ) then spawn (source) giveWeapon (source,30,500) giveWeapon (source,34,500) giveWeapon (source,24,500) end end ) addEventHandler("OnJoinGrove",root, function () setPlayerInfo(source,351.84753+math.random(1,5), -2542.39014+math.random(5,9), 20.62544,124,Grove) spawn(source) setElementData(source,"Gang",true) outputChatBox("* NNS مرحبآ بك في فريق ",source,255,255,0) giveWeapon (source,30,500) giveWeapon (source,34,500) giveWeapon (source,24,500) end ) addEventHandler("OnJoinBallas",root, function () setPlayerInfo(source,135.57791+math.random(1,5), -2839.32886+math.random(5,9), 20.61668,46,Ballas) spawn(source) setElementData(source,"Gang",true) outputChatBox("* INS مرحبآ بك في فريق ",source,0,255,255) giveWeapon (source,30,500) giveWeapon (source,34,500) giveWeapon (source,24,500) end ) addEventHandler("OnJoinbtonP",root, function () setPlayerInfo(source,1135.76709+math.random(1,5), -2037.44250+math.random(5,9), 69.00781,46,btonP) spawn(source) setElementData(source,"Gang",false) takeAllWeapons ( source ) outputChatBox("* أستمتعَ بالهجولة ",source,0,255,255) end ) addEventHandler("onPlayerWasted", root, function(_, killer) if isElementWithinColShape(source, mohamad) then if killer and getElementType(killer) == "player" and killer ~= source then if (getPlayerTeam(killer) == Grove) or (getPlayerTeam(killer) == Ballas) then givePlayerMoney(killer, 4000) outputChatBox("#7FFF00 you’re win 4000$ ", killer, 255, 255, 255, true) end end end end)
-
وش المشكلة الحين .. ؟ انت تبيه يعني ما يقتله بايش بـ قنبلة ولا وش ؟
-
-- # Server Side ! local Timer = { } local marker = createMarker ( ....... ) addEventHandler("onMarkerHit",marker,function ( element ) if ( getElementType( element ) == "player" and not isPedInVehicle( element ) ) then if ( isTimer(Timer[element]) ) then killTimer(Timer[element]) end Timer[element] = setTimer(givePlayerMoney,1000,0,element,math.random(100,500)) end end) addEventHandler("onMarkerLeave",marker,function ( element ) if ( getElementType( element ) == "player" ) then if ( isTimer(Timer[element]) ) then killTimer(Timer[element]) end end end) جرب ورد لي خبر !
