TheBite
Members-
Posts
140 -
Joined
-
Last visited
Everything posted by TheBite
-
Yeah, but many servers have edited gui etc. how do they? I want to test it..
-
Hey to all, I have some problems in console when starts, pls help me to resolve it: 1) WARNING: offedit/offedit.lua(Line 41) [server] unbanSerial no longer works. Please manually update this. Refer to the wiki for details 2) ERROR: [managers]\mapmanager\mapmanager_main.lua:75 mapmanager: map resource could not be started. 3) WARNING: countryid\s_country.lua:103: Bad argument @ 'getPlayerIP' [Expected element at argument 1, got nil] WARNING: countryid\s_country.lua:106: Bad argument @ 'gettok' WARNING: countryid\s_country.lua:107: Bad argument @ 'gettok' ERROR: countryid\s_country.lua:107: attempt to perform arithmetic on a boolean value Thanks
-
Hey to all, I have an (other) problem, In server I pressed false player and I banned my IP , now how to unban me?
-
Hmm I have and another question: in tab resources the button "stop all resources" is gray and disabled, and in my friend server is enabled. How to enable in my server too?
-
Yes, I have admin panel 1.3 and he is have 1.3.1 but how to update it??
-
Hey to all, me, in acl i'm in group "admin" in my server and my friend in thier server is in group "admin" (same) but I see, their console has have more buttons like "Shoutdown", "Stop all resources" etc. Why??
-
I have the output code: GUIEditor = { checkbox = {}, button = {}, label = {}, window = {}, } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(10, 150, 280, 372, "Black and White (user) panel", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(10, 25, 96, 20, "Local player", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(10, 50, 40, 20, "Kill", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(55, 50, 40, 20, "Skin", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(100, 50, 40, 20, "Anim", false, GUIEditor.window[1]) GUIEditor.button[4] = guiCreateButton(145, 50, 56, 20, "Weapon", false, GUIEditor.window[1]) GUIEditor.button[5] = guiCreateButton(206, 50, 64, 20, "Clothes", false, GUIEditor.window[1]) GUIEditor.button[7] = guiCreateButton(10, 74, 40, 20, "Warp", false, GUIEditor.window[1]) GUIEditor.button[8] = guiCreateButton(54, 74, 48, 20, "Stats", false, GUIEditor.window[1]) GUIEditor.button[9] = guiCreateButton(106, 74, 80, 20, "Bookmarks", false, GUIEditor.window[1]) GUIEditor.checkbox[1] = guiCreateCheckBox(10, 100, 68, 20, "Jetpack", false, false, GUIEditor.window[1]) GUIEditor.checkbox[2] = guiCreateCheckBox(83, 100, 116, 20, "Fall off bike", false, false, GUIEditor.window[1]) GUIEditor.label[2] = guiCreateLabel(10, 125, 32, 20, "Pos:", false, GUIEditor.window[1]) GUIEditor.label[3] = guiCreateLabel(47, 125, 45, 20, "2485", false, GUIEditor.window[1]) GUIEditor.label[4] = guiCreateLabel(97, 125, 45, 20, "-1666", false, GUIEditor.window[1]) GUIEditor.label[5] = guiCreateLabel(147, 125, 45, 20, "13", false, GUIEditor.window[1]) GUIEditor.button[10] = guiCreateButton(197, 125, 32, 20, "Map", false, GUIEditor.window[1]) GUIEditor.button[11] = guiCreateButton(234, 125, 32, 20, "Int", false, GUIEditor.window[1]) GUIEditor.label[6] = guiCreateLabel(10, 171, 64, 20, "Vehicles", false, GUIEditor.window[1]) GUIEditor.label[7] = guiCreateLabel(10, 196, 64, 20, "Current:", false, GUIEditor.window[1]) GUIEditor.label[8] = guiCreateLabel(79, 196, 80, 20, "Infernus", false, GUIEditor.window[1]) GUIEditor.button[12] = guiCreateButton(10, 221, 56, 20, "Create", false, GUIEditor.window[1]) GUIEditor.button[13] = guiCreateButton(71, 221, 56, 20, "Repair", false, GUIEditor.window[1]) GUIEditor.button[14] = guiCreateButton(132, 221, 40, 20, "Flip", false, GUIEditor.window[1]) GUIEditor.button[15] = guiCreateButton(177, 221, 72, 20, "Upgrades", false, GUIEditor.window[1]) GUIEditor.button[16] = guiCreateButton(10, 246, 48, 20, "Color", false, GUIEditor.window[1]) GUIEditor.button[17] = guiCreateButton(63, 246, 72, 20, "Paintjob", false, GUIEditor.window[1]) GUIEditor.checkbox[3] = guiCreateCheckBox(10, 271, 84, 20, "Lights on", false, false, GUIEditor.window[1]) GUIEditor.checkbox[4] = guiCreateCheckBox(99, 271, 92, 20, "Lights off", false, false, GUIEditor.window[1]) end ) But where I can isert this?
-
Hey to all, I used guieditor (https://community.multitheftauto.com/in ... ils&id=141) and I removed many buttons from frgui (F1), I renamed many buttons etc, but now, i dont know how to apply yhis changes to all players. How to do it?
-
[2013-04-23 15:39:25] SCRIPT ERROR: freeroam\fr_server.lua:279: ')' expected near 's' [2013-04-23 15:39:25] WARNING: Loading script failed: freeroam\fr_server.lua:279: ')' expected near 's
-
Yeah, not working..
-
Not working again the same problem
-
Hmm.. I have a problem: With F1 I can't spawn cars, set character, add weapon etc... The console says when the server is starts: [2013-04-23 14:00:22] WARNING: freeroam/fr_server.lua(Line 279) [server] getClientName is deprecated and may not work in future versions. Please replace with getPlayerName. [2013-04-23 14:00:22] Some files in 'freeroam' use deprecated functions. [2013-04-23 14:00:22] Use the 'upgrade' command to perform a basic upgrade of resources. [2013-04-23 14:00:22] SCRIPT ERROR: freeroam\fr_server.lua:279: ')' expected near 's' [2013-04-23 14:00:22] WARNING: Loading script failed: freeroam\fr_server.lua:279: ')' expected near 's' and when I trying to spawn for example a turismo: [2013-04-23 14:02:31] ERROR: Client triggered serverside event onServerCall, but event is not added serverside How to fix it? PS: I tryed to upgrade but nothing.. Now I Set the old zip file back..
-
g_Root = getRootElement() g_ResRoot = getResourceRootElement(getThisResource()) g_PlayerData = {} g_VehicleData = {} local chatTime = {} local lastChatMessage = {} g_ArmedVehicles = { [425] = true, [447] = true, [520] = true, [430] = true, [464] = true, [432] = true } g_Trailers = { [606] = true, [607] = true, [610] = true, [590] = true, [569] = true, [611] = true, [584] = true, [608] = true, [435] = true, [450] = true, [591] = true } g_RPCFunctions = { addPedClothes = { option = 'clothes', descr = 'Modifying clothes' }, addVehicleUpgrade = { option = 'upgrades', descr = 'Adding/removing upgrades' }, fadeVehiclePassengersCamera = true, fixVehicle = { option = 'repair', descr = 'Repairing vehicles' }, giveMeVehicles = { option = 'createvehicle', descr = 'Creating vehicles' }, giveMeWeapon = { option = 'weapons.enabled', descr = 'Getting weapons' }, givePedJetPack = { option = 'jetpack', descr = 'Getting a jetpack' }, killPed = { option = 'kill', descr = 'Killing yourself' }, removePedClothes = { option = 'clothes', descr = 'Modifying clothes' }, removePedFromVehicle = true, removePedJetPack = { option = 'jetpack', descr = 'Removing a jetpack' }, removeVehicleUpgrade = { option = 'upgrades', descr = 'Adding/removing upgrades' }, setElementAlpha = { option = 'alpha', descr = 'Changing your alpha' }, setElementPosition = true, setElementInterior = true, setMyGameSpeed = { option = 'gamespeed.enabled', descr = 'Setting game speed' }, setMySkin = { option = 'setskin', descr = 'Setting skin' }, setPedAnimation = { option = 'anim', descr = 'Setting an animation' }, setPedFightingStyle = { option = 'setstyle', descr = 'Setting fighting style' }, setPedGravity = { option = 'gravity.enabled', descr = 'Setting gravity' }, setPedStat = { option = 'stats', descr = 'Changing stats' }, setTime = { option = 'time.set', descr = 'Changing time' }, setTimeFrozen = { option = 'time.freeze', descr = 'Freezing time' }, setVehicleColor = true, setVehicleHeadLightColor = true, setVehicleOverrideLights = { option = 'lights', descr = 'Forcing lights' }, setVehiclePaintjob = { option = 'paintjob', descr = 'Applying paintjobs' }, setVehicleRotation = true, setWeather = { option = 'weather', descr = 'Setting weather' }, spawnMe = true, warpMe = { option = 'warp', descr = 'Warping' } } g_OptionDefaults = { alpha = true, anim = true, clothes = true, createvehicle = true, gamespeed = { enabled = true, min = 0.0, max = 3 }, gravity = { enabled = true, min = 0, max = 0.1 }, jetpack = true, kill = true, lights = true, paintjob = true, repair = true, setskin = true, setstyle = true, spawnmaponstart = true, spawnmapondeath = true, stats = true, time = { set = true, freeze = true }, upgrades = true, warp = true, weapons = { enabled = true, vehiclesenabled = true, disallowed = {} }, weather = true, welcometextonstart = true, vehicles = { maxidletime = 60000, idleexplode = true, maxperplayer = 2, disallowed = {} } } function getOption(optionName) local option = get(optionName:gsub('%.', '/')) if option then if option == 'true' then option = true elseif option == 'false' then option = false end return option end option = g_OptionDefaults for i,part in ipairs(optionName:split('.')) do option = option[part] end return option end addEventHandler('onResourceStart', g_ResRoot, function() table.each(getElementsByType('player'), joinHandler) end ) function joinHandler(player) if not player then player = source end local r, g, b = math.random(50, 255), math.random(50, 255), math.random(50, 255) setPlayerNametagColor(player, r, g, b) g_PlayerData[player] = { vehicles = {} } g_PlayerData[player].blip = createBlipAttachedTo(player, 0, 2, r, g, b) if g_FrozenTime then clientCall(player, 'setTimeFrozen', true, g_FrozenTime[1], g_FrozenTime[2], g_FrozenWeather) end if getOption('welcometextonstart') then outputChatBox('Welcome to Freeroam', player, 0, 255, 0) outputChatBox('Press F1 to show/hide controls', player, 0, 255, 0) end end addEventHandler('onPlayerJoin', g_Root, joinHandler) addEvent('onLoadedAtClient', true) addEventHandler('onLoadedAtClient', g_ResRoot, function(player) if getOption('spawnmaponstart') and isPedDead(player) then clientCall(player, 'showWelcomeMap') end end, false ) addEventHandler('onPlayerWasted', g_Root, function() if not getOption('spawnmapondeath') then return end local player = source setTimer( function() if isPedDead(player) then clientCall(player, 'showMap') end end, 2000, 1 ) end ) addEvent('onClothesInit', true) addEventHandler('onClothesInit', g_Root, function() local result = {} local texture, model -- get all clothes result.allClothes = {} local typeGroup, index for type=0,17 do typeGroup = {'group', type = type, name = getClothesTypeName(type), children = {}} table.insert(result.allClothes, typeGroup) index = 0 texture, model = getClothesByTypeIndex(type, index) while texture do table.insert(typeGroup.children, {id = index, texture = texture, model = model}) index = index + 1 texture, model = getClothesByTypeIndex(type, index) end end -- get current player clothes { type = {texture=texture, model=model} } result.playerClothes = {} for type=0,17 do texture, model = getPedClothes(source, type) if texture then result.playerClothes[type] = {texture = texture, model = model} end end triggerClientEvent(source, 'onClientClothesInit', source, result) end ) addEvent('onPlayerGravInit', true) addEventHandler('onPlayerGravInit', g_Root, function() triggerClientEvent('onClientPlayerGravInit', source, getPedGravity(source)) end ) function setMySkin(skinid) if isPedDead(source) then local x, y, z = getElementPosition(source) if isPedTerminated(source) then x = 0 y = 0 z = 3 end local r = getPedRotation(source) local interior = getElementInterior(source) spawnPlayer(source, x, y, z, r, skinid) setElementInterior(source, interior) setCameraInterior(source, interior) else setElementModel(source, skinid) setElementHealth(source, 100) end setCameraTarget(source, source) setCameraInterior(source, getElementInterior(source)) end function spawnMe(x, y, z) if not x then x, y, z = getElementPosition(source) end if isPedTerminated(source) then repeat until spawnPlayer(source, x, y, z, 0, math.random(9, 288)) else spawnPlayer(source, x, y, z, 0, getPedSkin(source)) end setCameraTarget(source, source) setCameraInterior(source, getElementInterior(source)) end function warpMe(targetPlayer)
-
It's noob question but how to find this code ?
-
Yes. If you are look in the resource description in link, you see:
-
Here is the script lua files, pls check it and tell me: server.lua -- DISCLAIMER --[[ Any user of this resource is allowed to modify the code for personal use, and are not allowed to share their own version with people. Do not attempt to resell this resource as it is avaiblable for FREE. Anyone caught breaking the disclamer will find themselves in trouble with the law under the Copyright Act 2008. You may use / edit only for PERSONAL USE. This code is copyrighted to Christopher Graham Smith (Urangan, Queensland, AUS). ]] -- Settings - These settings will change the scripts functions and allow you to disable certain parts. settings = { ['enableTeamChat'] = true, ['adminTag'] = { ['enabled'] = true, ['ACL'] = { -- A bit more advanced. { 'Admin', '#00B7FF[Admin] ' }, { 'SuperModerator', '#F200FF[s.mod] ' }, { 'Moderator', '#A1FF9C[Mod] ' }, { 'Everyone', ' ' } } }, ['swearFilter'] = { ['enabled'] = true, ['swearCost'] = 0, ['swears'] = { -- Allows you to set the blocked swear words, syntax is ['WORD'] = 'REPLACEMENT' ['asshole'] = '*******', ['fuck'] = '****', ['slut'] = '****', ['bitch'] = '*****', ['cunt'] = '****', ['whore'] = '*****', ['pussy'] = '*****', ['fag'] = '***', ['perro'] = '*****', ['puta'] = '****', ['joder'] = '*****' } }, ['antiSpamFilter'] = { ['enabled'] = true, ['execeptionGroups'] = 'Admin', -- Groups which can spam, eg. 'Admin,SuperModerator,Moderator' ['chatTimeOut'] = 1.5 -- Set in seconds. }, ['freezeChat'] = { ['enabled'] = true, ['command'] = 'freezechat', -- Command to use when activating frozen chat. ['allowedGroups'] = 'Admin,SuperModerator', -- Groups which have access to this command. ['resetTime'] = 5 -- Time in minutes before it automatically resets. }, ['clearChat'] = { ['enabled'] = true, ['command'] = 'clearchat', ['allowedGroups'] = 'Admin,SuperModerator' } } -- Required variables spam = { } stopChat = false function chatbox(message, msgtype) if stopChat then cancelEvent() outputChatBox('#FF0000[FREEZECHAT] #FFFFFFAn admin has recently frozen chat.', source, 255, 255, 255, true) return end local account = getAccountName(getPlayerAccount(source)) local name = getPlayerName(source) local serial = getPlayerSerial(source) local r, g, b = getPlayerNametagColor(source) local text = message:gsub("%a", string.upper, 1) local check = 0 local spamCheck = false if settings['swearFilter']['enabled'] then for i, v in pairs(settings['swearFilter']['swears']) do while text:lower():find(i:lower(),1,true) do local start, end_ = text:lower():find(i:lower(),1,true) local found = text:sub(start,end_) text = text:gsub(found,v) if settings['swearFilter']['swearCost'] ~= 0 then takePlayerMoney(source, settings['swearFilter']['swearCost']) end end end end if msgtype == 0 then cancelEvent() if not settings['adminTag']['enabled'] and not spam[serial] then message = RGBToHex(r, g, b) .. name .. ':#FFFFFF ' .. text if 128 <= #message then outputChatBox('#FF0000Error: The message you entered is too big, please lower it!', source, 255, 255, 255, true) else outputChatBox(message, getRootElement(), 255, 255, 255, true) aclgroup = split(settings['antiSpamFilter']['execeptionGroups'], ', ') or settings['antiSpamFilter']['execeptionGroups'] for i, v in ipairs(aclgroup) do if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup(v)) then spamCheck = true end end if not spamCheck then if settings['antiSpamFilter']['enabled'] then spam[serial] = true setTimer(function() spam[serial] = false end, settings['antiSpamFilter']['chatTimeOut']*1000, 1) end end outputServerLog('CHAT: ' .. name .. ': ' .. text) end return end for _,v in ipairs(settings['adminTag']['ACL']) do if isObjectInACLGroup('user.' .. account, aclGetGroup(v[1])) and check == 0 and not spam[serial] then local message = v[2] .. RGBToHex(r, g, b) .. name .. ":#FFFFFF " .. text if 128 <= #message then outputChatBox('#FF0000Error: The message you entered is too big, please lower it!', source, 255, 255, 255, true) check = 1 else check = 1 outputChatBox(message, getRootElement(), 255, 255, 255, true) if settings['antiSpamFilter']['enabled'] then aclgroup = split(settings['antiSpamFilter']['execeptionGroups'], ', ') or settings['antiSpamFilter']['execeptionGroups'] for i, v in ipairs(aclgroup) do if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup(v)) then spamCheck = true end end if not spamCheck then spam[serial] = true check = 1 setTimer(function() spam[serial] = false end, settings['antiSpamFilter']['chatTimeOut']*1000, 1) end end outputServerLog('CHAT: '.. v[2] .. name .. ': ' .. text) end elseif spam[serial] and check == 0 then outputChatBox('#FF0000Error: Please wait '..settings['antiSpamFilter']['chatTimeOut']..' seconds before saying a message!', source, 255, 255, 255, true) check = 1 end end elseif msgtype == 1 and not settings['enableTeamChat'] then cancelEvent() end end addEventHandler("onPlayerChat", getRootElement(), chatbox) addEventHandler("onPlayerQuit", getRootElement(), function() local serial = getPlayerName(source) spam[serial] = false end ) -- Freeze chat addCommandHandler(settings['freezeChat']['command'], function(player) if not settings['freezeChat']['enabled'] then return end aclgroup = split(settings['freezeChat']['allowedGroups'], ', ') or settings['freezeChat']['allowedGroups'] for i, v in ipairs(aclgroup) do if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup(v)) then check = true end end if not check then return end if not stopChat then outputChatBox('#FF0000[FREEZECHAT] #FFFFFF'..getPlayerName(player)..' has frozen the chat!', getRootElement(), 255, 255, 255, true) stopChat = true frozenTimer = setTimer(function() stopChat = false end, (settings['freezeChat']['resetTime'] * 60000), 1) else outputChatBox('#FF0000[FREEZECHAT] #FFFFFF'..getPlayerName(player)..' has unfrozen the chat!', getRootElement(), 255, 255, 255, true) stopChat = false end end ) -- Clear chat addCommandHandler(settings['clearChat']['command'], function(player) if not settings['clearChat']['enabled'] then return end aclgroup = split(settings['clearChat']['allowedGroups'], ',') or settings['clearChat']['allowedGroups'] for i, v in ipairs(aclgroup) do if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup(v)) then check = true end end if not check then return end for i = 2, getElementData(player, 'chatLines') do outputChatBox(' ') end outputChatBox('#FF0000[CLEARCHAT]#FFFFFF '..getPlayerName(player)..' has cleared the chat', getRootElement(), 255, 255, 255, true) end ) function RGBToHex(red, green, blue, alpha) return string.format("#%.2X%.2X%.2X", red,green,blue) end client.lua -- Set chatbox layout data. chatLines = getChatboxLayout()["chat_lines"] setElementData(localPlayer, 'chatLines', chatLines) PS: If any of this have error pls fix it and give me the fixed code :3 ty
-
Hey to everyone, i tryed to add this script in my server: (https://community.multitheftauto.com/ind ... ls&id=2963) and when I start this script, all chat messages is showing double, the classic users post its double and the admin posts is double with a little change like: How to keep only the: and to the regular users only the 1 of the souble messages ??
