Jump to content

طلب


Recommended Posts

----CLENIT SIDE 
if ( source == gridlist ) then 
     local row, col = guiGridListGetSelectedItem ( gridlist ) 
    if ( row == -1 ) then return end 
    local text = guiGridListGetItemText ( gridlist, row, col ) 
    if ( text == 'SKIN1' ) then 
triggerServerEvent("setSkin3",localPlayer,222) 
  
----SERVER SIDE 
  
addEvent( "skin1", true ) 
addEventHandler( "skin1", root, 
function (id) 
  if tonumber(id) then 
     setElementModel(source,id) 
   end 
end 
 ) 
  

غير222

ب رقم السكن

Link to comment
----CLENIT SIDE 
if ( source == gridlist ) then 
     local row, col = guiGridListGetSelectedItem ( gridlist ) 
    if ( row == -1 ) then return end 
    local text = guiGridListGetItemText ( gridlist, row, col ) 
    if ( text == 'SKIN1' ) then 
triggerServerEvent("setSkin3",localPlayer,222) 
  
----SERVER SIDE 
  
addEvent( "skin1", true ) 
addEventHandler( "skin1", root, 
function (id) 
  if tonumber(id) then 
     setElementModel(source,id) 
   end 
end 
 ) 
  

غير222

ب رقم السكن

اسم الايفنت يختلف تماما عن اسم التريقر ,

setSkin3 ؟

والايفنت skin 1 ?

Link to comment
----CLENIT SIDE 
if ( source == gridlist ) then 
     local row, col = guiGridListGetSelectedItem ( gridlist ) 
    if ( row == -1 ) then return end 
    local text = guiGridListGetItemText ( gridlist, row, col ) 
    if ( text == 'SKIN1' ) then 
triggerServerEvent("setSkin3",localPlayer,222) 
  
----SERVER SIDE 
  
addEvent( "skin1", true ) 
addEventHandler( "skin1", root, 
function (id) 
  if tonumber(id) then 
     setElementModel(source,id) 
   end 
end 
 ) 
  

غير222

ب رقم السكن

اسم الايفنت يختلف تماما عن اسم التريقر ,

setSkin3 ؟

والايفنت skin 1 ?

ما انتبهت لأنه كان عندي وكنت اشتغل على مود وفيه شي عن السكن ف اخذته

علشان يصير اسرع

Link to comment

بـ اسم اللستة حقكـ ( Grid ) فقط استبدل بـ كل مكان كلمة

local Skins = { 
  { "Skin1", 0 }, 
  { "Skin2", 1 }, 
  { "Skin3", 55 }, 
  -- To add new Skin: { "AnyName", ID }, 
}   
  
  
for _,v in ipairs( Skins ) do 
   local Row = guiGridListAddRow( Grid ) 
   guiGridListSetItemText( Grid, Row, 1, v[1], false, false ) 
   guiGridListSetItemData( Grid, Row, 1, v[2] ) 
end 
  
addEventHandler( "onClientGUIClick", resourceRoot, function(   ) 
  if ( source == Grid ) then 
    if ( guiGridListGetSelectedItem ( source ) ~= -1 ) then 
      local Select = tonumber( guiGridListGetItemData( source, guiGridListGetSelectedItem( source ), 1 ) ) 
       if ( Select and Select ~= '' ) then 
             triggerServerEvent( "setClientSkin", localPlayer, tonumber( guiGridListGetItemData( source, guiGridListGetSelectedItem( source ), 1 ) ) ) 
          end 
       end 
    end 
end ) 

addEvent( "setClientSkin", true ) 
addEventHandler( "setClientSkin", root, function( skinID ) 
  if ( skinID and skinID ~= nil ) then 
       setElementModel( client, skinID ) 
    end 
end ) 
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...