I'm not really good at lua but i stumbled across 2 problems
1. ttt_force_traitor and ttt_force_detective commands in console don't work (sv_cheats enabled and without rcon infront of it)
2. force_traitor(ply) and force_detective(ply) aren't working either for my pointshop, these are the scripts i used for the items in the PointShop
[code]ITEM.Name = "Detective Round"
ITEM.Enabled = true
ITEM.Description = "Buy a Detective Round"
ITEM.Cost = 750
ITEM.Model = "models/weapons/w_rif_m4a1.mdl"
ITEM.Respawnable = 0
ITEM.Functions = {
OnGive = function(ply, item)
item.Hooks.PlayerSpawn(ply, item)
end,
Respawn = function(ply, item)
item.Functions.OnGive(ply, item)
end
}
ITEM.Hooks = {
PlayerSpawn = function(ply, item)
force_detective(ply)
end
}[/code]
[code]ITEM.Name = "Traitor Round"
ITEM.Enabled = true
ITEM.Description = "Buy a Traitor Round"
ITEM.Cost = 750
ITEM.Model = "models/weapons/w_c4.mdl"
ITEM.Respawnable = 1
ITEM.Functions = {
OnGive = function(ply, item)
item.Hooks.PlayerSpawn(ply, item)
end,
Respawn = function(ply, item)
item.Functions.OnGive(ply, item)
end
}
ITEM.Hooks = {
PlayerSpawn = function(ply, item)
force_traitor(ply)
end
}[/code]
Does anyone know what is wrong?
I am running Exsto as admin plugin and host the server on my own computer(dedicated not listen) and version 28 of TTT with some custom weapons.
Sorry, you need to Log In to post a reply to this thread.