AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   trying to make a plugin with the sv_downloadurl (https://forums.alliedmods.net/showthread.php?t=27303)

atwhitman101 04-19-2006 11:53

trying to make a plugin with the sv_downloadurl
 
ok, so i am trying to make a plugin with custom weapon models, and sound. but im having issues with it. i need some help on it. i tested it and it partially worked. i saw it download from the website through the game server but when i opened up the console it said couldn't transmit sound/sound/. this is what i have so far

Code:

#include <amxmodx>
#include <engine> // this plugin requires Engine

public plugin_init() {
  register_plugin("oh hello" , "1.0" , "v3x");
  register_event("CurWeapon" , "set_models" , "be" , "1=1"); // if we don't check for the isActive parameter then the skins will act up and change unexpectedly on you
}

public plugin_precache() {
  precache_model("models/v_ak47.mdl"); // the view model
  precache_model("models/p_ak47.mdl"); // the player (view) model
  precache_model("models/w_ak47.mdl"); // the view model
  precache_model("models/v_xm1014.mdl"); // the player (view) model
  precache_model("models/p_xm1014.mdl"); // the view model
  precache_model("models/w_xm1014.mdl"); // the player (view) model
  precache_model("models/v_g3sg1.mdl"); // the view model
  precache_model("models/p_g3sg1.mdl"); // the player (view) model
  precache_model("models/v_m3.mdl"); // the view model
  precache_model("models/w_m3.mdl"); // the player (view) model
  precache_model("models/p_m3.mdl"); // the player (view) model
  precache_model("models/v_g3sg1.mdl"); // the view model
  precache_model("models/p_g3sg1.mdl"); // the player (view) model
  precache_model("models/p_c4.mdl"); // the view model
  precache_model("models/p_m4a1.mdl"); // the player (view) model
  precache_model("models/p_m249.mdl"); // the view model
  precache_model("models/p_mac10.mdl"); // the player (view) model
  precache_model("models/p_scout.mdl"); // the view model
  precache_model("models/p_sg552.mdl"); // the player (view) model
  precache_model("models/v_aug.mdl"); // the view model
  precache_model("models/v_awp.mdl"); // the player (view) model
  precache_model("models/v_c4.mdl"); // the player (view) model
  precache_model("models/v_famas.mdl"); // the player (view) model
  precache_model("models/v_flashbang.mdl"); // the player (view) model
  precache_model("models/v_hegrenade.mdl"); // the player (view) model
  precache_model("models/v_m4a1.mdl"); // the player (view) model
  precache_model("models/v_m249.mdl"); // the player (view) model
  precache_model("models/v_mac10.mdl"); // the player (view) model
  precache_model("models/v_mp5.mdl"); // the player (view) model
  precache_model("models/v_pist_usp.mdl"); // the player (view) model
  precache_model("models/v_scout.mdl"); // the player (view) model
  precache_model("models/v_sg550.mdl"); // the player (view) model
  precache_model("models/v_sg552.mdl"); // the player (view) model
  precache_model("models/v_smokegrenade.mdl"); // the player (view) model
  precache_model("models/w_aug.mdl"); // the player (view) model
  precache_model("models/w_c4.mdl"); // the player (view) model
  precache_model("models/w_famas.mdl"); // the player (view) model
  precache_model("models/w_flashbang.mdl"); // the player (view) model
  precache_model("models/w_g3sg1.mdl"); // the player (view) model
  precache_model("models/w_hegrenade.mdl"); // the player (view) model
  precache_model("models/w_m4a1.mdl"); // the player (view) model
  precache_model("models/w_m249.mdl"); // the player (view) model
  precache_model("models/w_mac10.mdl");
  precache_model("models/w_pist_up.mdl");
  precache_model("models/w_smokegrenade.mdl");
  precache_model("models/p_knife.mdl");
  precache_model("models/p_shield_knife.mdl");
  precache_model("models/v_knife.mdl");
  precache_model("models/v_shield_knife.mdl");
  precache_model("models/w_sg552.mdl");
  precache_model("models/w_sg552.mdl");
  precache_model("models/w_sg552.mdl");
  precache_model("models/w_sg552.mdl");
  precache_model("models/w_sg552.mdl");
  precache_model("sprites/w_mac10.spr");
  precache_sound("m4a1-1.wav");
  precache_sound("sg550-1.wav");
  precache_sound("m4a1_boltpull.wav");
  precache_sound("m4a1_clipin.wav");
  precache_sound("m4a1_clipout");
  precache_sound("m4a1_silencer_off.wav");
  precache_sound("awp_boltback.wav");
  precache_sound("awp_boltforward.wav");
  precache_sound("awp_magin.wav");
  precache_sound("awp_magout.wav");
  precache_sound("havbolt.wav");
  precache_sound("aug-1.wav");
  precache_sound("aug-2.wav");
  precache_sound("m60_boxin.wav");
  precache_sound("m60_boxout.wav");
  precache_sound("m60_chain.wav");
  precache_sound("m60_coverdown.wav");
  precache_sound("m60_coverup.wav");
  precache_sound("m249-1.wav");
  precache_sound("m249-2.wav");
  precache_sound("famas-1.wav");
  precache_sound("famas-2.wav");
  precache_sound("havmagin.wav");
  precache_sound("havmagout.wav");
  precache_sound("havmagtap.wav");
  precache_sound("m4a1_silencer_on.wav");
  precache_sound("knife_deploy1.wav");
  precache_sound("knife_hit1.wav");
  precache_sound("knife_hit2.wav");
  precache_sound("knife_hit3.wav");
  precache_sound("knife_hit4.wav");
  precache_sound("knife_hitwall1.wav");
  precache_sound("knife_hitwall2.wav");
  precache_sound("knife_hitslash1.wav");
  precache_sound("knife_hitslash2.wav");
  precache_sound("knife_stab.wav");
}

i need help with this.

[ --<-@ ] Black Rose 04-19-2006 13:06

Custom weapon sounds wont work.

atwhitman101 04-19-2006 13:54

why won't it work. all it's going to do it replace the ones that you would have now. i don't see why thats an issue.

Twilight Suzuka 04-19-2006 13:57

Then do it.

By the way, there are like, fifty of these plugins out there. Why make another one?!

atwhitman101 04-19-2006 13:58

i can never find one and also, if i can't i still need help with this

organizedKaoS 04-19-2006 14:57

Good luck on replacing the sounds. Anyway, your plugin is trying to precache sounds from the root directory. Put your sounds in the sound folder and change your precache_sound to
Code:
precache_sound("sound/sounddir/soundfile.ext")
That should get rid of the couldnt transmit message.

Xanimos 04-19-2006 16:48

This wont work. Plain and simple.

Brad 04-19-2006 16:50

I'd like to add my voice to the chorus of boo-birds... Won't work. :)

atwhitman101 04-19-2006 17:31

would i need this?
Code:

  new weapid = read_data(2); // get the weapon ID

  switch(weapid) {
    case CSW_AK47: {
      entity_set_string(id , EV_SZ_viewmodel , "models/v_ak47.mdl"); // set the view model
      entity_set_string(id , EV_SZ_weaponmodel , "models/p_ak47.mdl"); // set the player (view) model
    entity_set_string(id , EV_SZ_weaponmodel , "models/w_ak47.mdl"); // set the player (view) model
  }


Xanimos 04-19-2006 20:28

Nope, thats not the problem.

The way the clients download is that they will only download files they don't already have. So this wouldn't work because the clients already have all these files.


All times are GMT -4. The time now is 05:04.

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