
#NaMrOo'D
Members-
Posts
32 -
Joined
-
Last visited
Everything posted by #NaMrOo'D
-
ي شباب بس مساعده بانوو كيف بدي اخلي الاشاره تروح بعد 15 ثانيه مثلا , وحل مشكله اخر سطر يرحم والديكم # Blip = {} addEvent ( 'AttachTheBlip', true ) addEventHandler ( 'AttachTheBlip', root, function ( xPlayer ) if xPlayer then local player = getPlayerFromName ( xPlayer ) if player then if Blip [ player ] and isElement ( Blip [ player ] ) then return end Blip [ player ] = createBlipAttachedTo ( player, 41 ) end end end ) addEventHandler ( 'onPlayerQuit', root, function () if Blip [ source ] and isElement ( Blip [ source ] ) then destoryElement ( Blip [ source ] ) Blip [ source ] = nil end end )
-
علعافيه ي شباب , بتمنى تساعدوني , لمشكله انوو لما احط رقصه ولاعب يضربني تتوقف , ثاني مشكله , انوو لما اضغط على لوحه تووقف , يعني لازم بس على زر close تتووقف , ثالث مشكله حل سطر 34 # وشككرا --- ملف لكلينت --- local resX, resY = guiGetScreenSize() function makeAnimationGUI() animationWindow = guiCreateWindow(200, 90, 337, 369,"Animation System",false) guiSetVisible(animationWindow,false) animationCategoryList = guiCreateGridList(29, 64, 140, 254,false,animationWindow) guiSetAlpha(animationCategoryList, 1.100) animationList = guiCreateGridList(174, 64, 140, 254,false,animationWindow) guiSetAlpha(animationList, 1.100) column1 = guiGridListAddColumn(animationCategoryList,"Category",0.8) guiGridListSetItemColor(column1,5, 249, 255) column2 = guiGridListAddColumn(animationList,"Animation",0.8) stopButton = guiCreateButton(81, 330, 182, 26, "Stop", false, animationWindow) guiSetAlpha(stopButton, 1.100) guiSetVisible (animationWindow,false) guiWindowSetMovable(animationWindow,true) guiWindowSetSizable(animationWindow,false) guiSetVisible(animationWindow,false) showCursor(false) addEventHandler("onClientGUIClick",stopButton,function() setPedAnimation(getLocalPlayer(),nil,nil) end) for k, v in ipairs (getElementsByType("animationCategory")) do local row = guiGridListAddRow(animationCategoryList) guiGridListSetItemText(animationCategoryList,row,column1,getElementID(v),false,false) end addEventHandler("onClientGUIClick",animationCategoryList,getAnimations) addEventHandler("onClientGUIClick",animationList,setAnimation) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),makeAnimationGUI) bindKey('F3','down', function() guiSetVisible(animationWindow, not guiGetVisible(animationWindow)) showCursor(not isCursorShowing()) end ) function getAnimations() selectedCategory = guiGridListGetItemText(animationCategoryList,guiGridListGetSelectedItem(animationCategoryList),1) if (selectedCategory ~= "") then guiGridListClear(animationList) for k, v in ipairs (getElementChildren(getElementByID(selectedCategory))) do local row = guiGridListAddRow(animationList) guiGridListSetItemText(animationList,row,column1,getElementID(v),false,false) end end if (selectedCategory == "") then guiGridListClear(animationList) end end function setAnimation() selectedAnimation = guiGridListGetItemText(animationList,guiGridListGetSelectedItem(animationList),1) if (selectedAnimation ~= "") then if (not isPlayerDead(getLocalPlayer())) then if (isPedInVehicle(getLocalPlayer()) == false) then local animationBlock = getElementData(getElementByID(selectedAnimation),"block") local animationID = getElementData(getElementByID(selectedAnimation),"code") triggerServerEvent("setAnimation",getLocalPlayer(),animationBlock,animationID) else outputChatBox("You cannot use animations while in a vehicle.",255,0,0) end else outputChatBox("You cannot use animations while you are dead.",255,0,0) end end end --- ملف سيرفر --- function setAnimation(animationBlock,animationID) setPedAnimation(source,animationBlock,animationID) end addEvent("setAnimation",true) addEventHandler ("setAnimation",getRootElement(),setAnimation)
-
هاي لوحه اعملتها بس فيها مشكله , + ضفت عليها انوو لاعب يحدد اسم لاعب ويرسلوو فلوس , بس معي تزبط وزر ارسال لفلوس معرف ب button 1 ممككن مساعده ي شباب # ---- Client -------- GUIEditor = { gridlist = {}, window = {} } wnd = guiCreateWindow(396, 168, 537, 470, "", false) guiWindowSetSizable(wnd, false) gridlist = guiCreateGridList(10, 60, 224, 398, false, wnd) guiGridListAddColumn(gridlist, "Player", 0.9) edit = guiCreateEdit(10, 24, 179, 30, "", false, wnd) iamge = guiCreateStaticImage(193, 30, 35, 17, "search.png", false, wnd) button1 = guiCreateButton(240, 60, 140, 43, "Soon..", false, wnd) button = guiCreateButton(390, 60, 137, 43, "Soon..1", false, wnd) guiSetVisible (wnd,false) guiWindowSetMovable(wnd,false) guiWindowSetSizable(wnd,false) guiSetVisible(wnd,false) showCursor(false) addEventHandler("onClientGUIChanged", edit, function () local text = guiGetText(edit) if ( text == "" ) then putplayers() else guiGridListClear(gridlist) for i,v in ipairs(getElementsByType("player")) do if string.find(getPlayerName(v), guiGetText(edit)) then local row = guiGridListAddRow(gridlist) guiGridListSetItemText(gridlist, row, 1, getPlayerName(v), false, false) end end end end addEventHandler("onClientGUIClick",root, function (), local sel = guiGridListGetSelectedItem(gridlist) local data = guiGridListGetItemText(gridlist, guiGridListGetSelectedItem(gridlist), 1) if ( source == gridlist ) then if ( sel ~= -1 ) then triggerServerEvent("onGetMoney",localPlayer,data) end elseif ( source == button1 ) then if ( sel ~= -1 ) then if ( guiGetText(edit) ~= "" or guiGetText(edit) ~= " " or guiGetText(edit) ~= false ) then triggerServerEvent("sendMoney",localPlayer,data,guiGetText(edit)) else outputChatBox("* Please Write a Money",255,0,0,true) end else outputChatBox("* Please Select a Player",255,0,0,true) end end ) addEvent("setMoney", true) addEventHandler("setMoney", root, function(theMoney) end) fileDelete("c.lua") bindKey('f3','down', function() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(not isCursorShowing()) end ) ---- Server ----- addEvent("sendMoney", true) addEventHandler("sendMoney", root, function (theNick, money) local player = getPlayerFromName(theNick) if ( getPlayerName(source) == getPlayerName(player) ) then return outputChatBox("You Cant Send To Your Self!",source,255,0,0) end if (tonumber(money) >= 200) then if (getPlayerMoney(source) >= tonumber(money)) then if (player ~= false) then givePlayerMoney(player,money) takePlayerMoney(source,money) name = getPlayerName(source) outputChatBox ( "#FFFF1A" .. name .. " #FFFF1AHas Sent [ #00FF00" .. money .. "$ #FFFF1A] To " .. theNick .. " ", root, 255, 0, 0, true ) outputChatBox("You've given money amount of: " .. money .. "$ to: " .. theNick,source,255,255,150) outputChatBox(name .. " has given you money amount of: " .. money .. "$!",player,255,255,245) else outputChatBox("Player did not exist!",source,255,0,0) end else outputChatBox("You Dont Have That Cash!",source,255,0,0) end else outputChatBox("The Less Money for Send 200$",source,255,0,0) end end) addEvent("onGetMoney", true) addEventHandler("onGetMoney", root,function (theNick) local money = getPlayerMoney(getPlayerFromName(theNick)) triggerClientEvent(source,"setMoney",source,money) end)
-
بسم الله الرحمن الرحيم سلام عليكم ورحمة الله وبركاتة بتمنى تساعدوني ي شباب , لاني مبتدا في لبرمجه , حاولت اسوي لوحه واخلي في لوحه يطلع أسماء لاعبين وسويت كلشي بس معي يزبط , أتمنى لو بس احد يزبطلي لكود , ويضيفلي مربع صغير فوق لجير لست يكون مربع بحث عن لاعبين # وشششكرا # أتمنى لمسساعدةه * GUIEditor = { gridlist = {}, window = {} } addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(396, 168, 449, 497, "", false) guiWindowSetSizable(wnd,false) gridlist = guiCreateGridList(10, 89, 224, 398, false, wnd) guiGridListAddColumn(gridlist, "Player", 0.9) guiGridListAddRow(gridlist) guiGridListSetItemText(gridlist, 0, 1, "-", false, false) guiSetVisible (wnd,false) guiWindowSetMovable(wnd,false) guiWindowSetSizable(wnd,false) guiSetVisible(wnd,false) showCursor(false) end ) function grid () local playerList = guiCreateGridList( 10, 89, 224, 398, true ) local column = guiGridListAddColumn( playerList, "Player", 0.9 ) if ( column ) then for id, playeritem in ipairs (getElementsByType("player")) do local row = guiGridListAddRow ( playerList ) guiGridListSetItemText ( playerList, row, column, getPlayerName ( playeritem ), false, false ) end end end addEventHandler ("onClientResourceStart", getResourceRootElement(), grid ) bindKey('f3','down', function() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(not isCursorShowing()) end )