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

Silver Weapons Mod


Post New Thread Reply   
 
Thread Tools Display Modes
Rolnaaba
Veteran Member
Join Date: May 2006
Old 09-13-2006 , 09:50   Re: Silver Weapons Mod
Reply With Quote #61

couple things,
1) Dont want to check buyzone, want them to be able to buy anywhere
2) Yes it drops knife I want it to, part of the sacrrifice for buying Silver Weapons
3) Your right I need to add a some messages for dead, ect.
4) give_item for ammo would create many many lines of un-needed code when 1 line of cs_set_user_bpammo could suffice

[EDIT] did some chaqnges to .sma, dont have access to the compiler so cant check for compilation errors (if someone could post the AMXX compiler I would be very grateful, any link pertaining to amxmodx.org is blocked by school so the program attachted to a post would be helpful )
but I added the modified .sma to original post so check it out

[EDIT2] even better would be if someone could attach the compiler and includes as well , I am at ya'lls mercy
__________________
DO NOT PM me about avp mod.

Last edited by Rolnaaba; 09-13-2006 at 10:20.
Rolnaaba is offline
k007
BANNED
Join Date: Mar 2006
Location: bacon?
Old 09-13-2006 , 10:30   Re: Silver Weapons Mod
Reply With Quote #62

i took off the fm include it wasn't realy needed and compile, it compiles fine
edit: what about that damage?
k007 is offline
Send a message via MSN to k007
k007
BANNED
Join Date: Mar 2006
Location: bacon?
Old 09-13-2006 , 10:46   Re: Silver Weapons Mod
Reply With Quote #63

i just edited it from my school libary by notepad and it compiles by the online compiler should work
Attached Files
File Type: sma Get Plugin or Get Source (SilverWeapons.sma - 760 views - 9.6 KB)
k007 is offline
Send a message via MSN to k007
Rolnaaba
Veteran Member
Join Date: May 2006
Old 09-14-2006 , 09:50   Re: Silver Weapons Mod
Reply With Quote #64

ok thanks, I will look at it, I cant use the online compiler my school blocks it, cause it uses the one at amxmodx.org :/ anyway you can post the compiler/includes?

[edit] I browsed sourceforge's amxmodx files till i found it lol nvm
__________________
DO NOT PM me about avp mod.

Last edited by Rolnaaba; 09-14-2006 at 10:21.
Rolnaaba is offline
spunko
Senior Member
Join Date: Jun 2005
Location: Ecuador
Old 09-30-2006 , 13:27   Re: Silver Weapons Mod
Reply With Quote #65

well.. i downloaded the two scripts.. the one in the fisrt page(Rolnaaba) and the one in this page (k007).. both compile fine but when im in game it crashes my cs.

this is what it happens, everything works fine excepts when i have the $10.000.. then i bring the menu with /silvermenu and when i buy any gun it crashes my cs inmeditely.. dunno why.. the models are in the correct folder..

Anyway i edited the code to set the damage, so now it would make more damage and log kills.. take a look at the code.. it compiles fine but i can't test it becuase of that error.. and like i said, that error comes with all the plugins in this thread..

ummm i dunno why i can't upload the .sma file.. so i have to post the code here..

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <engine>
#include <fakemeta>
#define KeysSilverWeapons (1<<0)|(1<<1)|(1<<2)|(1<<3)
new CVAR_DAMAGE // damage multiplier cvar
 
public plugin_init()    
 {   
 
//------------------------- damage multiplier stuff
 
CVAR_DAMAGE register_cvar("amx_silverdamage""2")
 
register_event"Damage""event_damage""be" )
}  
 
// event damage multiplier - i can't test it but it compiles fine
public event_damageid ) {
 
 new 
victim_id id;
 if( !
is_user_connectedvictim_id ) ) return PLUGIN_CONTINUE
 
new dmg_take read_data);
 new 
dmgtype read_data);
 new 
Float:multiplier get_pcvar_float(CVAR_DAMAGE);
 new 
Float:damage dmg_take multiplier;
 new 
health get_user_healthvictim_id );
 
 new 
iWeapIDattacker_id get_user_attackervictim_idiWeapID );
 
 if( !
is_user_connectedattacker_id ) || !is_user_alivevictim_id ) ) {
  return 
PLUGIN_HANDLED
 
}
 
 if( 
iWeapID == CSW_AK47 && hasAK[id] == true ) {
 
  if( 
floatround(damage) >= health ) {
   if( 
victim_id == attacker_id ) {
    return 
PLUGIN_CONTINUE
    
}else{
    
log_killattacker_idvictim_id"ak47");
   }
 
   return 
PLUGIN_CONTINUE
   
}else {
   if( 
victim_id == attacker_id ) return PLUGIN_CONTINUE
 
   fakedamage
victim_id"weapon_ak47"damagedmgtype );
  }
 }
 
 else if( 
iWeapID == CSW_M4A1 && hasM4[id] == true ) {
 
  if( 
floatround(damage) >= health ) {
   if( 
victim_id == attacker_id ) {
    return 
PLUGIN_CONTINUE
    
}else{
    
log_killattacker_idvictim_id"m4a1");
   }
 
   return 
PLUGIN_CONTINUE
   
}else {
   if( 
victim_id == attacker_id ) return PLUGIN_CONTINUE
 
   fakedamage
victim_id"weapon_m4a1"damagedmgtype );
  }
 }
 
 else if( 
iWeapID == CSW_MP5NAVY && hasMP[id] == true ) {
 
  if( 
floatround(damage) >= health ) {
   if( 
victim_id == attacker_id ) {
    return 
PLUGIN_CONTINUE
    
}else{
    
log_killattacker_idvictim_id"mp5navy");
   }
 
   return 
PLUGIN_CONTINUE
   
}else {
   if( 
victim_id == attacker_id ) return PLUGIN_CONTINUE
 
   fakedamage
victim_id"weapon_mp5navy"damagedmgtype );
  }
 }
 return 
PLUGIN_CONTINUE
}
// log kills for damage multiplier
stock log_kill(killervictimweapon[],headshot) {
 
user_silentkillvictim );
 
 
message_beginMSG_ALLget_user_msgid"DeathMsg" ), {0,0,0}, );
 
write_bytekiller );
 
write_bytevictim );
 
write_byteheadshot );
 
write_stringweapon );
 
message_end();
 
 new 
kfrags get_user_fragskiller );
 
set_user_fragskillerkfrags++ );
 new 
vfrags get_user_fragsvictim );
 
set_user_fragsvictimvfrags++ );
 
 return  
PLUGIN_CONTINUE

then you have to delete the lines with // in ak, m4, and mp5 funcbuy
PHP Code:
//*****{BUY AK}*****   
public funcbuyak(id)  
{   
 if(
get_pcvar_num(cvar_enabled) == 0)  
 {    
  
client_print(id,print_chat,"Silver Weapons Mod is disabled, sorry")   
  return 
PLUGIN_HANDLED   
 
}  
 else 
 {
  new 
money cs_get_user_money(id)
  new 
price get_pcvar_num(cvar_ak_cost)
  if(!
is_user_alive(id))
  {
     
client_print(idprint_chat"You can only buy Silver Weapons when alive")
  }
   else if(
hasAK[id])
  {
    
client_print(idprint_chat"You already have a silver AK")
  }
   else if(
money price)
  {
    
client_print(idprint_chat"You can't afford that, DUH!!")
  }
   else
   {
   
//new ammo, clip  
   //new damage 
   //damage = read_data(2) 
   
hasAK[id] = true
   strip_user_weapons
(id)  
   
cs_set_user_money(idmoney price)  
   
give_item(id,"weapon_ak47")
   
cs_set_user_bpammo(idCSW_AK4790)  
   
client_print(id,print_chat,"You have bought the Silver AK for %i doallars",price)  
   
/*if(get_user_weapon(id,ammo,clip) == CSW_AK47 && hasAK[id] == true)  
   {   
    damage = damage*4/3  
   }*/
  
}
 }
 return 
PLUGIN_HANDLED

__________________
spunko is offline
Send a message via MSN to spunko
spunko
Senior Member
Join Date: Jun 2005
Location: Ecuador
Old 10-02-2006 , 05:59   Re: Silver Weapons Mod
Reply With Quote #66

This version works fine
- Doesn't crash the server
- Now it makes more damage and register kills
- Shows the prices in the menu
- Deleted a lot of annoying print messages (like prices)
- Removed some code
- Fakemeta module is not required anymore
- In the new round if you are alive you will get back the normal ak, m4a1 or mp5.
- Commands|Cvars are the same, there is just a new one: admin_silverdamage "2"
EDIT
- Now it gives you the handgun and knife if u are alive in the next round.
Glock if you are a T or USP if you are CT

Modules required
fun
engine
Attached Thumbnails
Click image for larger version

Name:	silverweapons.JPG
Views:	337
Size:	65.3 KB
ID:	11174  
Attached Files
File Type: sma Get Plugin or Get Source (SilverWeapons.sma - 899 views - 11.2 KB)
__________________

Last edited by spunko; 10-02-2006 at 23:42.
spunko is offline
Send a message via MSN to spunko
Murdoc
Junior Member
Join Date: Oct 2006
Old 10-10-2006 , 10:01   Re: Silver Weapons Mod
Reply With Quote #67

Nice plugin!
What program do you use for make them?
Can you make skins to all weapons for me?
Murdoc is offline
spunko
Senior Member
Join Date: Jun 2005
Location: Ecuador
Old 10-10-2006 , 23:53   Re: Silver Weapons Mod
Reply With Quote #68

download them..
use google too
__________________
spunko is offline
Send a message via MSN to spunko
Rolnaaba
Veteran Member
Join Date: May 2006
Old 10-11-2006 , 09:45   Re: Silver Weapons Mod
Reply With Quote #69

to make models, i not a model maker 3-d modeling not my thing, check out http://www.fpsbanana.com for modeling tutorials
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
k007
BANNED
Join Date: Mar 2006
Location: bacon?
Old 10-11-2006 , 10:34   Re: Silver Weapons Mod
Reply With Quote #70

why not make the models dir global vars?
k007 is offline
Send a message via MSN to k007
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 19:11.


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