Odd, try creating it through the item .lua file because you can wear it on your back if you get the vector positions through there it might work.
i made a one way( no frequency ), radio for my halo rp server. turns out the people in their love it because it seems to force them to use actual radio terminology and shit.
[lua]
if ( SERVER ) then
CAKE.Radioitemclass = "UNSC_RADIO_PACK";
-- This gets all tuned players.
function CAKE.GetAllListeners()
local listeners = {};
for _,p in pairs( player.GetAll() ) do
if ( p.radiotuned ) then
table.insert(listeners,p);
end;
end;
return listeners;
end;
-- This is to tune/untune a player.
function CAKE.TunePack(player)
if ( !player.radiotuned ) then
CAKE.SendChat(player, "Your radio pack has been turned on.", false, "IC" );
player.radiotuned = true;
return;
end;
player.radiotuned = false;
CAKE.SendChat(player, "Your radio pack has been turned off.", false, "IC" );
end;
-- This gets all players NEAR a tuned player.
function CAKE.GetSecondaryListeners(player)
if ( !player:HasItem( CAKE.Radioitemclass ) ) then return; end;
local listeners = {};
for _,entity in pairs( ents.FindInSphere(player:GetPos(),300) ) do
if ( entity:IsPlayer() and entity:Alive() ) then
if ( !entity.radiotuned ) then
table.insert( listeners, entity );
end;
end;
end;
return listeners;
end;
-- This transmits a message.
function CAKE.Transmit(player,text)
if ( !player.radiotuned ) then return; end;
if ( player:HasItem( CAKE.Radioitemclass ) ) then
for _,listener in pairs( CAKE.GetAllListeners() ) do
CAKE.SendChat( listener, "[RADIO TRANSMISSION] " .. text, false, "IC" );
listener:EmitSound("npc/metropolice/vo/on1.wav", 100, 100 );
for _,sListener in pairs( CAKE.GetSecondaryListeners(listener) ) do
CAKE.SendChat( sListener, "[" .. string.upper(listener:Nick()) .. "'S RADIO] " .. text, false, "IC" );
end;
end;
end;
return "";
end;
-- This is a chat command function to tune your radio on or off.
function CAKE.CCTune(player,text)
CAKE.TunePack(player);
return "";
end;
CAKE.ChatCommand( "/transmit", CAKE.Transmit);
CAKE.ChatCommand( "/tune", CAKE.CCTune);
end;
[/lua]
create a shared plugin and put that in it.
and yes i could have made it a serverside only plugin w/e deal with it
btw if someone wants me to make handheld frequency radios i will( easy af)
You can remove New Horizons HL2 RP from the server list. We have joined up with Virulent Color and our old server will be going down.
Yes, we would absolutely like that addition LauScript guy. Thanks lol.
[QUOTE=LauScript;35015483]i made a one way( no frequency ), radio for my halo rp server. turns out the people in their love it because it seems to force them to use actual radio terminology and shit.
[lua]
if ( SERVER ) then
CAKE.Radioitemclass = "UNSC_RADIO_PACK";
-- This gets all tuned players.
function CAKE.GetAllListeners()
local listeners = {};
for _,p in pairs( player.GetAll() ) do
if ( p.radiotuned ) then
table.insert(listeners,p);
end;
end;
return listeners;
end;
-- This is to tune/untune a player.
function CAKE.TunePack(player)
if ( !player.radiotuned ) then
CAKE.SendChat(player, "Your radio pack has been turned on.", false, "IC" );
player.radiotuned = true;
return;
end;
player.radiotuned = false;
CAKE.SendChat(player, "Your radio pack has been turned off.", false, "IC" );
end;
-- This gets all players NEAR a tuned player.
function CAKE.GetSecondaryListeners(player)
if ( !player:HasItem( CAKE.Radioitemclass ) ) then return; end;
local listeners = {};
for _,entity in pairs( ents.FindInSphere(player:GetPos(),300) ) do
if ( entity:IsPlayer() and entity:Alive() ) then
if ( !entity.radiotuned ) then
table.insert( listeners, entity );
end;
end;
end;
return listeners;
end;
-- This transmits a message.
function CAKE.Transmit(player,text)
if ( !player.radiotuned ) then return; end;
if ( player:HasItem( CAKE.Radioitemclass ) ) then
for _,listener in pairs( CAKE.GetAllListeners() ) do
CAKE.SendChat( listener, "[RADIO TRANSMISSION] " .. text, false, "IC" );
listener:EmitSound("npc/metropolice/vo/on1.wav", 100, 100 );
for _,sListener in pairs( CAKE.GetSecondaryListeners(listener) ) do
CAKE.SendChat( sListener, "[" .. string.upper(listener:Nick()) .. "'S RADIO] " .. text, false, "IC" );
end;
end;
end;
return "";
end;
-- This is a chat command function to tune your radio on or off.
function CAKE.CCTune(player,text)
CAKE.TunePack(player);
return "";
end;
CAKE.ChatCommand( "/transmit", CAKE.Transmit);
CAKE.ChatCommand( "/tune", CAKE.CCTune);
end;
[/lua]
create a shared plugin and put that in it.
and yes i could have made it a serverside only plugin w/e deal with it
btw if someone wants me to make handheld frequency radios i will( easy af)[/QUOTE]
Mind if I merge this in with some minor modifications?
christ i can't get rp_toggleholster to work at all
f3
bad reading
Praise da lawd for that radio script. And yeah, that handheld thing would be awesome.
-snip-
Nevermind, I plan to use Tiramisu 2 on my second server. It's using a custom schema, and I'm still workin' on it, so that isn't done yet.
2BN switched to openaura.
Shame, Tiramisu 2 is an excellent script. They shoulda kept it.
EDIT: Of course, I'm not saying OpenAura isn't great, but Tiramisu 2 is excellent. Just clearing that up so I don't get flamed by OpenAura users. (I use OpenAura on my other servers, or at least I will)
[QUOTE=portalcrazy;35054655][URL="steam://connect/87.117.217.161:27015"]steam://connect/87.117.217.161:27015[/URL]
IP: 87.117.217.161:27015
Group: [url]http://steamcommunity.com/groups/OVERWATCHGAMING[/url]
Name: [OG] Serious Half Life 2 Roleplay (overwatchgaming.betaboard.net)
Forum: overwatchgaming.betaboard.net
[url=http://www.gametracker.com/server_info/87.117.217.161:27015/][img]http://cache.www.gametracker.com/server_info/87.117.217.161:27015/b_560_95_1.png[/img][/url]
Please add this to the server list, Jawalt. :eng101:[/QUOTE]
Your content pack's broken, bro.
There is no content pack, it uses HL2 content and HL2 content only.
[QUOTE=Jawalt;35051962]Mind if I merge this in with some minor modifications?[/QUOTE]
yup go ahead, are you going to add frequencies? if not, i will do them right now and then you can merge.
[editline]9th March 2012[/editline]
someone test this for me, it's frequency hand held radios. you need to create an item called "item_radio", or add another radio class to the table at the top of the script.
[lua]
if ( SERVER ) then
local PLAYER = FindMetaTable("Player");
CAKE.RadioItems = { "item_radio" };
-- Check if they have any radio item.
function PLAYER:HasRadio()
for _,class in pairs( CAKE.RadioItems ) do
if ( self:HasItem( class ) ) then
return true;
end;
end;
return false;
end;
-- Set a frequency.
function PLAYER:SetFrequency( fFrequency )
if ( !self:HasRadio() ) then return; end;
if ( string.lower(type(fFrequency)) != "number" ) then return; end;
if ( fFrequency > 100 ) then return; end;
if ( fFrequency < 0 ) then return; end;
self.frequency = fFrequency;
end;
-- Get a frequency.
function PLAYER:GetFrequency()
return self.frequency or false;
end;
-- Get frequency listeners.
function CAKE.GetFrequencyListeners(fFrequency)
local listeners = {};
for _,pobj in pairs( player.GetAll() ) do
if ( pobj:GetFrequency() == fFrequency ) then
table.insert(listeners,pobj);
end;
end;
return listeners;
end;
-- Get people in hearing range of a player.
function CAKE.GetCreepers(player)
local listeners = {};
for _,entity in pairs( ents.FindInSphere(player:GetPos(),200) ) do
if ( entity:IsPlayer() and entity:Alive() ) then
-- Only reason i'm doing this is because it'd get REALLY annoying for people in a group.
if ( entity.frequency != player:GetFrequency() ) then
table.insert( listeners, entity );
end;
end;
end;
return listeners;
end;
-- Send radio text.
function CAKE.RadioCommand( player, text )
if ( !player:HasRadio() ) then return; end;
if ( !player:GetFrequency() ) then return; end;
local expname = string.Explode( " ", player:Nick() );
local crDispText = string.upper( expname[1] );
for _,listeners in pairs( CAKE.GetFrequencyListeners(player:GetFrequency()) ) do
CAKE.SendChat(player, text, false, "IC" );
for _,creeper in pairs( CAKE.GetCreepers(player) ) do
CAKE.SendChat(creeper, "[" .. crDispText .. "'S RADIO] " .. text, false, "IC" );
end;
end;
return "";
end;
-- don't even know if this works.
function CAKE.SetFrequencyCommand( player, text )
local freq = tonumber(text) or 1;
if ( string.lower(type(freq)) != "number" ) then return; end;
player:SetFrequency( freq );
return "";
end;
CAKE.ChatCommand( "/radio", CAKE.RadioCommand )
CAKE.ChatCommand( "/setfrequency", CAKE.SetFrequencyCommand )
end;
[/lua]
i just know it's gonna give me problems with the setfrequency chat function.
So uh, guys, sorry for the long hiatus.
As soon as we're done bug fixing some stuff I'll get right on 2.1. You can expect some extensive UI improvements, 3D text with easy positioning scheme, new schema, a new way to move props and POSSIBLE, that arm IK thing I always wanted to do, networking improvements. Buncha goodies.
I guess the more visible ones will be the UI changes.
arm IK?
[QUOTE=Big Bang;35061032]So uh, guys, sorry for the long hiatus.
As soon as we're done bug fixing some stuff I'll get right on 2.1. You can expect some extensive UI improvements, 3D text with easy positioning scheme, new schema, a new way to move props and POSSIBLE, that arm IK thing I always wanted to do, networking improvements. Buncha goodies.
I guess the more visible ones will be the UI changes.[/QUOTE]
I still want to do that amazing facial customization system with you. I've experimented a little more to get some neat ideas, and I've got an idea for a base head to work from. If that fails I could just remake the female 1 and male 2 heads in higher resolution to use as a base head.
[QUOTE=SlayerFin;34995105]Our server is up!
[release]
[URL="steam://connect/96.255.192.72:27016"]Connect to the server directly from here.[/URL]
or manually [I]96.255.192.72:27016[/I]
It's called as Primal Element, it's about how time went back for 128 million years in an eye-blink.
The final storyline hasn't been released yet, but it will be published this week.
You need the [URL="http://dl.dropbox.com/u/21607328/Primal%20Element%20RP%20Content.zip"]Content Pack[/URL] and the [URL="http://www.garrysmod.org/downloads/?a=view&id=25146"]Map.[/URL]
Our forums are not up yet either, but they should be opened pretty soon.
Would be cool to see you guys on the server anyway.[/release][/QUOTE]
Could you add this to the server list, Jawalt?
[QUOTE=LauScript;35061124]arm IK?[/QUOTE]
You would be able to use your character's arm directly for performing certain actions, like pulling or pushing objects, grabbing objects. In a perfect world, it could be used for clinging to things, too, but I doubt I can pull that off.
What if you somehow ragdolled the character, keeping their view on their eyes, and having two controls for arm movement? Then you could just freeze there arm on grab points and they would hang.
[QUOTE=LauScript;35059792]yup go ahead, are you going to add frequencies? if not, i will do them right now and then you can merge.
[editline]9th March 2012[/editline]
someone test this for me, it's frequency hand held radios. you need to create an item called "item_radio", or add another radio class to the table at the top of the script.
[lua]
if ( SERVER ) then
local PLAYER = FindMetaTable("Player");
CAKE.RadioItems = { "item_radio" };
-- Check if they have any radio item.
function PLAYER:HasRadio()
for _,class in pairs( CAKE.RadioItems ) do
if ( self:HasItem( class ) ) then
return true;
end;
end;
return false;
end;
-- Set a frequency.
function PLAYER:SetFrequency( fFrequency )
if ( !self:HasRadio() ) then return; end;
if ( string.lower(type(fFrequency)) != "number" ) then return; end;
if ( fFrequency > 100 ) then return; end;
if ( fFrequency < 0 ) then return; end;
self.frequency = fFrequency;
end;
-- Get a frequency.
function PLAYER:GetFrequency()
return self.frequency or false;
end;
-- Get frequency listeners.
function CAKE.GetFrequencyListeners(fFrequency)
local listeners = {};
for _,pobj in pairs( player.GetAll() ) do
if ( pobj:GetFrequency() == fFrequency ) then
table.insert(listeners,pobj);
end;
end;
return listeners;
end;
-- Get people in hearing range of a player.
function CAKE.GetCreepers(player)
local listeners = {};
for _,entity in pairs( ents.FindInSphere(player:GetPos(),200) ) do
if ( entity:IsPlayer() and entity:Alive() ) then
-- Only reason i'm doing this is because it'd get REALLY annoying for people in a group.
if ( entity.frequency != player:GetFrequency() ) then
table.insert( listeners, entity );
end;
end;
end;
return listeners;
end;
-- Send radio text.
function CAKE.RadioCommand( player, text )
if ( !player:HasRadio() ) then return; end;
if ( !player:GetFrequency() ) then return; end;
local expname = string.Explode( " ", player:Nick() );
local crDispText = string.upper( expname[1] );
for _,listeners in pairs( CAKE.GetFrequencyListeners(player:GetFrequency()) ) do
CAKE.SendChat(player, text, false, "IC" );
for _,creeper in pairs( CAKE.GetCreepers(player) ) do
CAKE.SendChat(creeper, "[" .. crDispText .. "'S RADIO] " .. text, false, "IC" );
end;
end;
return "";
end;
-- don't even know if this works.
function CAKE.SetFrequencyCommand( player, text )
local freq = tonumber(text) or 1;
if ( string.lower(type(freq)) != "number" ) then return; end;
player:SetFrequency( freq );
return "";
end;
CAKE.ChatCommand( "/radio", CAKE.RadioCommand )
CAKE.ChatCommand( "/setfrequency", CAKE.SetFrequencyCommand )
end;
[/lua]
i just know it's gonna give me problems with the setfrequency chat function.[/QUOTE]
Doesn't seem to work.
Just a suggestion, but personally, if people make a new schema, and they wish to distribute it freely, you should put their download links on a list under the server list. Just my opinion, in case someone made a schema and wanted to share it.
[QUOTE=Jakea10;35066084]Doesn't seem to work.[/QUOTE]
Well cool! I'm glad you really explained what was wrong, and the errors, you're truley a marvelous tester!
[QUOTE=LauScript;35059792]yup go ahead, are you going to add frequencies? if not, i will do them right now and then you can merge.
[editline]9th March 2012[/editline]
someone test this for me, it's frequency hand held radios. you need to create an item called "item_radio", or add another radio class to the table at the top of the script.
[lua]
if ( SERVER ) then
local PLAYER = FindMetaTable("Player");
CAKE.RadioItems = { "item_radio" };
-- Check if they have any radio item.
function PLAYER:HasRadio()
for _,class in pairs( CAKE.RadioItems ) do
if ( self:HasItem( class ) ) then
return true;
end;
end;
return false;
end;
-- Set a frequency.
function PLAYER:SetFrequency( fFrequency )
if ( !self:HasRadio() ) then return; end;
if ( string.lower(type(fFrequency)) != "number" ) then return; end;
if ( fFrequency > 100 ) then return; end;
if ( fFrequency < 0 ) then return; end;
self.frequency = fFrequency;
end;
-- Get a frequency.
function PLAYER:GetFrequency()
return self.frequency or false;
end;
-- Get frequency listeners.
function CAKE.GetFrequencyListeners(fFrequency)
local listeners = {};
for _,pobj in pairs( player.GetAll() ) do
if ( pobj:GetFrequency() == fFrequency ) then
table.insert(listeners,pobj);
end;
end;
return listeners;
end;
-- Get people in hearing range of a player.
function CAKE.GetCreepers(player)
local listeners = {};
for _,entity in pairs( ents.FindInSphere(player:GetPos(),200) ) do
if ( entity:IsPlayer() and entity:Alive() ) then
-- Only reason i'm doing this is because it'd get REALLY annoying for people in a group.
if ( entity.frequency != player:GetFrequency() ) then
table.insert( listeners, entity );
end;
end;
end;
return listeners;
end;
-- Send radio text.
function CAKE.RadioCommand( player, text )
if ( !player:HasRadio() ) then return; end;
if ( !player:GetFrequency() ) then return; end;
local expname = string.Explode( " ", player:Nick() );
local crDispText = string.upper( expname[1] );
for _,listeners in pairs( CAKE.GetFrequencyListeners(player:GetFrequency()) ) do
CAKE.SendChat(player, text, false, "IC" );
for _,creeper in pairs( CAKE.GetCreepers(player) ) do
CAKE.SendChat(creeper, "[" .. crDispText .. "'S RADIO] " .. text, false, "IC" );
end;
end;
return "";
end;
-- don't even know if this works.
function CAKE.SetFrequencyCommand( player, text )
local freq = tonumber(text) or 1;
if ( string.lower(type(freq)) != "number" ) then return; end;
player:SetFrequency( freq );
return "";
end;
CAKE.ChatCommand( "/radio", CAKE.RadioCommand )
CAKE.ChatCommand( "/setfrequency", CAKE.SetFrequencyCommand )
end;
[/lua]
i just know it's gonna give me problems with the setfrequency chat function.[/QUOTE]
I'm about to merge this, and just with a cursory glance I see a few problems:
Don't use chat commands for /setfrequency, use a concommand so it uses the standard "!command" syntax. You should add a concommand called "rp_setfrequency".
There's a problem in the SetFrequencyCommand function as well, you should be doing: tonumber(freq) and check if it's nil, instead of that weird string thing you're doing.
Thirdly you could do this in a lot cooler way by using item data, and a rightclick on it. So you could set each radio's frequency separately, and receive messages from as many radios you'd like on as many different frequencies you like, but I'll do that later.
I didn't know it still had the old ! feature, so i tried to use that ridiculous method.
And no, i'm doing that string thing so they can't set a string to the frequency but looking at it now it doesn't make sense cause of line 85.
I would have done it the item data way, but for one, I don't know how. And two, it'd make the GetCreepers function really complicated( well not really, but i haven't learned tiramisu 2's libraries yet ). I'd also have to change the GetFrequencyListeners function, and yeah. In a nutshell it is easy to do, but i don't know how to utilise tiramisu enough to do it that way.
Fixed items that were supposed to be wearable that weren't.
[url]https://github.com/kamaitama/Tiramisu/commit/2244952184efa33b29bcfa2f5c4c2a58ab518e07[/url]
[editline]9th March 2012[/editline]
[QUOTE=LauScript;35070873]I didn't know it still had the old ! feature, so i tried to use that ridiculous method.
And no, i'm doing that string thing so they can't set a string to the frequency but looking at it now it doesn't make sense cause of line 85.
I would have done it the item data way, but for one, I don't know how. And two, it'd make the GetCreepers function really complicated( well not really, but i haven't learned tiramisu 2's libraries yet ). I'd also have to change the GetFrequencyListeners function, and yeah. In a nutshell it is easy to do, but i don't know how to utilise tiramisu enough to do it that way.[/QUOTE]
Also I wasn't rejecting this, it'll go in as-is with a few fixes. Just a couple tips :)
[QUOTE=Jawalt;35071145]Fixed items that were supposed to be wearable that weren't.
[url]https://github.com/kamaitama/Tiramisu/commit/2244952184efa33b29bcfa2f5c4c2a58ab518e07[/url]
[editline]9th March 2012[/editline]
Also I wasn't rejecting this, it'll go in as-is with a few fixes. Just a couple tips :)[/QUOTE]
Well if I were you, since you are more knowledgeable with tiramisu i suggest you upgrade it to use item data. but if you want to keep it as is go ahead i guess.
I've hit a bug after testing out the Enhanced Citizens models. After spawning a clothing item (from the console) and picking it up, the character editor seems to break - none of the options are selectable and the menu can't be closed. The only wawy around it is to reconnect to the server via console because the Escape menu doesn't work either.
Screenshot:
[img]http://cloud.steampowered.com/ugc/470863759194776607/CA68797329012EA42BBED43294A1501270ADC54F/[/img]
There's an accompanying error which reads:
[Tiramisu\gamemode\schemas\global\plugins\menu\cl_editgear.lua:174] attempt to index field '?' (a nil value)
As an aside, is there any way to stop people setting a particular bodygroup if they don't have the clothing item (ie vests)? An admin could easily change it back if someone's running around in rebel uniform for the hell of it, but prevention is better than having to deal with the problem later.
[QUOTE=Grombrindal;35091357]I've hit a bug after testing out the Enhanced Citizens models. After spawning a clothing item (from the console) and picking it up, the character editor seems to break - none of the options are selectable and the menu can't be closed. The only wawy around it is to reconnect to the server via console because the Escape menu doesn't work either.
Screenshot:
[img]http://cloud.steampowered.com/ugc/470863759194776607/CA68797329012EA42BBED43294A1501270ADC54F/[/img]
There's an accompanying error which reads:
[Tiramisu\gamemode\schemas\global\plugins\menu\cl_editgear.lua:174] attempt to index field '?' (a nil value)
As an aside, is there any way to stop people setting a particular bodygroup if they don't have the clothing item (ie vests)? An admin could easily change it back if someone's running around in rebel uniform for the hell of it, but prevention is better than having to deal with the problem later.[/QUOTE]
Disable bodygroups as a whole if you're on HL2RP. It's better to have everyone in their civvie jumpers than with assorted shirts and pants.
The system will be refined later on.
Sorry, you need to Log In to post a reply to this thread.