Welcome, Guest. Please login or register.
Did you miss your activation email?
September 20, 2024, 05:56:24 AM
Home Help Login Register
News: Trouble in Terrorist Town? Site here, forum here.

  Show Posts
Pages: [1] 2
1  Other / Trouble in Terrorist Town / Re: Fretta map voting error ? on: April 26, 2011, 10:31:24 PM
bump
2  Other / Trouble in Terrorist Town / Fretta map voting error ? on: April 23, 2011, 02:09:30 AM
Hello,

I was messing around with the fretta voting system and I realized I couldn't make something I want to work. So I reinstalled the fretta  just to check if the error was from my part, and I still get this error:

Lua Error: Timer Error: [gamemodes\fretta\gamemode\sv_gmchanger.lua:38] attempt to index field '?' (a nil value)

this is the function that is getting the error:
function GetNumberOfGamemodeMaps( gm )

return table.Count( g_PlayableGamemodes[ gm ].maps )

end


Is the TTT gamemode not beeing detected ( the index gm is nil or rather ther gamemode isn't playable acc. to fretta ) ?

When I tested this with ttt_fretta_mapvoting set to "0" the other gamemodes showed up on the list and terrortown didnt but I am able to  load up a map with terrortown.

Edit:

Also... to be shure I completly reseted everything I ran a Steam Update on the (dedicated server) and it has no addons or anything.
Also the cvars that I have set relating TTT are:

+sv_defaultgamemode "terrortown"

ttt_firstpreptime 1

ttt_posttime_seconds 1

ttt_preptime_seconds 1

ttt_fretta_mapvoting 1

ttt_round_limit 1

3  Other / Trouble in Terrorist Town / Re: A couple of coding related questions. on: February 02, 2011, 01:27:03 AM
actually found a easy way to do it lol

-- in the fretta sv_gmchanger.lua
local AllMaps = file.Find( "maps/*.bsp", true )

--just do this right after
local numofmaps = math.Round(table.Count(AllMaps) / 1.3)
for i=1,numofmaps do
table.remove(AllMaps, math.random(1,table.Count(AllMaps)))
end

--it will remove a percetange of the maps
4  Other / Trouble in Terrorist Town / Re: Custom hats in TTT? Like a santa hat. on: February 01, 2011, 01:39:55 PM
Anyone know any effecient Hat system? would rly like to know.
5  Other / Trouble in Terrorist Town / Re: A couple of coding related questions. on: January 25, 2011, 03:51:11 PM
Is it possible to edit fretta's votesystem map list ?

like for example: make it show 5 maps only or pick what maps you want it to show.
6  Other / Trouble in Terrorist Town / Re: Perky's custom weapons and equipment. on: January 18, 2011, 07:42:15 PM
Why does the Footvision not work properly on some maps ?

On some maps no footsteps are visible and in some others I can only see my own footsteps.
7  Other / Trouble in Terrorist Town / Re: A couple of coding related questions. on: January 17, 2011, 08:09:11 PM
Hello again.

I'd like to know if there is any way to confirm that Traitors have lost/won the round in the  TTTEndRound Hook

My objective: If the traitors lose in less than 20 seconds after the round started... every1 gets the message: "The traitors have failed!"

I have tried alooot of stuff and ive concluded that at the TTTEndRound Hook no player can be confirmed as traitor ( *:IsActiveTraitor) using this:

hook.Add( "TTTBeginRound", "TTT_kazquake_beginround", function()

FailTimer = CurTime()

end )


hook.Add( "TTTEndRound", "TTT_kazquake_endround", function()

for _, v in pairs( player.GetAll() ) do
if v:IsActiveTraitor() then
Traitorsalive = Traitorsalive + 1
end
end

--If Traitorsalive == 0, then the traitors lost, ect...

if !Traitorsalive then
Traitorsalive = 0
end

local currenttime = CurTime()
if (Traitorsalive == 0) and ( currenttime < FailTimer + 20 ) then
for _, pla in pairs( player.GetAll() ) do
pla:ChatPrint("The traitors have failed!")
end
end


---- This resulted in the Traitorsalive == 0 always beeing true even when the traitors win ( which is wrong ).

end )


so i was hoping of beeing able to do this in a simpler way.

8  Other / Trouble in Terrorist Town / Re: Perky's custom weapons and equipment. on: January 11, 2011, 02:25:53 PM
To the debugmobile!
Dedleleledeldloo


???
9  Other / Trouble in Terrorist Town / Re: A couple of coding related questions. on: January 11, 2011, 01:27:59 PM
still the same thing... it is simply not working... this works with Entity.SetNetworkedInt but NetworkedInt is not stored... and i don't want players to have to type the command every time a server changes map  or restarts


http://wiki.garrysmod.com/?title=Entity.SetNWInt

-------

EDIT:

nvm! appearently when using the  GetPData  I had to type:
if (v:GetPData("ShowSid") == "1" ) then


"1"
10  Other / Trouble in Terrorist Town / Re: A couple of coding related questions. on: January 10, 2011, 11:17:31 PM
Sorry i forgot to mention more details.

Yes the Script is beeing ran ( verified because if I type !showsid or !hidesid I'll get the corrusponding Chatprint ).

The lua file is placed in autorun/server/

I believe that the main problem here is that the PData isn't beeing set. [Hook 'PlDisctwo' Failed: [addons\steamidonleave\lua\autorun\server\steamidtonleave.lua:5] attempt to call global 'GetPData' (a nil value)]

It clearly says in the wiki

http://wiki.garrysmod.com/?title=Player.SetPData

Syntax player.SetPData( String PData, VarValue )

so i this rly doesn't make any sense....
11  Other / Trouble in Terrorist Town / Re: A couple of coding related questions. on: January 10, 2011, 09:05:40 PM
Better Does Pdata even work lol ?

I have tried everything!

and this:
hook.Add( "PlayerDisconnected", "PlDisctwo", function( pl )

   for _, v in pairs( player.GetAll() ) do
if ( v:GetPData("ShowSid") == 1 ) then
v:ChatPrint( pl:GetName().. ": " ..pl:SteamID() )
end
   end

end )

hook.Add( "PlayerSay", "PlSaytwo", function (ply, msg, team)
if msg == "!hidesid" then
ply:SetPData("ShowSid",0)
ply:ChatPrint( "Disabled ShowSid" )
end
if msg == "!showsid" then
ply:SetPData("ShowSid",1)
ply:ChatPrint( "Enabled ShowSid" )
end


end )


doesn't work =(
12  Other / Trouble in Terrorist Town / Re: Perky's custom weapons and equipment. on: January 10, 2011, 04:21:04 PM
Foot Vision isnt working :/ it works in singleplayer but when its installed on a dedi server it doesnt work
13  Other / Trouble in Terrorist Town / Re: A couple of coding related questions. on: January 09, 2011, 11:25:14 PM
Hook 'PlDeath' Failed: [addons\quakesmod2 ttt style\lua\autorun\server\quakerage.lua:52] attempt to call method 'IsActiveTraitor' (a nil value)

This error seems to appear when someone is killed by the World or if some1 is slayn via-admin commands but it only happens sometimes...

this is line 52:

if ( ( Killer:IsActiveTraitor() and Victim:IsActiveTraitor() ) or ( !Killer:IsActiveTraitor() and !Victim:IsActiveTraitor() ) ) and ( Killer ~= Victim ) then


------------

Also a small question: Is it possible to test/use the .GetPData .setPData methods if u run a listen server ?

like on this example that shows a players STEAMID when he leaves:

hook.Add( "PlayerDisconnected", "PlDisc", function( pl )

       for _, v in pairs( player.GetAll() ) do
if ( v:GetPData("ShowSid") == 1 ) then
               v:ChatPrint( pl:GetName().. ": " ..pl:SteamID() )
end
       end

end )

hook.Add( "PlayerSay", "PlSaytwo", function (ply, msg, team)
if msg == "!hidesid" then
ply:SetPData("HideSid",0)
ply:ChatPrint( "Disabled ShowSid" )
end
if msg == "!showsid" then
ply:SetPData("ShowSid",1)
ply:ChatPrint( "Enabled ShowSid" )
end
end )
14  Other / Trouble in Terrorist Town / Re: Perky's custom weapons and equipment. on: January 08, 2011, 11:38:41 PM
what are these DS_STORE files for ?
15  Other / Trouble in Terrorist Town / Re: A couple of coding related questions. on: January 07, 2011, 04:07:44 PM
ur missing a ")" in the end i think xD
16  Other / Trouble in Terrorist Town / Re: A couple of coding related questions. on: January 06, 2011, 02:09:11 AM
Maybe its better to use PlayerLoadout because ppl that join a server during a round don't actually spawn right ?
17  Other / Trouble in Terrorist Town / Re: A couple of coding related questions. on: January 05, 2011, 08:41:58 PM
I believe i found the cause of this!

atm im making the turret become friendly to ppl who are traitors or specators at the spawn of the turret and making any1 who dies friendly with it.. but there are still ppl who might join a server during the round and those are not set as Friendly XD...!!!!

18  Other / Trouble in Terrorist Town / Re: A couple of coding related questions. on: January 05, 2011, 07:53:46 PM
eh. Hello again... i used the playerdeath hook for to make the turrets friendly to who ever dies.. but appearently it still shoots at something... i think its when ppl take control over props... is there some kind of hook for that or im just crazy ?
19  Other / Trouble in Terrorist Town / Re: A couple of coding related questions. on: January 04, 2011, 06:39:27 PM
ah i see
20  Other / Trouble in Terrorist Town / Re: A couple of coding related questions. on: January 04, 2011, 03:35:30 PM
wouldnt it be possible just to copy the turrets NPC script, name it diferently and add the ENT.Icon to it ?.. though as ive saied i dont know anything about snpcs.
Pages: [1] 2


Login with username, password and session length

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Page created in 0.01 seconds with 18 queries.