Doffy Posted May 19, 2017 Share Posted May 19, 2017 (edited) بدي اول ما اللاعب يختار اسم شخصية في الجريد ليست ويكون محدد عليها في الرو ما يقدر يستخدم ثاني او ما يسوي انفجار وما يسوي بيد ثاني فوق نفس هذا البيد --Client Skintake = { {"Cj",0}, {"Skin 1",1}, {"Skin 2",2}, {"Skin 3",7}, {"Skin 4",9}, {"Skin 5",10}, {"Admin Skin",218}, {"Staff Skin",217}, } for i,k in ipairs (Skintake) do l = guiGridListAddRow (skinlist) guiGridListSetItemText (skinlist,l,1,tostring(k[1]),false,false) guiGridListSetItemData(skinlist,l,1,{k[2]}) guiGridListSetItemColor(skinlist,l,1,0,150,255) end addEventHandler("onClientGUIClick",root, function() local sel = guiGridListGetSelectedItem(skinlist) if ( source == skinlist ) then if sel == 0 then createPed(0,146.22757,1907.38477,26.42741,180) triggerServerEvent("boom1",localPlayer) end end end) --Server addEvent("boom1",true) addEventHandler("boom1",root, function(source) createExplosion ( 146.22757,1907.38477,26.42741 , 11, source ) end) Edited May 19, 2017 by #Himoo Link to comment
^iiEcoo'x_) Posted May 19, 2017 Share Posted May 19, 2017 --Client Skintake = { {"Cj",0}, {"Skin 1",1}, {"Skin 2",2}, {"Skin 3",7}, {"Skin 4",9}, {"Skin 5",10}, {"Admin Skin",218}, {"Staff Skin",217}, } for i,k in ipairs (Skintake) do l = guiGridListAddRow (skinlist) guiGridListSetItemText (skinlist,l,1,tostring(k[1]),false,false) guiGridListSetItemData(skinlist,l,1,{k[2]}) guiGridListSetItemColor(skinlist,l,1,0,150,255) end addEventHandler("onClientGUIClick",root, function() local sel = guiGridListGetSelectedItem(skinlist) if ( source == skinlist ) then if sel == 0 then if getElementData ( localPlayer , "Data" ) == "Used" then return end createPed(0,146.22757,1907.38477,26.42741,180) triggerServerEvent("boom1",localPlayer) end end end end) --Server addEvent("boom1",true) addEventHandler("boom1",root, function(source) createExplosion ( 146.22757,1907.38477,26.42741 , 11, source ) setElementData ( source , "Data" , "Used" ) end) Link to comment
iMr.WiFi..! Posted May 19, 2017 Share Posted May 19, 2017 (edited) --Client Skintake = { {"Cj",0}, {"Skin 1",1}, {"Skin 2",2}, {"Skin 3",7}, {"Skin 4",9}, {"Skin 5",10}, {"Admin Skin",218}, {"Staff Skin",217}, } for i,k in ipairs (Skintake) do l = guiGridListAddRow (skinlist) guiGridListSetItemText (skinlist,l,1,tostring(k[1]),false,false) guiGridListSetItemData(skinlist,l,1,{k[2]}) guiGridListSetItemColor(skinlist,l,1,0,150,255) end addEventHandler("onClientGUIClick",root, function() local sel = guiGridListGetSelectedItem(skinlist) if ( source == skinlist ) then if sel ~= -1 then local data = guiGridListGetItemData(skinlist,sel,1) if isElement(MyPed) then return destroyElement(MyPed) end MyPed = createPed(data[1],146.22757,1907.38477,26.42741,180) triggerServerEvent("boom1",localPlayer) end end end) --Server I = false; addEvent("boom1",true) addEventHandler("boom1",root, function(source) if I == true then return end MyExp = createExplosion ( 146.22757,1907.38477,26.42741 , 11, source ) I = true; end) Edited May 19, 2017 by iMr.WiFi..! Link to comment
Doffy Posted May 19, 2017 Author Share Posted May 19, 2017 1 minute ago, iMr.WiFi..! said: --Client Skintake = { {"Cj",0}, {"Skin 1",1}, {"Skin 2",2}, {"Skin 3",7}, {"Skin 4",9}, {"Skin 5",10}, {"Admin Skin",218}, {"Staff Skin",217}, } for i,k in ipairs (Skintake) do l = guiGridListAddRow (skinlist) guiGridListSetItemText (skinlist,l,1,tostring(k[1]),false,false) guiGridListSetItemData(skinlist,l,1,{k[2]}) guiGridListSetItemColor(skinlist,l,1,0,150,255) end addEventHandler("onClientGUIClick",root, function() local sel = guiGridListGetSelectedItem(skinlist) if ( source == skinlist ) then if sel ~= -1 then local data = guiGridListGetItemData(skinlist,sel,1) if isElement(MyPed) then return destroyElement(MyPed) end MyPed = createPed(data[1],146.22757,1907.38477,26.42741,180) triggerServerEvent("boom1",localPlayer) end end end) --Server addEvent("boom1",true) addEventHandler("boom1",root, function(source) if isElement(MyExp) then return destroyElement(MyExp) end MyExp = createExplosion ( 146.22757,1907.38477,26.42741 , 11, source ) end) شكرا اخواني Link to comment
iMr.WiFi..! Posted May 19, 2017 Share Posted May 19, 2017 Just now, #Himoo said: شكرا اخواني عفواً اخوي : ) Link to comment
Doffy Posted May 19, 2017 Author Share Posted May 19, 2017 44 minutes ago, iMr.WiFi..! said: عفواً اخوي : ) معليش اخر مشكلة انا بدي ياه اول ما يختار شخصية من الي فلقريد ليست تنحفظ الشخصية حقته كل ما يموت ياخذها بعد ما يختار الشخصية Link to comment
coNolel Posted May 19, 2017 Share Posted May 19, 2017 استعمل حدث onPlayerWasted وحط كل م يموت يغير شخصيته Link to comment
Doffy Posted May 19, 2017 Author Share Posted May 19, 2017 طيب فيه مشكلة ثانية انو البيدز يجون لكل اللاعبين ما يجون للاعب فقط + الانفجارات برضو Link to comment
^iiEcoo'x_) Posted May 19, 2017 Share Posted May 19, 2017 تقصد انه ودك الاعب بس وحده يشوف البيد ؟ Link to comment
^iiEcoo'x_) Posted May 20, 2017 Share Posted May 20, 2017 حط إنشاء القنبلة ب ملف كلينت ! Link to comment
Doffy Posted May 20, 2017 Author Share Posted May 20, 2017 3 hours ago, #_iMr.[E]coo said: حط إنشاء القنبلة ب ملف كلينت ! طيب البيدز ما تروح اول ما اللاعب يسجل البيدز تظل مكانها تسوي انيمشين ما توقف او تروح انا بيها تروح اول ما اللاعب يسجل Link to comment
^iiEcoo'x_) Posted May 20, 2017 Share Posted May 20, 2017 addEventHndler ( 'onPlayerLogin' , root , function ( ) -- code 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