#TeKa Posted April 19, 2016 Share Posted April 19, 2016 (edited) السلام عليكم انا عملت مود تغير اللون الاسم بس ما يشتغل يطلعلي في 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 April 19, 2016 by Guest Link to comment
MR.GRAND Posted April 19, 2016 Share Posted April 19, 2016 السلام عليكمانا عملت مود تغير اللون الاسم بس ما يشتغل يطلعلي في 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
#TeKa Posted April 19, 2016 Author Share Posted April 19, 2016 السلام عليكمانا عملت مود تغير اللون الاسم بس ما يشتغل يطلعلي في 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
MR.GRAND Posted April 19, 2016 Share Posted April 19, 2016 السلام عليكمانا عملت مود تغير اللون الاسم بس ما يشتغل يطلعلي في 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 ) مجرب وشغال Link to comment
#TeKa Posted April 19, 2016 Author Share Posted April 19, 2016 و مش شغاله معايا ليه ارفعها و اعطيني الرابط Link to comment
#|_oskar_|# Posted April 19, 2016 Share Posted April 19, 2016 حاطت كلنت مع سيرفر وتبيه يشتغل ؟ Link to comment
#TeKa Posted April 19, 2016 Author Share Posted April 19, 2016 حاطت كلنت مع سيرفر وتبيه يشتغل ؟ اختصار مو مهم اني احطهم في ال Server هو شغل بس يجيلي كلام في دي بق اقراء فوق و تعرف Link to comment
Me[Z]oO Posted April 19, 2016 Share Posted April 19, 2016 كيف تبي يشتغل وانت مسوي كلنت وسيرفر بملف واحد triggerClientEvent ("lolmodOpenInfoWindow",source,"Nametag color succesfully bought!") هذا وش يسوي ؟ بالكلنت Link to comment
#TeKa Posted April 19, 2016 Author Share Posted April 19, 2016 كيف تبي يشتغلوانت مسوي كلنت وسيرفر بملف واحد 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
#TeKa Posted April 19, 2016 Author Share Posted April 19, 2016 شوفو بيطعلي ايه في debugscript ERROR: Loading script failed: nametag/client.lua:3: '=' expected near 'guiWindowSetSizable' Link to comment
Me[Z]oO Posted April 19, 2016 Share Posted April 19, 2016 local accountName = getAccountName(getPlayerAccount(source)) Link to comment
#TeKa Posted April 19, 2016 Author Share Posted April 19, 2016 local accountName = getAccountName(getPlayerAccount(source)) ايه الخطاء فيها Link to comment
Me[Z]oO Posted April 19, 2016 Share Posted April 19, 2016 local accountName = getAccountName(getPlayerAccount(source)) ايه الخطاء فيها Server-only function Link to comment
#TeKa Posted April 19, 2016 Author Share Posted April 19, 2016 local accountName = getAccountName(getPlayerAccount(source)) ايه الخطاء فيها 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
Abdul KariM Posted April 19, 2016 Share Posted April 19, 2016 بيصير كلينت وسيرفر في اصدار 1.6 Link to comment
Me[Z]oO Posted April 19, 2016 Share Posted April 19, 2016 بيصير كلينت وسيرفر في اصدار 1.6 ممكن رابط التحديثات هذا؟ Link to comment
Abdul KariM Posted April 19, 2016 Share Posted April 19, 2016 بيصير كلينت وسيرفر في اصدار 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
3SM Posted April 19, 2016 Share Posted April 19, 2016 تعال سكايب لكي ما نسوي زحمة هون elkihel.aassim 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