Jump to content

=[مساعدة في لوحة التسجيل2]=


Recommended Posts

بدي اول ما اللاعب يختار اسم شخصية في الجريد ليست ويكون محدد عليها في الرو ما يقدر يستخدم ثاني او ما يسوي انفجار وما يسوي بيد ثاني فوق نفس هذا البيد
 

--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 by #Himoo
Link to comment
--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
--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 by iMr.WiFi..!
Link to comment
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
44 minutes ago, iMr.WiFi..! said:

عفواً اخوي : )

معليش اخر مشكلة انا بدي ياه اول ما يختار شخصية من الي فلقريد ليست تنحفظ الشخصية حقته كل ما يموت ياخذها بعد ما يختار الشخصية

Link to comment
3 hours ago, #_iMr.[E]coo said:

حط إنشاء القنبلة ب ملف كلينت !

طيب البيدز ما تروح اول ما اللاعب يسجل البيدز تظل مكانها تسوي انيمشين ما توقف او تروح انا بيها تروح اول ما اللاعب يسجل

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...