Raised This Month: $ Target: $400
 0% 

Whats wrong with this thingy >.< *Bump*


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Rixorster
Senior Member
Join Date: Jul 2005
Old 03-24-2006 , 16:45   Whats wrong with this thingy >.< *Bump*
Reply With Quote #1

Well, there's something wrong with this plugin, the sounds wont play at all!
Code:
/* Copyright (C) Rixorster * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. * */ #include <amxmodx> #include <amxmisc> #include <engine> #include <fun> #include <tsx> // Made For PimpLordz new playing new radiosound new Float:porigin[3] = { 1153.0, -289.0, -25.0 } /*****************Declare Bar Music*****************/ public plugin_init() {     register_plugin("Bar Music","1.0","Rixorster")     register_menucmd(register_menuid("Bar Music"),1023,"RadioMenuChoice")     register_concmd("radio_menu", "radio_menu", ADMIN_LEVEL_E, "RadioMenu")     register_clcmd("radio_menu", "radio_menu")     register_clcmd("say call_menu", "radio_menu")     register_concmd("harbuyay","create_entities") } public plugin_precache() {     precache_sound("Pimplordz/Music/whatislove.wav")     precache_sound("Pimplordz/blank.wav") } /*****************Function that calls Bar Music*****************/ public radio_menu(id) {     RadioMenuMenu(id)     return PLUGIN_CONTINUE } /*****************Menu Code for Bar Music*****************/ public RadioMenuMenu(id) {     if (is_user_alive(id)) {         new menuBody[1024]         new key                 format(menuBody, 1023, "\wBar Music\W^n^n\y1.\w What is love^n\y2.\w Lol^n\y3.\w Exit.")         key = (1<<0)|(1<<1)|(1<<2)             show_menu(id, key, menuBody)     } } /*****************Bar Music Choice Switch*****************/ public RadioMenuChoice(id, key) {     switch(key)     {         case 0:         {             if(playing != 0)             {                 return PLUGIN_HANDLED             }                         new musicBox = create_entity("ambient_generic")             entity_set_string(musicBox,EV_SZ_classname,"ambient_generic")             entity_set_origin(musicBox,porigin)             entity_set_int(musicBox,EV_INT_spawnflags,4)             entity_set_string(musicBox,EV_SZ_message,"Pimplordz/Music/whatislove.wav")             set_task(69.0,"stop_Love")             client_cmd(id,"say lol")             playing = 1         }         case 1:         {             client_print(id, print_chat, "To be continued")         }         case 2:         {             return PLUGIN_HANDLED         }     } } public stop_Love(musicBox) {     entity_set_string(musicBox,EV_SZ_message,"Pimplordz/blank.wav")     playing = 0 } public create_ambient2(Float:porigin[3],targetname[],vol[],pitch[],spawnflags,file[]) {     new ambient = create_entity("ambient_generic")     if(!ambient) return PLUGIN_HANDLED     entity_set_string(ambient,EV_SZ_classname,"ambient_generic")     entity_set_int(ambient,EV_INT_spawnflags,spawnflags)     entity_set_float(ambient,EV_FL_health,10.0)     entity_set_string(ambient,EV_SZ_targetname,targetname)     entity_set_string(ambient,EV_SZ_message,file)     DispatchKeyValue(ambient,"pitch",pitch)     DispatchKeyValue(ambient,"volstart",vol)     DispatchKeyValue(ambient,"pitchstart",pitch)     DispatchSpawn(ambient)     new Float:origin[3]     origin[0] = float(porigin[0])     origin[1] = float(porigin[1])     origin[2] = float(porigin[2])     entity_set_origin(ambient,origin)     return PLUGIN_HANDLED } public create_entities() {     create_ambient2( porigin, "barmusic", "10", "80", 8, "Pimplordz/Music/whatislove.wav" ) }
__________________
You never know, what will happen the day after tomorrow...

+karma if i helped you!
Rixorster is offline
Rixorster
Senior Member
Join Date: Jul 2005
Old 03-25-2006 , 03:32  
Reply With Quote #2

Sorry, but *Bump*
V3x? Anyone?
__________________
You never know, what will happen the day after tomorrow...

+karma if i helped you!
Rixorster is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-25-2006 , 04:02  
Reply With Quote #3

I dunno. I suck with enitity manipulation.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Rixorster
Senior Member
Join Date: Jul 2005
Old 03-25-2006 , 04:12  
Reply With Quote #4

Darn darn, well, how can i make so that if i do:
Code:
// after defines... new Float:porigin[3] = { 1153.0, -289.0, -25.0 } //after plugin init... public testRadio() {     new boxOfRadio = create_entity("whatsthebestentityhere") //what entity should i choose?     entity_set_origin( boxOfRadio, porigin)     emit_sound(boxOfRadio, CHAN_AUTO, "Pimplordz/Music/whatislove.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) }
__________________
You never know, what will happen the day after tomorrow...

+karma if i helped you!
Rixorster is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-25-2006 , 04:28  
Reply With Quote #5

Edit: Try this.
Code:
new musicBox = create_entity("ambient_generic"); if(musicBox > 0) {     DispatchKeyValue(musicBox , "message" , "Pimplordz/Music/whatislove.wav");     // ...     entity_set_origin(musicBox , porigin);     DispatchSpawn(musicBox); }
This will also help you: http://collective.valve-erc.com/inde...mbient_generic
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Rixorster
Senior Member
Join Date: Jul 2005
Old 03-25-2006 , 04:36  
Reply With Quote #6

ooh, thanky thanky
__________________
You never know, what will happen the day after tomorrow...

+karma if i helped you!
Rixorster is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-25-2006 , 04:37  
Reply With Quote #7

Edited post.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Rixorster
Senior Member
Join Date: Jul 2005
Old 03-25-2006 , 04:58  
Reply With Quote #8

+karma for you
Code:
new isleet public plugin_init() {     plugin_register("v3x is 1337","1337.0","Rix")     plugin_concmd("v3x","go_v3x") } public go_v3x() {     if(isleet == v3x)     {         client_print(id, print_chat, "V3x is mega1337")     } }
__________________
You never know, what will happen the day after tomorrow...

+karma if i helped you!
Rixorster is offline
Reply



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 16:38.


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