Lopaskurwa
Well-Known Member
- Joined
- Oct 6, 2017
- Messages
- 936
- Solutions
- 2
- Reaction score
- 57
Hello,
trying to set custome town after character dies so i have this in my config
and then i trying to set town id 3 after player dies in citizen.lua because you need to do it in citizen.lua but im not sure so
But it doesnt work because it teleports in town 2
TFS 1.2
trying to set custome town after character dies so i have this in my config
Code:
'towns' => array(
0 => 'No town',
1 => 'City',
2 => 'Born',
3 => 'Death'
),
LUA:
function onStepIn(creature, item, position, fromPosition)
if item.actionid > 30020 and item.actionid < 30050 then
local player = creature:getPlayer()
if player == nil then
return false
end
local town = Town(item.actionid - 30023)
player:setTown(town)
end
return true
end
TFS 1.2