 
        sultantion
Members- 
                Posts22
- 
                Joined
- 
                Last visited
Details
- 
											
												Gang
												left
sultantion's Achievements
 
									Civilian (7/54)
0
Reputation
- 
	Hi, Whats wrong with this lua? client.lua:13: Bad 'sound/player' pointer @ 'setSoundVolume'(1) client.lua:17: Bad 'sound/player' pointer @ 'setSoundVolume'(1) function startMusic() setRadioChannel(0) song = playSound("music.mp3",true) end function makeRadioStayOff() setRadioChannel(0) cancelEvent() end function toggleSong() if not songOff then setSoundVolume(song,0) songOff = true removeEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) else setSoundVolume(song,1) songOff = false setRadioChannel(0) addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) end end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),startMusic) addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) addEventHandler("onClientPlayerVehicleEnter",getRootElement(),makeRadioStayOff) addCommandHandler("music",toggleSong) bindKey("n","down","music")
- 
	Hi There, How can i change the colour of Scoreboard ? i've already changed R,G,B colors but nothing works. settings = { ["useanimation"] = nil, ["toggleable"] = nil, ["showserverinfo"] = nil, ["showgamemodeinfo"] = nil, ["showteams"] = nil, ["usecolors"] = nil, ["drawspeed"] = nil, ["scale"] = nil, ["columnfont"] = nil, ["contentfont"] = nil, ["teamfont"] = nil, ["serverinfofont"] = nil, ["bg_color"] = {}, ["selection_color"] = {}, ["highlight_color"] = {}, ["header_color"] = {}, ["team_color"] = {}, ["border_color"] = {}, ["serverinfo_color"] = {}, ["content_color"] = {} } defaultSettings = { ["useanimation"] = true, ["toggleable"] = false, ["showserverinfo"] = false, ["showgamemodeinfo"] = false, ["showteams"] = true, ["usecolors"] = true, ["drawspeed"] = 1.5, ["scale"] = 1.0, ["columnfont"] = "default-bold", ["contentfont"] = "default-bold", ["teamfont"] = "clear", ["serverinfofont"] = "default", ["bg_color"] = { ["r"] = 0, ["g"] = 0, ["b"] = 0, ["a"] = 170 }, ["selection_color"] = { ["r"] = 82, ["g"] = 103, ["b"] = 188, ["a"] = 170 }, ["highlight_color"] = { ["r"] = 255, ["g"] = 255, ["b"] = 255, ["a"] = 50 }, ["header_color"] = { ["r"] = 100, ["g"] = 100, ["b"] = 100, ["a"] = 255 }, ["team_color"] = { ["r"] = 100, ["g"] = 100, ["b"] = 100, ["a"] = 100 }, ["border_color"] = { ["r"] = 100, ["g"] = 100, ["b"] = 100, ["a"] = 50 }, ["serverinfo_color"] = { ["r"] = 150, ["g"] = 150, ["b"] = 150, ["a"] = 255 }, ["content_color"] = { ["r"] = 255, ["g"] = 255, ["b"] = 255, ["a"] = 255 } } tempColors = { ["bg_color"] = { ["r"] = nil, ["g"] = nil, ["b"] = nil, ["a"] = nil }, ["selection_color"] = { ["r"] = nil, ["g"] = nil, ["b"] = nil, ["a"] = nil }, ["highlight_color"] = { ["r"] = nil, ["g"] = nil, ["b"] = nil, ["a"] = nil }, ["header_color"] = { ["r"] = nil, ["g"] = nil, ["b"] = nil, ["a"] = nil }, ["team_color"] = { ["r"] = nil, ["g"] = nil, ["b"] = nil, ["a"] = nil }, ["border_color"] = { ["r"] = nil, ["g"] = nil, ["b"] = nil, ["a"] = nil }, ["serverinfo_color"] = { ["r"] = nil, ["g"] = nil, ["b"] = nil, ["a"] = nil }, ["content_color"] = { ["r"] = nil, ["g"] = nil, ["b"] = nil, ["a"] = nil } } MAX_DRAWSPEED = 4.0 MIN_DRAWSPEED = 0.5 MAX_SCALE = 2.5 MIN_SCALE = 0.5 fontIndexes = { ["column"] = 1, ["content"] = 1, ["team"] = 1, ["serverinfo"] = 1 } fontNames = { "default", "default-bold", "clear", "arial", "sans","pricedown", "bankgothic", "diploma", "beckett" } function readScoreboardSettings() local settingsFile = xmlLoadFile( "settings.xml" ) if not settingsFile then settingsFile = xmlCreateFile( "settings.xml", "settings" ) if not settingsFile then return false end local useanimationTag = xmlCreateChild( settingsFile, "useanimation" ) xmlNodeSetValue( useanimationTag, tostring( defaultSettings.useanimation ) ) local toggleableTag = xmlCreateChild( settingsFile, "toggleable" ) xmlNodeSetValue( toggleableTag, tostring( defaultSettings.toggleable ) ) local showserverinfoTag = xmlCreateChild( settingsFile, "showserverinfo" ) xmlNodeSetValue( showserverinfoTag, tostring( defaultSettings.showserverinfo ) ) local showgamemodeinfoTag = xmlCreateChild( settingsFile, "showgamemodeinfo" ) xmlNodeSetValue( showgamemodeinfoTag, tostring( defaultSettings.showgamemodeinfo ) ) local showteamsTag = xmlCreateChild( settingsFile, "showteams" ) xmlNodeSetValue( showteamsTag, tostring( defaultSettings.showteams ) ) local usecolorsTag = xmlCreateChild( settingsFile, "usecolors" ) xmlNodeSetValue( usecolorsTag, tostring( defaultSettings.usecolors ) ) local drawspeedTag = xmlCreateChild( settingsFile, "drawspeed" ) xmlNodeSetValue( drawspeedTag, tostring( defaultSettings.drawspeed ) ) local scaleTag = xmlCreateChild( settingsFile, "scale" ) xmlNodeSetValue( scaleTag, tostring( defaultSettings.scale ) ) local columnfontTag = xmlCreateChild( settingsFile, "columnfont" ) xmlNodeSetValue( columnfontTag, tostring( defaultSettings.columnfont ) ) local contentfontTag = xmlCreateChild( settingsFile, "contentfont" ) xmlNodeSetValue( contentfontTag, tostring( defaultSettings.contentfont ) ) local teamfontTag = xmlCreateChild( settingsFile, "teamfont" ) xmlNodeSetValue( teamfontTag, tostring( defaultSettings.teamfont ) ) local serverinfofontTag = xmlCreateChild( settingsFile, "serverinfofont" ) xmlNodeSetValue( serverinfofontTag, tostring( defaultSettings.serverinfofont ) ) local bg_colorTag = xmlCreateChild( settingsFile, "bg_color" ) xmlNodeSetAttribute( bg_colorTag, "r", tostring( defaultSettings.bg_color.r ) ) xmlNodeSetAttribute( bg_colorTag, "g", tostring( defaultSettings.bg_color.g ) ) xmlNodeSetAttribute( bg_colorTag, "b", tostring( defaultSettings.bg_color.b ) ) xmlNodeSetAttribute( bg_colorTag, "a", tostring( defaultSettings.bg_color.a ) ) local selection_colorTag = xmlCreateChild( settingsFile, "selection_color" ) xmlNodeSetAttribute( selection_colorTag, "r", tostring( defaultSettings.selection_color.r ) ) xmlNodeSetAttribute( selection_colorTag, "g", tostring( defaultSettings.selection_color.g ) ) xmlNodeSetAttribute( selection_colorTag, "b", tostring( defaultSettings.selection_color.b ) ) xmlNodeSetAttribute( selection_colorTag, "a", tostring( defaultSettings.selection_color.a ) ) local highlight_colorTag = xmlCreateChild( settingsFile, "highlight_color" ) xmlNodeSetAttribute( highlight_colorTag, "r", tostring( defaultSettings.highlight_color.r ) ) xmlNodeSetAttribute( highlight_colorTag, "g", tostring( defaultSettings.highlight_color.g ) ) xmlNodeSetAttribute( highlight_colorTag, "b", tostring( defaultSettings.highlight_color.b ) ) xmlNodeSetAttribute( highlight_colorTag, "a", tostring( defaultSettings.highlight_color.a ) ) local header_colorTag = xmlCreateChild( settingsFile, "header_color" ) xmlNodeSetAttribute( header_colorTag, "r", tostring( defaultSettings.header_color.r ) ) xmlNodeSetAttribute( header_colorTag, "g", tostring( defaultSettings.header_color.g ) ) xmlNodeSetAttribute( header_colorTag, "b", tostring( defaultSettings.header_color.b ) ) xmlNodeSetAttribute( header_colorTag, "a", tostring( defaultSettings.header_color.a ) ) local team_colorTag = xmlCreateChild( settingsFile, "team_color" ) xmlNodeSetAttribute( team_colorTag, "r", tostring( defaultSettings.team_color.r ) ) xmlNodeSetAttribute( team_colorTag, "g", tostring( defaultSettings.team_color.g ) ) xmlNodeSetAttribute( team_colorTag, "b", tostring( defaultSettings.team_color.b ) ) xmlNodeSetAttribute( team_colorTag, "a", tostring( defaultSettings.team_color.a ) ) local border_colorTag = xmlCreateChild( settingsFile, "border_color" ) xmlNodeSetAttribute( border_colorTag, "r", tostring( defaultSettings.border_color.r ) ) xmlNodeSetAttribute( border_colorTag, "g", tostring( defaultSettings.border_color.g ) ) xmlNodeSetAttribute( border_colorTag, "b", tostring( defaultSettings.border_color.b ) ) xmlNodeSetAttribute( border_colorTag, "a", tostring( defaultSettings.border_color.a ) ) local serverinfo_colorTag = xmlCreateChild( settingsFile, "serverinfo_color" ) xmlNodeSetAttribute( serverinfo_colorTag, "r", tostring( defaultSettings.serverinfo_color.r ) ) xmlNodeSetAttribute( serverinfo_colorTag, "g", tostring( defaultSettings.serverinfo_color.g ) ) xmlNodeSetAttribute( serverinfo_colorTag, "b", tostring( defaultSettings.serverinfo_color.b ) ) xmlNodeSetAttribute( serverinfo_colorTag, "a", tostring( defaultSettings.serverinfo_color.a ) ) local content_colorTag = xmlCreateChild( settingsFile, "content_color" ) xmlNodeSetAttribute( content_colorTag, "r", tostring( defaultSettings.content_color.r ) ) xmlNodeSetAttribute( content_colorTag, "g", tostring( defaultSettings.content_color.g ) ) xmlNodeSetAttribute( content_colorTag, "b", tostring( defaultSettings.content_color.b ) ) xmlNodeSetAttribute( content_colorTag, "a", tostring( defaultSettings.content_color.a ) ) xmlSaveFile( settingsFile ) end local useanimationTag = xmlFindChild( settingsFile, "useanimation", 0 ) if not useanimationTag then useanimationTag = xmlCreateChild( settingsFile, "useanimation" ) xmlNodeSetValue( useanimationTag, tostring( defaultSettings.useanimation ) ) xmlSaveFile( settingsFile ) end local toggleableTag = xmlFindChild( settingsFile, "toggleable", 0 ) if not toggleableTag then toggleableTag = xmlCreateChild( settingsFile, "toggleable" ) xmlNodeSetValue( toggleableTag, tostring( defaultSettings.toggleable ) ) xmlSaveFile( settingsFile ) end local showserverinfoTag = xmlFindChild( settingsFile, "showserverinfo", 0 ) if not showserverinfoTag then showserverinfoTag = xmlCreateChild( settingsFile, "showserverinfo" ) xmlNodeSetValue( showserverinfoTag, tostring( defaultSettings.showserverinfo ) ) xmlSaveFile( settingsFile ) end local showgamemodeinfoTag = xmlFindChild( settingsFile, "showgamemodeinfo", 0 ) if not showgamemodeinfoTag then showgamemodeinfoTag = xmlCreateChild( settingsFile, "showgamemodeinfo" ) xmlNodeSetValue( showgamemodeinfoTag, tostring( defaultSettings.showgamemodeinfo ) ) xmlSaveFile( settingsFile ) end local showteamsTag = xmlFindChild( settingsFile, "showteams", 0 ) if not showteamsTag then showteamsTag =
- 
	./mta-server64 -d
- 
	احسبه يتكلم عن التاب , انا ابي اغير لون التاب بس
- 
	السلام عليكم , ياعيال ابي اضيف كود الالوان للسطر 72 , 113 currentGamemode = nil currentGamemodeMap = nil nextGamemode = nil nextGamemodeMap = nil setGameType(false) setMapName("None") rootElement = getRootElement() addEvent("onGamemodeStart") addEvent("onGamemodeStop") addEvent("onGamemodeMapStart") addEvent("onGamemodeMapStop") addEventHandler("onResourcePreStart", rootElement, function (startingResource) --Is starting resource a gamemode? if isGamemode(startingResource) then --Check if another gamemode is running already if getRunningGamemode() and getRunningGamemode() ~= startingResource then -- Initiate a new changemode sequence and cancel this event outputMapManager( "Initiating changemode from '" .. getResourceName(getRunningGamemode()) .. "' to '" .. getResourceName(startingResource) .. "'" ) changeGamemode(startingResource) cancelEvent(true) end elseif isMap(startingResource) then --Check if another map is running already if getRunningGamemodeMap() and getRunningGamemodeMap() ~= startingResource then -- Initiate a new changemap sequence and cancel this event if isGamemodeCompatibleWithMap ( getRunningGamemode(), startingResource ) then outputMapManager( "Initiating changemap from '" .. getResourceName(getRunningGamemodeMap()) .. "' to '" .. getResourceName(startingResource) .. "'" ) changeGamemodeMap(startingResource) end cancelEvent(true) end end end ) addEventHandler("onPlayerJoin", rootElement, function() if get("currentmap") and getRunningGamemode() and getRunningGamemodeMap() then outputMapManager( "Currently playing: " .. (getResourceInfo(getRunningGamemode(), "name") or getResourceName(getRunningGamemode())) .. " - " .. (getResourceInfo(getRunningGamemodeMap(), "name") or getResourceName(getRunningGamemodeMap())), source ) end end ) addEventHandler("onResourceStart", rootElement, function (startedResource) --Is this resource a gamemode? if isGamemode(startedResource) then --Check no gamemode is running already if getRunningGamemode() then return end if triggerEvent("onGamemodeStart", getResourceRootElement(startedResource), startedResource) then currentGamemode = startedResource --Setup our announcements local gamemodeName = getResourceInfo(currentGamemode, "name") or getResourceName(currentGamemode) if get("ASE") then setGameType(gamemodeName) end if get("messages") then local name = getInstigatorName ( " by " ) or "" outputMapManager("Gamemode '"..gamemodeName.."' started" .. name .. "." ) end --We need to wait a while to see if any maps were started. If not, lets try and start a random one setTimer( function() if not getRunningGamemodeMap() then --Lets check if there are any maps for this gamemode local maps = getMapsCompatibleWithGamemode(getRunningGamemode()) --If we have any, we'll start a random one if #maps > 0 then changeGamemodeMap (maps[math.random(1,#maps)]) end end end, 50, 1 ) else currentGamemode = nil end elseif isMap(startedResource) then --If its a map --Make sure there is a gamemode running if not getRunningGamemode() then return end --Is there a map running already? if getRunningGamemodeMap() then return end --Is it compatible with our gamemode? if isGamemodeCompatibleWithMap ( getRunningGamemode(), startedResource ) then --Lets link the map with the gamemode if ( triggerEvent("onGamemodeMapStart", getResourceRootElement(startedResource), startedResource) ) then currentGamemodeMap = startedResource --Setup our announcements local gamemodeMapName = getResourceInfo(currentGamemodeMap, "name") or getResourceName(currentGamemodeMap) applyMapSettings( currentGamemodeMap ) if get("ASE") then setMapName(gamemodeMapName) end if get("messages") then local name = getInstigatorName ( " by " ) or "" outputMapManager("Map '"..gamemodeMapName.."' started" .. name .. ".") end else currentGamemodeMap = nil end end end end ) addEventHandler("onResourceStop", rootElement, function (stoppedResource) -- Incase the resource being stopped has been deleted local stillExists = false for i, res in ipairs(getResources()) do if res == stoppedResource then stillExists = true break end end if not stillExists then return end local resourceRoot = getResourceRootElement(stoppedResource) if stoppedResource == currentGamemode then triggerEvent("onGamemodeStop", resourceRoot, currentGamemode) currentGamemode = nil setGameType(false) if currentGamemodeMap then stopResource(currentGamemodeMap) elseif nextGamemode then startGamemodeT(nextGamemode) nextGamemode = nil if nextGamemodeMap then startGamemodeMapT(nextGamemodeMap) nextGamemodeMap = nil end end elseif stoppedResource == currentGamemodeMap then triggerEvent("onGamemodeMapStop", resourceRoot, currentGamemodeMap) currentGamemodeMap = nil resetMapInfo() setMapName("None") if nextGamemode then startGamemodeT(nextGamemode) nextGamemode = nil if nextGamemodeMap then startGamemodeMapT(nextGamemodeMap) nextGamemodeMap = nil end elseif nextGamemodeMap then startGamemodeMapT(nextGamemodeMap) nextGamemodeMap = nil end end end ) function changeGamemodeMap_cmd(source, command, ...) local mapName = #{...}>0 and table.concat({...},' ') or nil source = source or serverConsole local map if mapName then map = getMapFromName(mapName) if not isMap(map) then if (refreshResources and hasObjectPermissionTo(getThisResource(), "function.refreshResources", false)) then outputMapManager("'"..mapName.."' is not a valid map.", source) else outputMapManager("'"..mapName.."' is not a valid map. Use the refresh command and try again", source) end return false end else outputMapManager("Usage: /"..command.." map",source) return false end local gamemode = currentGamemode if not isGamemode(gamemode) then outputMapManager("No gamemode is running.",source) elseif not isMapCompatibleWithGamemode(map, gamemode) then outputMapManager("Map '"..getResourceName(map).. "' is not compatible with '"..getResourceName(gamemode).."'.",source) else setInstigator( source ) changeGamemodeMap(map, gamemode) end end addCommandHandler("changemap", changeGamemodeMap_cmd, true) function changeGamemode_cmd(source, command, gamemodeName,...) local mapName = #{...}>0 and table.concat({...},' ') or nil source = source or serverConsole local gamemode if gamemodeName then gamemode = getResourceFromName(gamemodeName) if not isGamemode(gamemode) then if (refreshResources and hasObjectPermissionTo(getThisResource(), "function.refreshResources", false)) then refreshResources(false) gamemode = getResourceFromName(gamemodeName) if not isGamemode(gamemode) then outputMapManager("'"..gamemodeName.."' is not a valid gamemode.", source) return false end else outputMapManager("'"..gamemodeName.."' is not a valid gamemode. Use the refresh command and try again", source) return false end end else outputMapManager("Usage: /"..command.." gamemode [map]",source) return false end local map if mapName then map = getMapFromName(mapName) if not isMap(map) then if (refreshResources and hasObjectPermissionTo(getThisResource(), "function.refreshResources", false)) then outputMapManager("'"..mapName.."' is not a valid map.", source) else outputMapManager("'"..mapName.."' is not a valid map. Use the refresh command and try again", source) end return false end end setInstigator( source ) changeGamemode(gamemode,map) end addCommandHandler("gamemode", changeGamemode_cmd, true) addCommandHandler("changemode", changeGamemode_cmd, true) function stopGamemode_cmd(source) source = source or serverConsole
- 
	طيب اخر شي , اسم الاعب اللي يجي فوقه ابيه نفس المزخرف ولاهنت ياعناد
- 
	ي لبى قلبك ي شششيخ
- 
	مابي جاهز بس اشرح زي الناس
- 
	مافهمت للاسف
- 
	السلام عليكم , هذا سكربت تقدر تحط نك مزخرف بالشات بس ابيه بالادمنية والتاب والتاج يكون مزخرف addCommandHandler ( "supernick", function ( player, _, nick ) if ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "Admin" ) ) ) then if ( nick ) and ( string.len ( nick ) <= 80 ) then setElementData ( player, "CustomTag", tostring ( nick ) ) outputChatBox ( "[superNick]#FFFFFF Your SuperNick is: " .. tostring ( nick ) .. " #FFFFFF.", player, 255, 136, 0, true ) end else outputChatBox ( "[ERROR] #ffffffOops! You are not allowed to do this.", player, 255, 0, 0, true ) end end ) addEventHandler ( "onPlayerChat", root, function ( msg ) local r, g, b = getPlayerNametagColor ( source ) local value = getElementData ( source, "CustomTag" ) if ( value ) then cancelEvent ( ) outputChatBox( value .. " : #FFFFFF" .. msg, root, r, g, b, true ) end end ) addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, player in ipairs ( getElementsByType ( "player" ) ) do local acc = getPlayerAccount ( player ) if ( acc ) and not ( isGuestAccount ( acc ) ) and ( getAccountData ( acc, "CustomTag" ) ) then setElementData ( player, "CustomTag", getAccountData( acc, "CustomTag" ) ) end end end ) addEventHandler ( "onPlayerLogin", root, function ( _, acc ) if ( getAccountData ( acc, "CustomTag" ) ) then setElementData ( source, "CustomTag", getAccountData ( acc, "CustomTag" ) ) end end ) addEventHandler ( "onPlayerQuit", root, function ( ) local acc = getPlayerAccount ( source ) if ( acc ) and not ( isGuestAccount ( acc ) ) and ( getElementData ( source, "CustomTag" ) ) then setAccountData ( acc, "CustomTag", getElementData ( source, "CustomTag" ) ) end end ) فيدوني ي عيال
