Jump to content

مشكلهه في addEvent


Recommended Posts

جرب كذا .. :

addEventHandler( "onClientGUIClick", resourceRoot, function (     ) 
  if ( source == removebu ) then 
   if ( guiGetText ( addedit ) ~= "" ) then 
      guiGridListRemoveRow ( gridlist, guiGetText ( addedit ) ) 
    end 
  elseif ( source == onlinebu ) then 
    if ( guiGetText ( addedit ) ~= "" ) then 
      guiGridListSetItemColor ( gridlist, guiGetText ( addedit ), NameCo, 0, 255, 0 ) 
  end 
 elseif ( source == offlinebu ) then 
   if ( guiGetText ( addedit ) ~= "" ) then 
          guiGridListSetItemColor ( gridlist, guiGetText ( addedit ), NameCo, 255, 0, 0 ) 
      end 
  elseif ( source == addbu ) then 
    if ( guiGetText ( addedit ) ~= "" ) then 
                local membername = guiGridListAddRow ( gridlist ) 
               guiGridListSetItemText ( gridlist, membername, NameCo, ""..guiGridListGetRowCount ( gridlist ).."- "..guiGetText ( addedit ), false, false ) 
         end 
   end 
end ) 
Link to comment

addEventHandler( "onClientGUIClick", resourceRoot, function (     ) 
  if ( source == removebu ) then 
   if ( guiGetText ( addedit ) ~= "" ) then 
      guiGridListRemoveRow ( gridlist, guiGetText ( addedit ) ) 
    end 
  elseif ( source == onlinebu ) then 
    if ( guiGetText ( addedit ) ~= "" ) then 
      guiGridListSetItemColor ( gridlist, guiGetText ( addedit ), NameCo, 0, 255, 0 ) 
  end 
 elseif ( source == offlinebu ) then 
   if ( guiGetText ( addedit ) ~= "" ) then 
          guiGridListSetItemColor ( gridlist, guiGetText ( addedit ), NameCo, 255, 0, 0 ) 
      end 
  elseif ( source == addbu ) then 
    if ( guiGetText ( addedit ) ~= "" ) then 
                local membername = guiGridListAddRow ( gridlist ) 
               guiGridListSetItemText ( gridlist, membername, NameCo, ""..guiGridListGetRowCount ( gridlist ) - 1.."- "..guiGetText ( addedit ), false, false ) 
         end 
   end 
end ) 
Link to comment

غريب .. طيب جرب كذا

addEventHandler( "onClientGUIClick", resourceRoot, function (     ) 
  if ( source == removebu ) then 
   if ( guiGetText ( addedit ) ~= "" ) then 
      guiGridListRemoveRow ( gridlist, guiGetText ( addedit ) ) 
    end 
  elseif ( source == onlinebu ) then 
    if ( guiGetText ( addedit ) ~= "" ) then 
      guiGridListSetItemColor ( gridlist, guiGetText ( addedit ), NameCo, 0, 255, 0 ) 
  end 
 elseif ( source == offlinebu ) then 
   if ( guiGetText ( addedit ) ~= "" ) then 
          guiGridListSetItemColor ( gridlist, guiGetText ( addedit ), NameCo, 255, 0, 0 ) 
      end 
  elseif ( source == addbu ) then 
    if ( guiGetText ( addedit ) ~= "" ) then 
                local membername = guiGridListAddRow ( gridlist )  
                local roWCount = guiGridListGetRowCount ( gridlist ) - ( 1 ) 
               guiGridListSetItemText ( gridlist, membername, NameCo, ""..tonumber ( roWCount ).."- "..guiGetText ( addedit ), false, false ) 
         end 
     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...