Raised This Month: $12 Target: $400
 3% 

Transistor Radio


Post New Thread Reply   
 
Thread Tools Display Modes
Burnzy
Veteran Member
Join Date: Apr 2004
Old 05-16-2004 , 11:38  
Reply With Quote #11

As i can see... Gorm is one big n00by to see how that he only has 3 posts.
__________________
Burnzy is offline
Send a message via AIM to Burnzy
Isobold
Veteran Member
Join Date: Mar 2004
Old 05-16-2004 , 11:41  
Reply With Quote #12

thx, works great now...
Isobold is offline
ts2do
Senior Member
Join Date: Mar 2004
Old 05-16-2004 , 15:11  
Reply With Quote #13

I added my own songs and my own voting system and the plugin is awesome
ts2do is offline
Send a message via AIM to ts2do
Gorm
Junior Member
Join Date: May 2004
Old 05-16-2004 , 16:03  
Reply With Quote #14

Great Plugin!! Burnzy plz be quiet!! What do you know. Dont waste our time with crap.. Be creative .....
Quote:
Burnzy
AMXX Scriptkiddy
As i can see... Gorm is one big n00by to see how that he only has 3 posts.
I found out that if i stand to close to the wall when planting the Radio im stuck. So better be safe on a small distance.. And I also figured out how to add my favourite *.wav

PS ! Im a noob !! And so what. Havent you been one to Burnzy?
Gorm is offline
Burnzy
Veteran Member
Join Date: Apr 2004
Old 05-16-2004 , 16:48  
Reply With Quote #15

yes and i just ahd a big discussion which u wernt involved in about it... And i have admitted it
__________________
Burnzy is offline
Send a message via AIM to Burnzy
Isobold
Veteran Member
Join Date: Mar 2004
Old 05-17-2004 , 06:20  
Reply With Quote #16

Sorry for posting here again, but each of the TransistorRadiocommands returns me an "unknown command" on the console. The Radios are planted, removed and restartet anyway, but I can not change the channels of the radios. They always stay in channel 1, the server just returns unknown command radio_station ...

Does anyone has any idea whats wrong?
Isobold is offline
AssKicR
Veteran Member
Join Date: Mar 2004
Location: Norway-Europe(GTM+1)
Old 05-17-2004 , 14:55  
Reply With Quote #17

amx_cvar radio_station 1/2/3
__________________
My Plugins

Got ??
AssKicR is offline
Isobold
Veteran Member
Join Date: Mar 2004
Old 05-17-2004 , 15:24  
Reply With Quote #18

thx, now it works ;)
Isobold is offline
cpt.Iglo
New Member
Join Date: Jun 2004
Location: vienna, austria
Old 06-08-2004 , 23:59   plz anyone help me out
Reply With Quote #19

i tried to include my own files as radio stations, but this is what i get when i compile it ... below is also the source of the plugin with my changes ... if anyone has a clue of what's not working, thx in advance ! -beware , i'm everything but a coder .. i have no clue about this stuff-

Quote:
TransistorRadioDef.sma(122 -- 124) : error 001: expected token: ")", but found "
-identifier-"
TransistorRadioDef.sma(125) : error 029: invalid expression, assumed zero
TransistorRadioDef.sma(125) : warning 215: expression has no effect
TransistorRadioDef.sma(125) : error 001: expected token: ";", but found "else"
TransistorRadioDef.sma(125) : error 029: invalid expression, assumed zero
TransistorRadioDef.sma(125) : warning 215: expression has no effect
TransistorRadioDef.sma(125) : error 001: expected token: ";", but found "if"
TransistorRadioDef.sma(127) : error 001: expected token: ";", but found "else"
TransistorRadioDef.sma(129) : error 001: expected token: ";", but found "else"
TransistorRadioDef.sma(131) : error 001: expected token: ";", but found "else"
TransistorRadioDef.sma(133) : error 001: expected token: ";", but found "else"
TransistorRadioDef.sma(135) : error 001: expected token: ";", but found "else"
TransistorRadioDef.sma(135 -- 137) : error 001: expected token: ")", but found "}"
now for the complete source :

Quote:
#include <amxmodx>
#include <amxmisc>
#include <engine>

public Ass_CreateRadio(id,level,cid){
if (!cmd_access(id,level,cid,1))
return PLUGIN_HANDLED

if(entity_get_int(id, EV_INT_deadflag) != 0)
return PLUGIN_HANDLED

new Float:vOrigin[3]
new Float:vAngles[3]
entity_get_vector(id, EV_VEC_origin, vOrigin)
entity_get_vector(id, EV_VEC_v_angle, vAngles)

new NewEnt
NewEnt = create_entity("info_target")

if(NewEnt == 0) {
return PLUGIN_HANDLED_MAIN
}

entity_set_string(NewEnt, EV_SZ_classname, "ass_radio")
entity_set_model(NewEnt, "models/w_transistor.mdl")
entity_set_int(NewEnt, EV_INT_body, 1)
entity_set_int(NewEnt, EV_INT_sequence, 1)
entity_set_int(NewEnt, EV_INT_solid, 2)

new Float:MinBox[3]
new Float:MaxBox[3]

MinBox[0] = -8.0
MinBox[1] = -8.0
MinBox[2] = -8.0
MaxBox[0] = 8.0
MaxBox[1] = 8.0
MaxBox[2] = 8.0

entity_set_vector(NewEnt, EV_VEC_mins, MinBox)
entity_set_vector(NewEnt, EV_VEC_maxs, MaxBox)

new Float:vNewOrigin[3]
new Float:vNormal[3]
new Float:vTraceDirection[3]
new Float:vTraceEnd[3]
new Float:vTraceResult[3]
new Float:vEntAngles[3]

VelocityByAim(id, 64, vTraceDirection)

vTraceEnd[0] = vTraceDirection[0] + vOrigin[0]
vTraceEnd[1] = vTraceDirection[1] + vOrigin[1]
vTraceEnd[2] = vTraceDirection[2] + vOrigin[2]

trace_line(id, vOrigin, vTraceEnd, vTraceResult)

if(trace_normal(id, vOrigin, vTraceEnd, vNormal) == 0) {
remove_entity(NewEnt)
console_print(id, "[Radio] You must plant the radio on a wall!")
return PLUGIN_HANDLED_MAIN
}


vNewOrigin[0] = vTraceResult[0] + (vNormal[0] * 8.0)
vNewOrigin[1] = vTraceResult[1] + (vNormal[1] * 8.0)
vNewOrigin[2] = vTraceResult[2] + (vNormal[2] * 8.0)

entity_set_origin(NewEnt, vNewOrigin)
vector_to_angle(vNormal, vEntAngles)

entity_set_vector(NewEnt, EV_VEC_angles, vEntAngles)


new Float:vBeamEnd[3]
new Float:vTracedBeamEnd[3]
vBeamEnd[0] = vNewOrigin[0] + (vNormal[0] * 8192)
vBeamEnd[1] = vNewOrigin[1] + (vNormal[1] * 8192)
vBeamEnd[2] = vNewOrigin[2] + (vNormal[2] * 8192)
trace_line(-1, vNewOrigin, vBeamEnd, vTracedBeamEnd)
entity_set_vector(NewEnt, EV_VEC_vuser1, vTracedBeamEnd)

entity_set_int(NewEnt, EV_INT_movetype, 5) //5 = movetype_fly, No grav, but collides.


emit_sound(NewEnt, CHAN_WEAPON, "weapons/mine_deploy.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)

new args[4]
num_to_str(NewEnt, args, 4)

set_task(3.0, "RadioActivate", 0, args, 4)

return PLUGIN_HANDLED_MAIN
}

public RadioActivate(RadioID[]) {
new EntID = str_to_num(RadioID)

new Station = get_cvar_num("radio_station")
if (Station==1) {
emit_sound(EntID, CHAN_VOICE, "ambience/arabmusic.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
set_task(107.0, "StartSoundAgain", EntID+22)
} else if (Station==2) {
emit_sound(EntID, CHAN_VOICE, "ambience/Opera.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
set_task(72.0, "StartSoundAgain", EntID+22)
} else {
emit_sound(EntID, CHAN_VOICE, "ambience/lv_jubilee.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
set_task(6.0, "StartSoundAgain", EntID+22)
}
}

public StartSoundAgain(TaskID) {
new EntID = TaskID-22

new Station = get_cvar_num("radio_station")
if (Station==1) {
emit_sound(EntID, CHAN_VOICE, "ambience/arabmusic.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
set_task(107.0, "StartSoundAgain", EntID+22)
} else if (Station==2) {
emit_sound(EntID, CHAN_VOICE, "ambience/Opera.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
set_task(72.0, "StartSoundAgain", EntID+22)
} else if (Station==3) (
emit_sound(EntID, CHAN_VOICE, "ambience/lv_jubilee.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
set_task(6.0, "StartSoundAgain", EntID+22)
) else if (Station==4) (
emit_sound(EntID, CHAN_VOICE, "misc/vienna1.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
) else if (Station==5) (
emit_sound(EntID, CHAN_VOICE, "misc/vienna2.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
) else if (Station==6) (
emit_sound(EntID, CHAN_VOICE, "misc/vienna3.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
) else if (Station==7) (
emit_sound(EntID, CHAN_VOICE, "misc/vienna4.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
) else if (Station==8) (
emit_sound(EntID, CHAN_VOICE, "misc/street1.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
) else (
emit_sound(EntID, CHAN_VOICE, "misc/street2.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
}

}

public Ass_DelRadios(id,level,cid){
if (!cmd_access(id,level,cid,1))
return PLUGIN_HANDLED

new iEntity = find_ent_by_class(-1, "ass_radio")
while(iEntity > 0)
{
emit_sound(iEntity, CHAN_VOICE, "common/null.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
remove_task(iEntity+22)
remove_entity(iEntity)
iEntity = find_ent_by_class(-1, "ass_radio")
}

return PLUGIN_CONTINUE
}

public Ass_ResRadios(id,level,cid){
if (!cmd_access(id,level,cid,1))
return PLUGIN_HANDLED

new iEntity = find_ent_by_class(-1, "ass_radio")
while(iEntity > 0)
{
remove_task(iEntity+22)
emit_sound(iEntity, CHAN_VOICE, "common/null.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
set_task(3.0, "StartSoundAgain", iEntity+22)
iEntity = find_ent_by_class(iEntity, "ass_radio")
}

return PLUGIN_CONTINUE
}

public plugin_init(){
register_plugin("Trasistor Radio","1.0","AssKicR")
register_clcmd("amx_setradio","Ass_CreateRadi o",ADMIN_KICK)
register_clcmd("amx_delradios","Ass_DelRadios ",ADMIN_KICK)
register_clcmd("amx_resradios","Ass_ResRadios ",ADMIN_KICK)
register_cvar("radio_station","1")
return PLUGIN_CONTINUE
}

public plugin_precache() {
precache_sound("weapons/mine_deploy.wav") // Radio Place
precache_sound("common/null.wav") // Radio Off
precache_sound("ambience/arabmusic.wav") // Jihad Channel (1)
precache_sound("ambience/Opera.wav") // Opera Channel (2)
precache_sound("ambience/lv_jubilee.wav") // New Wave Channel (3)
precache_sound("misc/vienna1.wav") // Vienna Scientists 01
precache_sound("misc/vienna2.wav") // Vienna Scientists 02
precache_sound("misc/vienna3.wav") // Vienna Scientists 03
precache_sound("misc/vienna4.wav") // Vienna Scientists 04
precache_sound("misc/street1.wav") // Street Vibes 01
precache_sound("misc/street2.wav") // Street Vibes 02
precache_model("models/w_transistor.mdl")
precache_model("models/w_transistort.mdl")
return PLUGIN_CONTINUE
}
__________________
greetinx, iaK | cpt.Iglo****

server : iaK|server [Holy Battlefields] -- #iaKclan @ Qnet
ip : 80.64.143.3:27016
metamod 1.17.1 // amxx 0.16
cpt.Iglo is offline
Send a message via ICQ to cpt.Iglo
Girthesniper
Senior Member
Join Date: Mar 2004
Location: Maryland
Old 06-09-2004 , 14:21  
Reply With Quote #20

You stole that model from the Science and Industry mod!
__________________
BANNED
Girthesniper is offline
Send a message via AIM to Girthesniper Send a message via MSN to Girthesniper
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:35.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode