Sha[D]ow Posted August 13, 2015 Share Posted August 13, 2015 (edited) السلام عليكم انا سويت لوحه و بيها 2 قريد ليست و 2 بوتون الأول به اسامى اللاعبين الموجودين فى السيرفر الثانى سويت به الأسلحه البوتون الأول يعطى اللاعب الى انت محدده من القائمه البوتون الثانى يعطى الكل السلاح الى انت محدده انا الحين كل شئ تمام فى القريد ليست ابى فنكشنات حق الأزرار كلنت و سيرفر لو سمحت معليش طولت فى الحديث ================================ هذا زر تحويل الى لاعب واحد كلينت addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[1] then swep = guiGridListGetItemText (wep, guiGridListGetSelectedItem (wep), 1) sply = guiGetText(nameEdit) samo = guiGetText (amo) triggerServerEvent("player", getLocalPlayer(), swep, sply, samo ) end end ) سيرفر addEvent("player", true) addEventHandler("player", getRootElement(), function(swep, sply, samo) if tonumber(samo) >= 1 then players = getPlayerFromName(sply) givePedWeapon (players, swep, samo ) end end ) اتمنى حل Edited August 13, 2015 by Guest Link to comment
iMr.SFA7 Posted August 13, 2015 Share Posted August 13, 2015 guiGridListGetSelectedItem guiGridListGetItemText triggerServerEvent getElementsByType -- Loop giveWeapon Link to comment
; Mr.T76eM # Posted August 13, 2015 Share Posted August 13, 2015 + getPlayerFromName عشان تجيب الاعب الي اخترته عن طريق التيكست Link to comment
iMr.SFA7 Posted August 13, 2015 Share Posted August 13, 2015 @ Sha[D]ow شفيكك حذفت ردكك Link to comment
Sha[D]ow Posted August 13, 2015 Author Share Posted August 13, 2015 لأانى عرفت احلها بس فى مشكلة ثانية Link to comment
Sha[D]ow Posted August 13, 2015 Author Share Posted August 13, 2015 هذا زر تحويل الى لاعب واحد كلينت addEventHandler("onClientGUIClick",root, function () if source == GUIEditor.button[1] then swep = guiGridListGetItemText (wep, guiGridListGetSelectedItem (wep), 1) sply = guiGetText(nameEdit) samo = guiGetText (amo) triggerServerEvent("player", getLocalPlayer(), swep, sply, samo ) end end ) سيرفر addEvent("player", true) addEventHandler("player", getRootElement(), function(swep, sply, samo) if tonumber(samo) >= 1 then players = getPlayerFromName(sply) givePedWeapon (players, swep, samo ) end end ) اتمنى حل Link to comment
Sha[D]ow Posted August 14, 2015 Author Share Posted August 14, 2015 ما يوزع السلاح على اللاعب الى اخترته Link to comment
The Killer Posted August 14, 2015 Share Posted August 14, 2015 Client side # addEventHandler ("onClientGUIClick", resourceRoot, function () if (source == GUIEditor.button[1]) then local swep = guiGridListGetItemText (wep, guiGridListGetSelectedItem (wep), 1) local sply = guiGetText (nameEdit) local samo = guiGetText (amo) if (swep and swep ~= "") then local plrName = getPlayerFromName (spy) if (sply ~= "") then if (tonumber (samo) ~= nil) then if (plrName) then triggerServerEvent ("player", localPlayer, plrName, swep, samo) else outputChatBox ("Player not found.", 255, 0, 0) end else outputChatBox ("Only numbers are allowed.", 255, 0, 0) end else outputChatBox ("You must write a name.", 255, 0, 0) end else outputChatBox ("You must select a weapon.", 255, 0, 0) end end end ) Server side # addEvent ("player", true) addEventHandler ("player", root, function (plr, weapon, ammo) if tonumber (ammo) >= 1 then giveWeapon (plr, weapon, ammo) end end ) Link to comment
Sha[D]ow Posted August 14, 2015 Author Share Posted August 14, 2015 معليش the killer هات سكايبك او ضيفنى انت shadow59960 Link to comment
Sha[D]ow Posted August 14, 2015 Author Share Posted August 14, 2015 Client side # addEventHandler ("onClientGUIClick", resourceRoot, function () if (source == GUIEditor.button[1]) then local swep = guiGridListGetItemText (wep, guiGridListGetSelectedItem (wep), 1) local sply = guiGetText (nameEdit) local samo = guiGetText (amo) if (swep and swep ~= "") then local plrName = getPlayerFromName (spy) if (sply ~= "") then if (tonumber (samo) ~= nil) then if (plrName) then triggerServerEvent ("player", localPlayer, plrName, swep, samo) else outputChatBox ("Player not found.", 255, 0, 0) end else outputChatBox ("Only numbers are allowed.", 255, 0, 0) end else outputChatBox ("You must write a name.", 255, 0, 0) end else outputChatBox ("You must select a weapon.", 255, 0, 0) end end end ) Server side # addEvent ("player", true) addEventHandler ("player", root, function (plr, weapon, ammo) if tonumber (ammo) >= 1 then giveWeapon (plr, weapon, ammo) end end ) مشككككككوووووور الكود شغال 100% Link to comment
Sha[D]ow Posted August 14, 2015 Author Share Posted August 14, 2015 killer لو سمحت ممكن سكايبك Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now