Jump to content

ساعدوني تصحيح كود اي تصحيح ارفع الملف و اعطيني الرابط


#TeKa

Recommended Posts

السلام عليكم

انا عملت مود تغير اللون الاسم بس ما يشتغل يطلعلي في debugscript 3

ERROR: Loading script failed: nametag/client.lua:29:'' expected near 'end'

الكود

client side

  theNametagShopWindow = guiCreateWindow(0.0575,0.2917,0.1963,0.375,"Nametag Shop",true) 
  guiWindowSetSizable(theNametagShopWindow,false) 
  theNametagShopWindowRedLabel = guiCreateLabel(0.051,0.1333,0.535,0.0933,"Red",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowRedLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowRedLabel,"top") 
  guiLabelSetHorizontalAlign(theNametagShopWindowRedLabel,"left",false) 
  theNametagShopWindowGreenLabel = guiCreateLabel(0.051,0.24,0.5096,0.1022,"Green",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowGreenLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowGreenLabel,"top") 
  guiLabelSetHorizontalAlign(theNametagShopWindowGreenLabel,"left",false) 
  theNametagShopWindowBlueLabel = guiCreateLabel(0.051,0.3511,0.5414,0.0978,"Blue",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowBlueLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowBlueLabel,"top") 
  guiLabelSetHorizontalAlign(theNametagShopWindowBlueLabel,"left",false) 
  theNametagShopWindowRedEdit = guiCreateEdit(0.6306,0.12,0.293,0.1022,"255",true,theNametagShopWindow) 
  theNametagShopWindowGreenEdit = guiCreateEdit(0.6306,0.2222,0.293,0.1022,"255",true,theNametagShopWindow) 
  theNametagShopWindowBlueEdit = guiCreateEdit(0.6306,0.3244,0.293,0.1022,"255",true,theNametagShopWindow) 
  guiEditSetMaxLength (theNametagShopWindowRedEdit,3) 
  guiEditSetMaxLength (theNametagShopWindowGreenEdit,3) 
  guiEditSetMaxLength (theNametagShopWindowBlueEdit,3) 
  theNametagShopWindowExampleTextLabel = guiCreateLabel(0.0573,0.4578,0.879,0.12,"Example Text",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowExampleTextLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowExampleTextLabel,"center") 
  guiLabelSetHorizontalAlign(theNametagShopWindowExampleTextLabel,"center",false) 
  theNametagShopWindowAcceptButton = guiCreateButton(0.0573,0.6089,0.8726,0.2089,"Buy Nametag\n1250$",true,theNametagShopWindow) 
  theNametagShopWindowCloseButton = guiCreateButton(0.0573,0.8356,0.8854,0.12,"Close",true,theNametagShopWindow) 
  guiSetVisible(theNametagShopWindow,false) 
  end 
) 
  
nametagshopMarker = createMarker (-1951.66,642.98,45.5625,"cylinder",2,0,255,255,127) 
  
  
------- 
  
elseif (source == theNametagShopWindowAcceptButton) then 
    if (tonumber(guiGetText (theNametagShopWindowRedEdit)) ~= nil) and (tonumber(guiGetText (theNametagShopWindowGreenEdit)) ~= nil) and (tonumber(guiGetText (theNametagShopWindowBlueEdit)) ~= nil) then 
      guiSetVisible (theNametagShopWindow,false) 
      showCursor (false,false) 
      triggerServerEvent ("gameMenuButtonClick",getLocalPlayer(),"nametagShopAccept",tonumber(guiGetText (theNametagShopWindowRedEdit)),tonumber(guiGetText (theNametagShopWindowGreenEdit)),tonumber(guiGetText (theNametagShopWindowBlueEdit))) 
    end 
  elseif (source == theNametagShopWindowCloseButton) then 
    guiSetVisible (theNametagShopWindow,false) 
    showCursor (false,false) 
end 
------ 
  elseif (buttonname == "theNametagShopWindowAcceptButton") then 
    if (getPlayerMoney (source) > 2499) then 
      local charactername = getPlayerNametagText (source) 
      local accountName = getAccountName(getPlayerAccount(source)) 
      local characterindex = getCharacterIndexByCharacterName (accountName,charactername) 
      local playerRoot = xmlFindChild (root,"player",findPlayerIndexByName (tostring(accountName)))   
      local characterRoot = xmlNodeGetChildren (playerRoot,tonumber(characterindex)-1) 
      if (characterRoot) then 
        setPlayerNametagColor (source,tonumber(arg1),tonumber(arg2),tonumber(arg3)) 
        triggerClientEvent ("lolmodOpenInfoWindow",source,"Nametag color succesfully bought!") 
        xmlNodeSetAttribute (characterRoot,"cr",tonumber(arg1)) 
        xmlNodeSetAttribute (characterRoot,"cg",tonumber(arg2)) 
        xmlNodeSetAttribute (characterRoot,"cb",tonumber(arg3)) 
        xmlSaveFile (root) 
        takePlayerMoney (source,1250) 
    end 
  end 
end) 
---------- 
addEventHandler ("onClientMarkerHit",getRootElement(), 
function(hitElement,matchingDimension) 
  if (getElementType (hitElement) == "player") and (hitElement == getLocalPlayer()) then 
    if (source == nametagshopMarker) then 
      showCursor (true,true) 
      guiSetVisible (theNametagShopWindow,true) 
  end 
end) 

Edited by Guest
Link to comment
السلام عليكم

انا عملت مود تغير اللون الاسم بس ما يشتغل يطلعلي في debugscript 3

ERROR: Loading script failed: nametag/client.lua:29:'' expected near 'end'

الكود

client side

  theNametagShopWindow = guiCreateWindow(0.0575,0.2917,0.1963,0.375,"Nametag Shop",true) 
  guiWindowSetSizable(theNametagShopWindow,false) 
  theNametagShopWindowRedLabel = guiCreateLabel(0.051,0.1333,0.535,0.0933,"Red",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowRedLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowRedLabel,"top") 
  guiLabelSetHorizontalAlign(theNametagShopWindowRedLabel,"left",false) 
  theNametagShopWindowGreenLabel = guiCreateLabel(0.051,0.24,0.5096,0.1022,"Green",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowGreenLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowGreenLabel,"top") 
  guiLabelSetHorizontalAlign(theNametagShopWindowGreenLabel,"left",false) 
  theNametagShopWindowBlueLabel = guiCreateLabel(0.051,0.3511,0.5414,0.0978,"Blue",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowBlueLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowBlueLabel,"top") 
  guiLabelSetHorizontalAlign(theNametagShopWindowBlueLabel,"left",false) 
  theNametagShopWindowRedEdit = guiCreateEdit(0.6306,0.12,0.293,0.1022,"255",true,theNametagShopWindow) 
  theNametagShopWindowGreenEdit = guiCreateEdit(0.6306,0.2222,0.293,0.1022,"255",true,theNametagShopWindow) 
  theNametagShopWindowBlueEdit = guiCreateEdit(0.6306,0.3244,0.293,0.1022,"255",true,theNametagShopWindow) 
  guiEditSetMaxLength (theNametagShopWindowRedEdit,3) 
  guiEditSetMaxLength (theNametagShopWindowGreenEdit,3) 
  guiEditSetMaxLength (theNametagShopWindowBlueEdit,3) 
  theNametagShopWindowExampleTextLabel = guiCreateLabel(0.0573,0.4578,0.879,0.12,"Example Text",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowExampleTextLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowExampleTextLabel,"center") 
  guiLabelSetHorizontalAlign(theNametagShopWindowExampleTextLabel,"center",false) 
  theNametagShopWindowAcceptButton = guiCreateButton(0.0573,0.6089,0.8726,0.2089,"Buy Nametag\n1250$",true,theNametagShopWindow) 
  theNametagShopWindowCloseButton = guiCreateButton(0.0573,0.8356,0.8854,0.12,"Close",true,theNametagShopWindow) 
  guiSetVisible(theNametagShopWindow,false) 
  end 
) 
  
nametagshopMarker = createMarker (-1951.66,642.98,45.5625,"cylinder",2,0,255,255,127) 
  
  
------- 
  
elseif (source == theNametagShopWindowAcceptButton) then 
    if (tonumber(guiGetText (theNametagShopWindowRedEdit)) ~= nil) and (tonumber(guiGetText (theNametagShopWindowGreenEdit)) ~= nil) and (tonumber(guiGetText (theNametagShopWindowBlueEdit)) ~= nil) then 
      guiSetVisible (theNametagShopWindow,false) 
      showCursor (false,false) 
      triggerServerEvent ("gameMenuButtonClick",getLocalPlayer(),"nametagShopAccept",tonumber(guiGetText (theNametagShopWindowRedEdit)),tonumber(guiGetText (theNametagShopWindowGreenEdit)),tonumber(guiGetText (theNametagShopWindowBlueEdit))) 
    end 
  elseif (source == theNametagShopWindowCloseButton) then 
    guiSetVisible (theNametagShopWindow,false) 
    showCursor (false,false) 
end 
------ 
  elseif (buttonname == "theNametagShopWindowAcceptButton") then 
    if (getPlayerMoney (source) > 2499) then 
      local charactername = getPlayerNametagText (source) 
      local accountName = getAccountName(getPlayerAccount(source)) 
      local characterindex = getCharacterIndexByCharacterName (accountName,charactername) 
      local playerRoot = xmlFindChild (root,"player",findPlayerIndexByName (tostring(accountName)))   
      local characterRoot = xmlNodeGetChildren (playerRoot,tonumber(characterindex)-1) 
      if (characterRoot) then 
        setPlayerNametagColor (source,tonumber(arg1),tonumber(arg2),tonumber(arg3)) 
        triggerClientEvent ("lolmodOpenInfoWindow",source,"Nametag color succesfully bought!") 
        xmlNodeSetAttribute (characterRoot,"cr",tonumber(arg1)) 
        xmlNodeSetAttribute (characterRoot,"cg",tonumber(arg2)) 
        xmlNodeSetAttribute (characterRoot,"cb",tonumber(arg3)) 
        xmlSaveFile (root) 
        takePlayerMoney (source,1250) 
    end 
  end 
end) 
---------- 
addEventHandler ("onClientMarkerHit",getRootElement(), 
function(hitElement,matchingDimension) 
  if (getElementType (hitElement) == "player") and (hitElement == getLocalPlayer()) then 
    if (source == nametagshopMarker) then 
      showCursor (true,true) 
      guiSetVisible (theNametagShopWindow,true) 
  end 
end) 

 theNametagShopWindow = guiCreateWindow(0.0575,0.2917,0.1963,0.375,"Nametag Shop",true) 
  guiWindowSetSizable(theNametagShopWindow,false) 
  theNametagShopWindowRedLabel = guiCreateLabel(0.051,0.1333,0.535,0.0933,"Red",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowRedLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowRedLabel,"top") 
  guiLabelSetHorizontalAlign(theNametagShopWindowRedLabel,"left",false) 
  theNametagShopWindowGreenLabel = guiCreateLabel(0.051,0.24,0.5096,0.1022,"Green",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowGreenLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowGreenLabel,"top") 
  guiLabelSetHorizontalAlign(theNametagShopWindowGreenLabel,"left",false) 
  theNametagShopWindowBlueLabel = guiCreateLabel(0.051,0.3511,0.5414,0.0978,"Blue",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowBlueLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowBlueLabel,"top") 
  guiLabelSetHorizontalAlign(theNametagShopWindowBlueLabel,"left",false) 
  theNametagShopWindowRedEdit = guiCreateEdit(0.6306,0.12,0.293,0.1022,"255",true,theNametagShopWindow) 
  theNametagShopWindowGreenEdit = guiCreateEdit(0.6306,0.2222,0.293,0.1022,"255",true,theNametagShopWindow) 
  theNametagShopWindowBlueEdit = guiCreateEdit(0.6306,0.3244,0.293,0.1022,"255",true,theNametagShopWindow) 
  guiEditSetMaxLength (theNametagShopWindowRedEdit,3) 
  guiEditSetMaxLength (theNametagShopWindowGreenEdit,3) 
  guiEditSetMaxLength (theNametagShopWindowBlueEdit,3) 
  theNametagShopWindowExampleTextLabel = guiCreateLabel(0.0573,0.4578,0.879,0.12,"Example Text",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowExampleTextLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowExampleTextLabel,"center") 
  guiLabelSetHorizontalAlign(theNametagShopWindowExampleTextLabel,"center",false) 
  theNametagShopWindowAcceptButton = guiCreateButton(0.0573,0.6089,0.8726,0.2089,"Buy Nametag\n1250$",true,theNametagShopWindow) 
  theNametagShopWindowCloseButton = guiCreateButton(0.0573,0.8356,0.8854,0.12,"Close",true,theNametagShopWindow) 
  guiSetVisible(theNametagShopWindow,false) 
  
nametagshopMarker = createMarker (-1951.66,642.98,45.5625,"cylinder",2,0,255,255,127) 
  
  
------- 
addEventHandler( 'onClientGUIClick', root, 
function() 
if (source == theNametagShopWindowAcceptButton) then 
    if (tonumber(guiGetText (theNametagShopWindowRedEdit)) ~= nil) and (tonumber(guiGetText (theNametagShopWindowGreenEdit)) ~= nil) and (tonumber(guiGetText (theNametagShopWindowBlueEdit)) ~= nil) then 
      guiSetVisible (theNametagShopWindow,false) 
      showCursor (false,false) 
      triggerServerEvent ("gameMenuButtonClick",getLocalPlayer(),"nametagShopAccept",tonumber(guiGetText (theNametagShopWindowRedEdit)),tonumber(guiGetText (theNametagShopWindowGreenEdit)),tonumber(guiGetText (theNametagShopWindowBlueEdit))) 
    end 
  elseif (source == theNametagShopWindowCloseButton) then 
    guiSetVisible (theNametagShopWindow,false) 
    showCursor (false,false) 
  elseif (buttonname == "theNametagShopWindowAcceptButton") then 
    if (getPlayerMoney (source) > 2499) then 
      local charactername = getPlayerNametagText (source) 
      local accountName = getAccountName(getPlayerAccount(source)) 
      local characterindex = getCharacterIndexByCharacterName (accountName,charactername) 
      local playerRoot = xmlFindChild (root,"player",findPlayerIndexByName (tostring(accountName)))   
      local characterRoot = xmlNodeGetChildren (playerRoot,tonumber(characterindex)-1) 
      if (characterRoot) then 
        setPlayerNametagColor (source,tonumber(arg1),tonumber(arg2),tonumber(arg3)) 
        triggerClientEvent ("lolmodOpenInfoWindow",source,"Nametag color succesfully bought!") 
        xmlNodeSetAttribute (characterRoot,"cr",tonumber(arg1)) 
        xmlNodeSetAttribute (characterRoot,"cg",tonumber(arg2)) 
        xmlNodeSetAttribute (characterRoot,"cb",tonumber(arg3)) 
        xmlSaveFile (root) 
        takePlayerMoney (source,1250) 
    end 
end 
  end 
end 
) 
---------- 
addEventHandler ("onClientMarkerHit",getRootElement(), 
function(hitElement,matchingDimension) 
  if (getElementType (hitElement) == "player") and (hitElement == getLocalPlayer()) then 
    if (source == nametagshopMarker) then 
      showCursor (true,true) 
      guiSetVisible (theNametagShopWindow,true) 
  end 
end 
end 
) 

Link to comment
السلام عليكم

انا عملت مود تغير اللون الاسم بس ما يشتغل يطلعلي في debugscript 3

ERROR: Loading script failed: nametag/client.lua:29:'' expected near 'end'

الكود

client side

  theNametagShopWindow = guiCreateWindow(0.0575,0.2917,0.1963,0.375,"Nametag Shop",true) 
  guiWindowSetSizable(theNametagShopWindow,false) 
  theNametagShopWindowRedLabel = guiCreateLabel(0.051,0.1333,0.535,0.0933,"Red",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowRedLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowRedLabel,"top") 
  guiLabelSetHorizontalAlign(theNametagShopWindowRedLabel,"left",false) 
  theNametagShopWindowGreenLabel = guiCreateLabel(0.051,0.24,0.5096,0.1022,"Green",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowGreenLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowGreenLabel,"top") 
  guiLabelSetHorizontalAlign(theNametagShopWindowGreenLabel,"left",false) 
  theNametagShopWindowBlueLabel = guiCreateLabel(0.051,0.3511,0.5414,0.0978,"Blue",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowBlueLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowBlueLabel,"top") 
  guiLabelSetHorizontalAlign(theNametagShopWindowBlueLabel,"left",false) 
  theNametagShopWindowRedEdit = guiCreateEdit(0.6306,0.12,0.293,0.1022,"255",true,theNametagShopWindow) 
  theNametagShopWindowGreenEdit = guiCreateEdit(0.6306,0.2222,0.293,0.1022,"255",true,theNametagShopWindow) 
  theNametagShopWindowBlueEdit = guiCreateEdit(0.6306,0.3244,0.293,0.1022,"255",true,theNametagShopWindow) 
  guiEditSetMaxLength (theNametagShopWindowRedEdit,3) 
  guiEditSetMaxLength (theNametagShopWindowGreenEdit,3) 
  guiEditSetMaxLength (theNametagShopWindowBlueEdit,3) 
  theNametagShopWindowExampleTextLabel = guiCreateLabel(0.0573,0.4578,0.879,0.12,"Example Text",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowExampleTextLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowExampleTextLabel,"center") 
  guiLabelSetHorizontalAlign(theNametagShopWindowExampleTextLabel,"center",false) 
  theNametagShopWindowAcceptButton = guiCreateButton(0.0573,0.6089,0.8726,0.2089,"Buy Nametag\n1250$",true,theNametagShopWindow) 
  theNametagShopWindowCloseButton = guiCreateButton(0.0573,0.8356,0.8854,0.12,"Close",true,theNametagShopWindow) 
  guiSetVisible(theNametagShopWindow,false) 
  end 
) 
  
nametagshopMarker = createMarker (-1951.66,642.98,45.5625,"cylinder",2,0,255,255,127) 
  
  
------- 
  
elseif (source == theNametagShopWindowAcceptButton) then 
    if (tonumber(guiGetText (theNametagShopWindowRedEdit)) ~= nil) and (tonumber(guiGetText (theNametagShopWindowGreenEdit)) ~= nil) and (tonumber(guiGetText (theNametagShopWindowBlueEdit)) ~= nil) then 
      guiSetVisible (theNametagShopWindow,false) 
      showCursor (false,false) 
      triggerServerEvent ("gameMenuButtonClick",getLocalPlayer(),"nametagShopAccept",tonumber(guiGetText (theNametagShopWindowRedEdit)),tonumber(guiGetText (theNametagShopWindowGreenEdit)),tonumber(guiGetText (theNametagShopWindowBlueEdit))) 
    end 
  elseif (source == theNametagShopWindowCloseButton) then 
    guiSetVisible (theNametagShopWindow,false) 
    showCursor (false,false) 
end 
------ 
  elseif (buttonname == "theNametagShopWindowAcceptButton") then 
    if (getPlayerMoney (source) > 2499) then 
      local charactername = getPlayerNametagText (source) 
      local accountName = getAccountName(getPlayerAccount(source)) 
      local characterindex = getCharacterIndexByCharacterName (accountName,charactername) 
      local playerRoot = xmlFindChild (root,"player",findPlayerIndexByName (tostring(accountName)))   
      local characterRoot = xmlNodeGetChildren (playerRoot,tonumber(characterindex)-1) 
      if (characterRoot) then 
        setPlayerNametagColor (source,tonumber(arg1),tonumber(arg2),tonumber(arg3)) 
        triggerClientEvent ("lolmodOpenInfoWindow",source,"Nametag color succesfully bought!") 
        xmlNodeSetAttribute (characterRoot,"cr",tonumber(arg1)) 
        xmlNodeSetAttribute (characterRoot,"cg",tonumber(arg2)) 
        xmlNodeSetAttribute (characterRoot,"cb",tonumber(arg3)) 
        xmlSaveFile (root) 
        takePlayerMoney (source,1250) 
    end 
  end 
end) 
---------- 
addEventHandler ("onClientMarkerHit",getRootElement(), 
function(hitElement,matchingDimension) 
  if (getElementType (hitElement) == "player") and (hitElement == getLocalPlayer()) then 
    if (source == nametagshopMarker) then 
      showCursor (true,true) 
      guiSetVisible (theNametagShopWindow,true) 
  end 
end) 

 theNametagShopWindow = guiCreateWindow(0.0575,0.2917,0.1963,0.375,"Nametag Shop",true) 
  guiWindowSetSizable(theNametagShopWindow,false) 
  theNametagShopWindowRedLabel = guiCreateLabel(0.051,0.1333,0.535,0.0933,"Red",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowRedLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowRedLabel,"top") 
  guiLabelSetHorizontalAlign(theNametagShopWindowRedLabel,"left",false) 
  theNametagShopWindowGreenLabel = guiCreateLabel(0.051,0.24,0.5096,0.1022,"Green",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowGreenLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowGreenLabel,"top") 
  guiLabelSetHorizontalAlign(theNametagShopWindowGreenLabel,"left",false) 
  theNametagShopWindowBlueLabel = guiCreateLabel(0.051,0.3511,0.5414,0.0978,"Blue",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowBlueLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowBlueLabel,"top") 
  guiLabelSetHorizontalAlign(theNametagShopWindowBlueLabel,"left",false) 
  theNametagShopWindowRedEdit = guiCreateEdit(0.6306,0.12,0.293,0.1022,"255",true,theNametagShopWindow) 
  theNametagShopWindowGreenEdit = guiCreateEdit(0.6306,0.2222,0.293,0.1022,"255",true,theNametagShopWindow) 
  theNametagShopWindowBlueEdit = guiCreateEdit(0.6306,0.3244,0.293,0.1022,"255",true,theNametagShopWindow) 
  guiEditSetMaxLength (theNametagShopWindowRedEdit,3) 
  guiEditSetMaxLength (theNametagShopWindowGreenEdit,3) 
  guiEditSetMaxLength (theNametagShopWindowBlueEdit,3) 
  theNametagShopWindowExampleTextLabel = guiCreateLabel(0.0573,0.4578,0.879,0.12,"Example Text",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowExampleTextLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowExampleTextLabel,"center") 
  guiLabelSetHorizontalAlign(theNametagShopWindowExampleTextLabel,"center",false) 
  theNametagShopWindowAcceptButton = guiCreateButton(0.0573,0.6089,0.8726,0.2089,"Buy Nametag\n1250$",true,theNametagShopWindow) 
  theNametagShopWindowCloseButton = guiCreateButton(0.0573,0.8356,0.8854,0.12,"Close",true,theNametagShopWindow) 
  guiSetVisible(theNametagShopWindow,false) 
  
nametagshopMarker = createMarker (-1951.66,642.98,45.5625,"cylinder",2,0,255,255,127) 
  
  
------- 
addEventHandler( 'onClientGUIClick', root, 
function() 
if (source == theNametagShopWindowAcceptButton) then 
    if (tonumber(guiGetText (theNametagShopWindowRedEdit)) ~= nil) and (tonumber(guiGetText (theNametagShopWindowGreenEdit)) ~= nil) and (tonumber(guiGetText (theNametagShopWindowBlueEdit)) ~= nil) then 
      guiSetVisible (theNametagShopWindow,false) 
      showCursor (false,false) 
      triggerServerEvent ("gameMenuButtonClick",getLocalPlayer(),"nametagShopAccept",tonumber(guiGetText (theNametagShopWindowRedEdit)),tonumber(guiGetText (theNametagShopWindowGreenEdit)),tonumber(guiGetText (theNametagShopWindowBlueEdit))) 
    end 
  elseif (source == theNametagShopWindowCloseButton) then 
    guiSetVisible (theNametagShopWindow,false) 
    showCursor (false,false) 
  elseif (buttonname == "theNametagShopWindowAcceptButton") then 
    if (getPlayerMoney (source) > 2499) then 
      local charactername = getPlayerNametagText (source) 
      local accountName = getAccountName(getPlayerAccount(source)) 
      local characterindex = getCharacterIndexByCharacterName (accountName,charactername) 
      local playerRoot = xmlFindChild (root,"player",findPlayerIndexByName (tostring(accountName)))   
      local characterRoot = xmlNodeGetChildren (playerRoot,tonumber(characterindex)-1) 
      if (characterRoot) then 
        setPlayerNametagColor (source,tonumber(arg1),tonumber(arg2),tonumber(arg3)) 
        triggerClientEvent ("lolmodOpenInfoWindow",source,"Nametag color succesfully bought!") 
        xmlNodeSetAttribute (characterRoot,"cr",tonumber(arg1)) 
        xmlNodeSetAttribute (characterRoot,"cg",tonumber(arg2)) 
        xmlNodeSetAttribute (characterRoot,"cb",tonumber(arg3)) 
        xmlSaveFile (root) 
        takePlayerMoney (source,1250) 
    end 
end 
  end 
end 
) 
---------- 
addEventHandler ("onClientMarkerHit",getRootElement(), 
function(hitElement,matchingDimension) 
  if (getElementType (hitElement) == "player") and (hitElement == getLocalPlayer()) then 
    if (source == nametagshopMarker) then 
      showCursor (true,true) 
      guiSetVisible (theNametagShopWindow,true) 
  end 
end 
end 
) 

ما نفعت يقلي

ERROR: Loading script failed: nametag/client.lua:2 '=' expected near 'guiWindowSetSizable'

Link to comment
السلام عليكم

انا عملت مود تغير اللون الاسم بس ما يشتغل يطلعلي في debugscript 3

ERROR: Loading script failed: nametag/client.lua:29:'' expected near 'end'

الكود

client side

  theNametagShopWindow = guiCreateWindow(0.0575,0.2917,0.1963,0.375,"Nametag Shop",true) 
  guiWindowSetSizable(theNametagShopWindow,false) 
  theNametagShopWindowRedLabel = guiCreateLabel(0.051,0.1333,0.535,0.0933,"Red",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowRedLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowRedLabel,"top") 
  guiLabelSetHorizontalAlign(theNametagShopWindowRedLabel,"left",false) 
  theNametagShopWindowGreenLabel = guiCreateLabel(0.051,0.24,0.5096,0.1022,"Green",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowGreenLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowGreenLabel,"top") 
  guiLabelSetHorizontalAlign(theNametagShopWindowGreenLabel,"left",false) 
  theNametagShopWindowBlueLabel = guiCreateLabel(0.051,0.3511,0.5414,0.0978,"Blue",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowBlueLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowBlueLabel,"top") 
  guiLabelSetHorizontalAlign(theNametagShopWindowBlueLabel,"left",false) 
  theNametagShopWindowRedEdit = guiCreateEdit(0.6306,0.12,0.293,0.1022,"255",true,theNametagShopWindow) 
  theNametagShopWindowGreenEdit = guiCreateEdit(0.6306,0.2222,0.293,0.1022,"255",true,theNametagShopWindow) 
  theNametagShopWindowBlueEdit = guiCreateEdit(0.6306,0.3244,0.293,0.1022,"255",true,theNametagShopWindow) 
  guiEditSetMaxLength (theNametagShopWindowRedEdit,3) 
  guiEditSetMaxLength (theNametagShopWindowGreenEdit,3) 
  guiEditSetMaxLength (theNametagShopWindowBlueEdit,3) 
  theNametagShopWindowExampleTextLabel = guiCreateLabel(0.0573,0.4578,0.879,0.12,"Example Text",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowExampleTextLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowExampleTextLabel,"center") 
  guiLabelSetHorizontalAlign(theNametagShopWindowExampleTextLabel,"center",false) 
  theNametagShopWindowAcceptButton = guiCreateButton(0.0573,0.6089,0.8726,0.2089,"Buy Nametag\n1250$",true,theNametagShopWindow) 
  theNametagShopWindowCloseButton = guiCreateButton(0.0573,0.8356,0.8854,0.12,"Close",true,theNametagShopWindow) 
  guiSetVisible(theNametagShopWindow,false) 
  end 
) 
  
nametagshopMarker = createMarker (-1951.66,642.98,45.5625,"cylinder",2,0,255,255,127) 
  
  
------- 
  
elseif (source == theNametagShopWindowAcceptButton) then 
    if (tonumber(guiGetText (theNametagShopWindowRedEdit)) ~= nil) and (tonumber(guiGetText (theNametagShopWindowGreenEdit)) ~= nil) and (tonumber(guiGetText (theNametagShopWindowBlueEdit)) ~= nil) then 
      guiSetVisible (theNametagShopWindow,false) 
      showCursor (false,false) 
      triggerServerEvent ("gameMenuButtonClick",getLocalPlayer(),"nametagShopAccept",tonumber(guiGetText (theNametagShopWindowRedEdit)),tonumber(guiGetText (theNametagShopWindowGreenEdit)),tonumber(guiGetText (theNametagShopWindowBlueEdit))) 
    end 
  elseif (source == theNametagShopWindowCloseButton) then 
    guiSetVisible (theNametagShopWindow,false) 
    showCursor (false,false) 
end 
------ 
  elseif (buttonname == "theNametagShopWindowAcceptButton") then 
    if (getPlayerMoney (source) > 2499) then 
      local charactername = getPlayerNametagText (source) 
      local accountName = getAccountName(getPlayerAccount(source)) 
      local characterindex = getCharacterIndexByCharacterName (accountName,charactername) 
      local playerRoot = xmlFindChild (root,"player",findPlayerIndexByName (tostring(accountName)))   
      local characterRoot = xmlNodeGetChildren (playerRoot,tonumber(characterindex)-1) 
      if (characterRoot) then 
        setPlayerNametagColor (source,tonumber(arg1),tonumber(arg2),tonumber(arg3)) 
        triggerClientEvent ("lolmodOpenInfoWindow",source,"Nametag color succesfully bought!") 
        xmlNodeSetAttribute (characterRoot,"cr",tonumber(arg1)) 
        xmlNodeSetAttribute (characterRoot,"cg",tonumber(arg2)) 
        xmlNodeSetAttribute (characterRoot,"cb",tonumber(arg3)) 
        xmlSaveFile (root) 
        takePlayerMoney (source,1250) 
    end 
  end 
end) 
---------- 
addEventHandler ("onClientMarkerHit",getRootElement(), 
function(hitElement,matchingDimension) 
  if (getElementType (hitElement) == "player") and (hitElement == getLocalPlayer()) then 
    if (source == nametagshopMarker) then 
      showCursor (true,true) 
      guiSetVisible (theNametagShopWindow,true) 
  end 
end) 

 theNametagShopWindow = guiCreateWindow(0.0575,0.2917,0.1963,0.375,"Nametag Shop",true) 
  guiWindowSetSizable(theNametagShopWindow,false) 
  theNametagShopWindowRedLabel = guiCreateLabel(0.051,0.1333,0.535,0.0933,"Red",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowRedLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowRedLabel,"top") 
  guiLabelSetHorizontalAlign(theNametagShopWindowRedLabel,"left",false) 
  theNametagShopWindowGreenLabel = guiCreateLabel(0.051,0.24,0.5096,0.1022,"Green",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowGreenLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowGreenLabel,"top") 
  guiLabelSetHorizontalAlign(theNametagShopWindowGreenLabel,"left",false) 
  theNametagShopWindowBlueLabel = guiCreateLabel(0.051,0.3511,0.5414,0.0978,"Blue",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowBlueLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowBlueLabel,"top") 
  guiLabelSetHorizontalAlign(theNametagShopWindowBlueLabel,"left",false) 
  theNametagShopWindowRedEdit = guiCreateEdit(0.6306,0.12,0.293,0.1022,"255",true,theNametagShopWindow) 
  theNametagShopWindowGreenEdit = guiCreateEdit(0.6306,0.2222,0.293,0.1022,"255",true,theNametagShopWindow) 
  theNametagShopWindowBlueEdit = guiCreateEdit(0.6306,0.3244,0.293,0.1022,"255",true,theNametagShopWindow) 
  guiEditSetMaxLength (theNametagShopWindowRedEdit,3) 
  guiEditSetMaxLength (theNametagShopWindowGreenEdit,3) 
  guiEditSetMaxLength (theNametagShopWindowBlueEdit,3) 
  theNametagShopWindowExampleTextLabel = guiCreateLabel(0.0573,0.4578,0.879,0.12,"Example Text",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowExampleTextLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowExampleTextLabel,"center") 
  guiLabelSetHorizontalAlign(theNametagShopWindowExampleTextLabel,"center",false) 
  theNametagShopWindowAcceptButton = guiCreateButton(0.0573,0.6089,0.8726,0.2089,"Buy Nametag\n1250$",true,theNametagShopWindow) 
  theNametagShopWindowCloseButton = guiCreateButton(0.0573,0.8356,0.8854,0.12,"Close",true,theNametagShopWindow) 
  guiSetVisible(theNametagShopWindow,false) 
  
nametagshopMarker = createMarker (-1951.66,642.98,45.5625,"cylinder",2,0,255,255,127) 
  
  
------- 
addEventHandler( 'onClientGUIClick', root, 
function() 
if (source == theNametagShopWindowAcceptButton) then 
    if (tonumber(guiGetText (theNametagShopWindowRedEdit)) ~= nil) and (tonumber(guiGetText (theNametagShopWindowGreenEdit)) ~= nil) and (tonumber(guiGetText (theNametagShopWindowBlueEdit)) ~= nil) then 
      guiSetVisible (theNametagShopWindow,false) 
      showCursor (false,false) 
      triggerServerEvent ("gameMenuButtonClick",getLocalPlayer(),"nametagShopAccept",tonumber(guiGetText (theNametagShopWindowRedEdit)),tonumber(guiGetText (theNametagShopWindowGreenEdit)),tonumber(guiGetText (theNametagShopWindowBlueEdit))) 
    end 
  elseif (source == theNametagShopWindowCloseButton) then 
    guiSetVisible (theNametagShopWindow,false) 
    showCursor (false,false) 
  elseif (buttonname == "theNametagShopWindowAcceptButton") then 
    if (getPlayerMoney (source) > 2499) then 
      local charactername = getPlayerNametagText (source) 
      local accountName = getAccountName(getPlayerAccount(source)) 
      local characterindex = getCharacterIndexByCharacterName (accountName,charactername) 
      local playerRoot = xmlFindChild (root,"player",findPlayerIndexByName (tostring(accountName)))   
      local characterRoot = xmlNodeGetChildren (playerRoot,tonumber(characterindex)-1) 
      if (characterRoot) then 
        setPlayerNametagColor (source,tonumber(arg1),tonumber(arg2),tonumber(arg3)) 
        triggerClientEvent ("lolmodOpenInfoWindow",source,"Nametag color succesfully bought!") 
        xmlNodeSetAttribute (characterRoot,"cr",tonumber(arg1)) 
        xmlNodeSetAttribute (characterRoot,"cg",tonumber(arg2)) 
        xmlNodeSetAttribute (characterRoot,"cb",tonumber(arg3)) 
        xmlSaveFile (root) 
        takePlayerMoney (source,1250) 
    end 
end 
  end 
end 
) 
---------- 
addEventHandler ("onClientMarkerHit",getRootElement(), 
function(hitElement,matchingDimension) 
  if (getElementType (hitElement) == "player") and (hitElement == getLocalPlayer()) then 
    if (source == nametagshopMarker) then 
      showCursor (true,true) 
      guiSetVisible (theNametagShopWindow,true) 
  end 
end 
end 
) 

ما نفعت يقلي

ERROR: Loading script failed: nametag/client.lua:2 '=' expected near 'guiWindowSetSizable'

 theNametagShopWindow = guiCreateWindow(0.0575,0.2917,0.1963,0.375,"Nametag Shop",true) 
  guiWindowSetSizable(theNametagShopWindow,false) 
  theNametagShopWindowRedLabel = guiCreateLabel(0.051,0.1333,0.535,0.0933,"Red",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowRedLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowRedLabel,"top") 
  guiLabelSetHorizontalAlign(theNametagShopWindowRedLabel,"left",false) 
  theNametagShopWindowGreenLabel = guiCreateLabel(0.051,0.24,0.5096,0.1022,"Green",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowGreenLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowGreenLabel,"top") 
  guiLabelSetHorizontalAlign(theNametagShopWindowGreenLabel,"left",false) 
  theNametagShopWindowBlueLabel = guiCreateLabel(0.051,0.3511,0.5414,0.0978,"Blue",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowBlueLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowBlueLabel,"top") 
  guiLabelSetHorizontalAlign(theNametagShopWindowBlueLabel,"left",false) 
  theNametagShopWindowRedEdit = guiCreateEdit(0.6306,0.12,0.293,0.1022,"255",true,theNametagShopWindow) 
  theNametagShopWindowGreenEdit = guiCreateEdit(0.6306,0.2222,0.293,0.1022,"255",true,theNametagShopWindow) 
  theNametagShopWindowBlueEdit = guiCreateEdit(0.6306,0.3244,0.293,0.1022,"255",true,theNametagShopWindow) 
  guiEditSetMaxLength (theNametagShopWindowRedEdit,3) 
  guiEditSetMaxLength (theNametagShopWindowGreenEdit,3) 
  guiEditSetMaxLength (theNametagShopWindowBlueEdit,3) 
  theNametagShopWindowExampleTextLabel = guiCreateLabel(0.0573,0.4578,0.879,0.12,"Example Text",true,theNametagShopWindow) 
  guiLabelSetColor(theNametagShopWindowExampleTextLabel,255,255,255) 
  guiLabelSetVerticalAlign(theNametagShopWindowExampleTextLabel,"center") 
  guiLabelSetHorizontalAlign(theNametagShopWindowExampleTextLabel,"center",false) 
  theNametagShopWindowAcceptButton = guiCreateButton(0.0573,0.6089,0.8726,0.2089,"Buy Nametag\n1250$",true,theNametagShopWindow) 
  theNametagShopWindowCloseButton = guiCreateButton(0.0573,0.8356,0.8854,0.12,"Close",true,theNametagShopWindow) 
  guiSetVisible(theNametagShopWindow,false) 
  
nametagshopMarker = createMarker (-1951.66,642.98,45.5625,"cylinder",2,0,255,255,127) 
  
  
------- 
addEventHandler( 'onClientGUIClick', root, 
function() 
if (source == theNametagShopWindowAcceptButton) then 
    if (tonumber(guiGetText (theNametagShopWindowRedEdit)) ~= nil) and (tonumber(guiGetText (theNametagShopWindowGreenEdit)) ~= nil) and (tonumber(guiGetText (theNametagShopWindowBlueEdit)) ~= nil) then 
      guiSetVisible (theNametagShopWindow,false) 
      showCursor (false,false) 
      triggerServerEvent ("gameMenuButtonClick",getLocalPlayer(),"nametagShopAccept",tonumber(guiGetText (theNametagShopWindowRedEdit)),tonumber(guiGetText (theNametagShopWindowGreenEdit)),tonumber(guiGetText (theNametagShopWindowBlueEdit))) 
    end 
  elseif (source == theNametagShopWindowCloseButton) then 
    guiSetVisible (theNametagShopWindow,false) 
    showCursor (false,false) 
  elseif (buttonname == "theNametagShopWindowAcceptButton") then 
    if (getPlayerMoney (source) > 2499) then 
      local charactername = getPlayerNametagText (source) 
      local accountName = getAccountName(getPlayerAccount(source)) 
      local characterindex = getCharacterIndexByCharacterName (accountName,charactername) 
      local playerRoot = xmlFindChild (root,"player",findPlayerIndexByName (tostring(accountName)))   
      local characterRoot = xmlNodeGetChildren (playerRoot,tonumber(characterindex)-1) 
      if (characterRoot) then 
        setPlayerNametagColor (source,tonumber(arg1),tonumber(arg2),tonumber(arg3)) 
        triggerClientEvent ("lolmodOpenInfoWindow",source,"Nametag color succesfully bought!") 
        xmlNodeSetAttribute (characterRoot,"cr",tonumber(arg1)) 
        xmlNodeSetAttribute (characterRoot,"cg",tonumber(arg2)) 
        xmlNodeSetAttribute (characterRoot,"cb",tonumber(arg3)) 
        xmlSaveFile (root) 
        takePlayerMoney (source,1250) 
    end 
end 
  end 
end 
) 
---------- 
addEventHandler ("onClientMarkerHit",getRootElement(), 
function(hitElement,matchingDimension) 
  if (getElementType (hitElement) == "player") and (hitElement == getLocalPlayer()) then 
    if (source == nametagshopMarker) then 
      showCursor (true,true) 
      guiSetVisible (theNametagShopWindow,true) 
  end 
end 
end 
) 

مجرب وشغال :wink:

Link to comment
كيف تبي يشتغل

وانت مسوي

كلنت وسيرفر بملف واحد

   triggerClientEvent ("lolmodOpenInfoWindow",source,"Nametag color succesfully bought!") 

هذا وش يسوي ؟ بالكلنت

طيب شوف عدلت شييء

theNametagShopWindow = guiCreateWindow(0.0575,0.2917,0.1963,0.375,"Nametag Shop",true) 
  
  guiWindowSetSizable(theNametagShopWindow, false)  
  theNametagShopWindowRedLabel = guiCreateLabel(0.051,0.1333,0.535,0.0933,"Red",true,theNametagShopWindow) 
   
  guiLabelSetColor(theNametagShopWindowRedLabel,255,255,255) 
   
  guiLabelSetVerticalAlign(theNametagShopWindowRedLabel,"top") 
   
  guiLabelSetHorizontalAlign(theNametagShopWindowRedLabel,"left",false) 
   
  theNametagShopWindowGreenLabel = guiCreateLabel(0.051,0.24,0.5096,0.1022,"Green",true,theNametagShopWindow) 
   
  guiLabelSetColor(theNametagShopWindowGreenLabel,255,255,255) 
  
  guiLabelSetVerticalAlign(theNametagShopWindowGreenLabel,"top") 
   
  guiLabelSetHorizontalAlign(theNametagShopWindowGreenLabel,"left",false) 
   
  theNametagShopWindowBlueLabel = guiCreateLabel(0.051,0.3511,0.5414,0.0978,"Blue",true,theNametagShopWindow) 
   
  guiLabelSetColor(theNametagShopWindowBlueLabel,255,255,255) 
  
  guiLabelSetVerticalAlign(theNametagShopWindowBlueLabel,"top") 
   
  guiLabelSetHorizontalAlign(theNametagShopWindowBlueLabel,"left",false) 
   
  theNametagShopWindowRedEdit = guiCreateEdit(0.6306,0.12,0.293,0.1022,"255",true,theNametagShopWindow) 
   
  theNametagShopWindowGreenEdit = guiCreateEdit(0.6306,0.2222,0.293,0.1022,"255",true,theNametagShopWindow) 
   
  theNametagShopWindowBlueEdit = guiCreateEdit(0.6306,0.3244,0.293,0.1022,"255",true,theNametagShopWindow) 
   
  guiEditSetMaxLength (theNametagShopWindowRedEdit,3) 
   
  guiEditSetMaxLength (theNametagShopWindowGreenEdit,3) 
   
  guiEditSetMaxLength (theNametagShopWindowBlueEdit,3) 
   
  theNametagShopWindowExampleTextLabel = guiCreateLabel(0.0573,0.4578,0.879,0.12,"Example Text",true,theNametagShopWindow) 
   
  guiLabelSetColor(theNametagShopWindowExampleTextLabel,255,255,255) 
   
  guiLabelSetVerticalAlign(theNametagShopWindowExampleTextLabel,"center") 
   
  guiLabelSetHorizontalAlign(theNametagShopWindowExampleTextLabel,"center",false) 
   
  theNametagShopWindowAcceptButton = guiCreateButton(0.0573,0.6089,0.8726,0.2089,"Buy Nametag\n1250$",true,theNametagShopWindow) 
   
  theNametagShopWindowCloseButton = guiCreateButton(0.0573,0.8356,0.8854,0.12,"Close",true,theNametagShopWindow) 
   
  guiSetVisible(theNametagShopWindow,false) 
  
  
  
nametagshopMarker = createMarker (-1951.66,642.98,45.5625,"cylinder",2,0,255,255,127) 
  
  
  
  
------- 
  
addEventHandler( 'onClientGUIClick', root, 
  
function() 
  
if (source == theNametagShopWindowAcceptButton) then 
     
   if (tonumber(guiGetText (theNametagShopWindowRedEdit)) ~= nil) and (tonumber(guiGetText (theNametagShopWindowGreenEdit)) ~= nil) and (tonumber(guiGetText (theNametagShopWindowBlueEdit)) ~= nil) then 
  
      guiSetVisible (theNametagShopWindow,false) 
  
      showCursor (false,false) 
  
      triggerServerEvent ("gameMenuButtonClick",getLocalPlayer(),"nametagShopAccept",tonumber(guiGetText (theNametagShopWindowRedEdit)),tonumber(guiGetText (theNametagShopWindowGreenEdit)),tonumber(guiGetText (theNametagShopWindowBlueEdit))) 
  
    end 
  
  elseif (source == theNametagShopWindowCloseButton) then 
  
    guiSetVisible (theNametagShopWindow,false) 
  
    showCursor (false,false) 
  elseif (buttonname == "theNametagShopWindowAcceptButton") then 
  
    if (getPlayerMoney (source) > 2499) then 
  
      local charactername = getPlayerNametagText (source) 
  
      local accountName = getAccountName(getPlayerAccount(source)) 
  
      local characterindex = getCharacterIndexByCharacterName (accountName,charactername) 
  
      local playerRoot = xmlFindChild (root,"player",findPlayerIndexByName (tostring(accountName))) 
   
      local characterRoot = xmlNodeGetChildren (playerRoot,tonumber(characterindex)-1) 
  
      if (characterRoot) then 
  
        setPlayerNametagColor (source,tonumber(arg1),tonumber(arg2),tonumber(arg3)) 
  
        triggerClientEvent ("lolmodOpenInfoWindow",source,"Nametag color succesfully bought!") 
  
        xmlNodeSetAttribute (characterRoot,"cr",tonumber(arg1)) 
  
        xmlNodeSetAttribute (characterRoot,"cg",tonumber(arg2)) 
  
        xmlNodeSetAttribute (characterRoot,"cb",tonumber(arg3)) 
  
        xmlSaveFile (root) 
  
        takePlayerMoney (source,1250) 
  
    end 
  
end 
  
  end 
  
end 
) 
  
  
---------- 
  
addEventHandler ("onClientMarkerHit",getRootElement(), 
  
function(hitElement,matchingDimension) 
  
  if (getElementType (hitElement) == "player") and (hitElement == getLocalPlayer()) then 
  
    if (source == nametagshopMarker) then 
  
      showCursor (true,true) 
  
      guiSetVisible (theNametagShopWindow,true) 
  end 
  
end 
  
end 
) 

Link to comment
      local accountName = getAccountName(getPlayerAccount(source)) 
  

:oops::redhotevil:

ايه الخطاء فيها

Server-only function

مش شغال شوف بيجيلي ايه دلوقتي بعد لما ضفة السيرفر

debugserver

ERROR: Loading script failed: nametag/server.lua:6: unexpected symbol near '

debugclient

ERROR: Loading script failed: nametag/client.lua:2 '=' expected near 'guiWindowSetSizable'

server side

addEventHandler( 'onClientGUIClick', root, 
  
function() 
  
if (source == theNametagShopWindowAcceptButton) then 
     
   if (tonumber(guiGetText (theNametagShopWindowRedEdit)) ~= nil) and (tonumber(guiGetText (theNametagShopWindowGreenEdit)) ~= nil) and (tonumber(guiGetText (theNametagShopWindowBlueEdit)) ~= nil) then 
  
      guiSetVisible (theNametagShopWindow,false) 
  
      showCursor (false,false) 
  
      triggerServerEvent ("gameMenuButtonClick",getLocalPlayer(),"nametagShopAccept",tonumber(guiGetText (theNametagShopWindowRedEdit)),tonumber(guiGetText (theNametagShopWindowGreenEdit)),tonumber(guiGetText (theNametagShopWindowBlueEdit))) 
  
    end 
  
  elseif (source == theNametagShopWindowCloseButton) then 
  
    guiSetVisible (theNametagShopWindow,false) 
  
    showCursor (false,false) 
  elseif (buttonname == "theNametagShopWindowAcceptButton") then 
  
    if (getPlayerMoney (source) > 2499) then 
  
      local charactername = getPlayerNametagText (source) 
  
      local accountName = getAccountName(getPlayerAccount(source)) 
  
      local characterindex = getCharacterIndexByCharacterName (accountName,charactername) 
  
      local playerRoot = xmlFindChild (root,"player",findPlayerIndexByName (tostring(accountName))) 
   
      local characterRoot = xmlNodeGetChildren (playerRoot,tonumber(characterindex)-1) 
  
      if (characterRoot) then 
  
        setPlayerNametagColor (source,tonumber(arg1),tonumber(arg2),tonumber(arg3)) 
  
        triggerClientEvent ("lolmodOpenInfoWindow",source,"Nametag color succesfully bought!") 
  
        xmlNodeSetAttribute (characterRoot,"cr",tonumber(arg1)) 
  
        xmlNodeSetAttribute (characterRoot,"cg",tonumber(arg2)) 
  
        xmlNodeSetAttribute (characterRoot,"cb",tonumber(arg3)) 
  
        xmlSaveFile (root) 
  
        takePlayerMoney (source,1250) 
  
  end 
  
end 
  
end 
) 

client side

theNametagShopWindow = guiCreateWindow(0.0575,0.2917,0.1963,0.375,"Nametag Shop",true) 
  
  guiWindowSetSizable(theNametagShopWindow, false)  
  theNametagShopWindowRedLabel = guiCreateLabel(0.051,0.1333,0.535,0.0933,"Red",true,theNametagShopWindow) 
   
  guiLabelSetColor(theNametagShopWindowRedLabel,255,255,255) 
   
  guiLabelSetVerticalAlign(theNametagShopWindowRedLabel,"top") 
   
  guiLabelSetHorizontalAlign(theNametagShopWindowRedLabel,"left",false) 
   
  theNametagShopWindowGreenLabel = guiCreateLabel(0.051,0.24,0.5096,0.1022,"Green",true,theNametagShopWindow) 
   
  guiLabelSetColor(theNametagShopWindowGreenLabel,255,255,255) 
  
  guiLabelSetVerticalAlign(theNametagShopWindowGreenLabel,"top") 
   
  guiLabelSetHorizontalAlign(theNametagShopWindowGreenLabel,"left",false) 
   
  theNametagShopWindowBlueLabel = guiCreateLabel(0.051,0.3511,0.5414,0.0978,"Blue",true,theNametagShopWindow) 
   
  guiLabelSetColor(theNametagShopWindowBlueLabel,255,255,255) 
  
  guiLabelSetVerticalAlign(theNametagShopWindowBlueLabel,"top") 
   
  guiLabelSetHorizontalAlign(theNametagShopWindowBlueLabel,"left",false) 
   
  theNametagShopWindowRedEdit = guiCreateEdit(0.6306,0.12,0.293,0.1022,"255",true,theNametagShopWindow) 
   
  theNametagShopWindowGreenEdit = guiCreateEdit(0.6306,0.2222,0.293,0.1022,"255",true,theNametagShopWindow) 
   
  theNametagShopWindowBlueEdit = guiCreateEdit(0.6306,0.3244,0.293,0.1022,"255",true,theNametagShopWindow) 
   
  guiEditSetMaxLength (theNametagShopWindowRedEdit,3) 
   
  guiEditSetMaxLength (theNametagShopWindowGreenEdit,3) 
   
  guiEditSetMaxLength (theNametagShopWindowBlueEdit,3) 
   
  theNametagShopWindowExampleTextLabel = guiCreateLabel(0.0573,0.4578,0.879,0.12,"Example Text",true,theNametagShopWindow) 
   
  guiLabelSetColor(theNametagShopWindowExampleTextLabel,255,255,255) 
   
  guiLabelSetVerticalAlign(theNametagShopWindowExampleTextLabel,"center") 
   
  guiLabelSetHorizontalAlign(theNametagShopWindowExampleTextLabel,"center",false) 
   
  theNametagShopWindowAcceptButton = guiCreateButton(0.0573,0.6089,0.8726,0.2089,"Buy Nametag\n1250$",true,theNametagShopWindow) 
   
  theNametagShopWindowCloseButton = guiCreateButton(0.0573,0.8356,0.8854,0.12,"Close",true,theNametagShopWindow) 
   
  guiSetVisible(theNametagShopWindow,false) 
  
  
  
nametagshopMarker = createMarker (-1951.66,642.98,45.5625,"cylinder",2,0,255,255,127) 
  
  
  
  
  
---------- 
  
addEventHandler ("onClientMarkerHit",getRootElement(), 
  
function(hitElement,matchingDimension) 
  
  if (getElementType (hitElement) == "player") and (hitElement == getLocalPlayer()) then 
  
    if (source == nametagshopMarker) then 
  
      showCursor (true,true) 
  
      guiSetVisible (theNametagShopWindow,true) 
  end 
  
end 
  
end 
) 

Link to comment
p_109r13f1.png

بيصير كلينت وسيرفر في اصدار 1.6

ممكن رابط التحديثات هذا؟

هع بغيت احط الرد بالموضوع هذا

https://forum.multitheftauto.com/viewtopic.php?f=160&t=98582

يوم تخش الكلينت فنكشن , انزل لوظائف البيد وشوفه

وتقدر تضغط على الرابط الي حاطينه بالفنكشن , يجيك على شكل صورة , اقصد الي بالصورة فوق ض1

https://buildinfo.mtasa.com/?Author=&Branch=master&Revision=7848

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...