Круто, вы создали тему. К сожалению, большинство тем на этом форуме модераторам приходится переименовывать и удалять, чтобы поддерживать форум в чистоте.
- Если ваша тема содержит заголовок, по которому ее невозможно найти через поиск или который не несет конкретики, например “помогите с ошибкой” вместо например “[DarkRP] Не создается коробка с оружием при нажатии кнопки”, то тема будет либо отредактирована, либо удалена
- Код в теме и логи следует обрамлять тремя такими символами: ```. Сверху кода и снизу. Тогда он будет выглядеть красиво, а не как каша текста
- Сверху ссылка на методичку модератора. Если вы ее прочтете, то круто поможете форуму. Кто знает, может именно вы будущий модератор?
ну может покажешь код хотяб
и жалуется на Distance а не combine
TEAM_COMBINE = DarkRP.createJob(“Combine”, {
color = Color(255, 255, 255, 255),
model = {
“models/player/combine_soldier.mdl”
},
description = [[Вы обычный синтет обороняющий город от нападений.]],
weapons = {“weapon_keys”, “weapon_m42”, “stunstick”},
command = “Combine”,
max = 3, – at most 70% of the players can have this job. Set to a whole number to set an absolute limit.
salary = 50,
admin = 0,
vote = false,
hasLicense = true,
-- The following fields are OPTIONAL. If you do not need them, or do not need to change them from their defaults, REMOVE them.
NeedToChangeFrom = TEAM_POLICE,
customCheck = function(ply) return ply:getDarkRPVar("money") > 500 end,
CustomCheckFailMsg = "Вы не имеете достаточное количество денег", -- alternative: CustomCheckFailMsg = function(ply, jobTable) return ply:getDarkRPVar("money") < 5000 and "You're piss poor" or "You don't have enough money!" end,
modelScale = 1.2,
maxpocket = 20,
maps = {"rp_downtown_v2", "rp_bangclaw", "gm_construct"},
candemote = true,
mayor = false,
chief = false,
medic = false,
cook = false,
hobo = false,
ammo = {
["smg1"] = 120,
},
category = "Other", -- The name of the category it is in. Note: the category must be created!
sortOrder = 100, -- The position of this thing in its category. Lower number means higher up.
buttonColor = Color(255, 255, 255, 255), -- The color of the button in the F4 menu
label = "Combine", -- Optional: the text on the button in the F4 menu
playerClass = "player_darkrp",
CanPlayerSuicide = function(ply) return false end,
PlayerCanPickupWeapon = function(ply, weapon) return true end,
PlayerDeath = function(ply, weapon, killer) end,
PlayerLoadout = function(ply) return true end,
PlayerSelectSpawn = function(ply, spawn) end,
PlayerSetModel = function(ply) return "models/player/combine_soldier.mdl" end,
PlayerSpawn = function(ply) end,
PlayerSpawnProp = function(ply, model) end,
RequiresVote = function(ply, job) for k,v in pairs(player.GetAll()) do if IsValid(v) and v:IsAdmin() then return false end end return true end, -- People need to make a vote when there is no admin around
ShowSpare1 = function(ply) end,
ShowSpare2 = function(ply) end,
OnPlayerChangedTeam = function(ply, oldTeam, newTeam) end,
canStartVote = function(ply) return ply:Distance(SomeNPC) < 200 end,
canStartVoteReason = "You must be close to some NPC", -- alternative: canStartVoteReason = function(ply, jobTable) return ply:Distance(SomeNPC) > 5000 and "You're miles away from some NPC" or "You must be close to some NPC" end,
})
судя по коду тут или генератор какой-то делал профу, или чатгпт.
Distance(SomeNPC)
что это и откуда. и SomeNPC явно не обозначение конкретного нпс а подсказка что сюда надо вставить конкретного. А так ошибка на Distance идёт, она объявлена хоть где-то?
Это делал никакой не генератор, а это пример с оф.сайта darkrp как делать кастом работы
так вырежи лишнее, я не думаю что тебе все аргументы нужны из примера