EH10 Posted December 15, 2013 Share Posted December 15, 2013 وكتبت مثلا 29 وضغطت الزر بيعطية سلاح رقم 29 Edit شباب ابي كود اذا سويت لست يطلع فية اسماء الاعضاء واذا ضغطت على اسم عضو اي عضو ورحت Link to comment
PaiN^ Posted December 15, 2013 Share Posted December 15, 2013 * Client side : guiCreateGridList guiCreateEdit for -- loop guiGridListAddRow guiGridListSetItemText addEventHandler -- "onClientGUIClick" guiGetText triggerServerEvent * Server side : addEvent addEventHandler giveWeapon Link to comment
EH10 Posted December 15, 2013 Author Share Posted December 15, 2013 صححلي الكود تكفا # Client Side ! function () for i,v in ipairs(getElementsByType("player")) do Gives = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "....", true ) Hoews = guiCreateEdit( 0.3, 0.1, 0.4, 0.1, "", true ) local Taes = guiGetText ( Hoews ) Gread = guiCreateGridList(0, 0, 0, 0, false) local Row = guiGridListAddRow (Gread) guiGridListSetItemText ( Gread, Row, "" ..name.. "", false, false ) end ) function Weapon () triggerServerEvent ( "onGiveWeapon", root, end addEventHandler ( "onClientGUIClick", Gives, Weapon ) # Server Side ! addEvent( "onGiveWeapon", true ) addEventHandler( "onGiveWeapon", root, function () giveWeapon ( source, idWeapon, ammo ) end) Link to comment
DontTrustMe Posted December 16, 2013 Share Posted December 16, 2013 صححلي الكود تكفا # Client Side ! function () for i,v in ipairs(getElementsByType("player")) do Gives = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "....", true ) Hoews = guiCreateEdit( 0.3, 0.1, 0.4, 0.1, "", true ) local Taes = guiGetText ( Hoews ) Gread = guiCreateGridList(0, 0, 0, 0, false) local Row = guiGridListAddRow (Gread) guiGridListSetItemText ( Gread, Row, "" ..name.. "", false, false ) end ) function Weapon () triggerServerEvent ( "onGiveWeapon", root, end addEventHandler ( "onClientGUIClick", Gives, Weapon ) # Server Side ! addEvent( "onGiveWeapon", true ) addEventHandler( "onGiveWeapon", root, function () giveWeapon ( source, idWeapon, ammo ) end) هريسة بس بحول اسوهولك Link to comment
EH10 Posted December 16, 2013 Author Share Posted December 16, 2013 صححلي الكود تكفا # Client Side ! function () for i,v in ipairs(getElementsByType("player")) do Gives = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "....", true ) Hoews = guiCreateEdit( 0.3, 0.1, 0.4, 0.1, "", true ) local Taes = guiGetText ( Hoews ) Gread = guiCreateGridList(0, 0, 0, 0, false) local Row = guiGridListAddRow (Gread) guiGridListSetItemText ( Gread, Row, "" ..name.. "", false, false ) end ) function Weapon () triggerServerEvent ( "onGiveWeapon", root, end addEventHandler ( "onClientGUIClick", Gives, Weapon ) # Server Side ! addEvent( "onGiveWeapon", true ) addEventHandler( "onGiveWeapon", root, function () giveWeapon ( source, idWeapon, ammo ) end) هريسة بس بحول اسوهولك وش عرفك انه هريسة اتوقع هريسة الله واعلم Link to comment
فاّرس Posted December 16, 2013 Share Posted December 16, 2013 -- Client Side # Gives = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "....", true ) Hoews = guiCreateEdit( 0.3, 0.1, 0.4, 0.1, "", true ) Grid = guiCreateGridList(0, 0, 0, 0, false) guiGridListAddColumn(Grid,'Players Name :',0.80) for i,v in ipairs(getElementsByType('player')) do local Row = guiGridListAddRow (Grid) guiGridListSetItemText ( Grid, Row, 1,getPlayerName(v), false, false ) end addEventHandler ( "onClientGUIClick", Gives, function () if guiGridListGetSelectedItem(Grid) ~= -1 then local text = guiGetText(Hoews) local plr = guiGridListGetItemText(Grid,guiGridListGetSelectedItem ( Grid ), 1) if ( plr ) and ( text ~= '' )then triggerServerEvent ( 'giveGun', localPlayer,plr,text) end end end,false ) -- Server Side # addEvent('giveGun',true) addEventHandler('giveGun',root,function(plr,id) if ( plr ) and ( tostring(id) ) then giveWeapon(getPlayerFromName(plr),tostring(id),100) end end ) 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