Raised This Month: $ Target: $400
 0% 

Drop awp help...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kaksi
Junior Member
Join Date: Apr 2004
Old 06-29-2004 , 12:34   Drop awp help...
Reply With Quote #1

I use this plugin cause i like that the players that havn't read the rules get really angry when the awp they just bought isn't usable....

Code:
/* AMX(x) Mod script.
*
* (c) Copyright 2002, SuicideDog
* This file is provided as is (no warranties).
* Simple AWP restriction for CS (this works for 1.6)
*/

#include <amxmodx>

public check_awp(id) {
      if (get_cvar_num("sv_noawp")!=1) return PLUGIN_CONTINUE
      new llama = read_data(0)   
      client_print(llama,print_center,"AWPs are not allowed. Find a real gun!")
      client_cmd(llama,"weapon_awp;wait;wait;wait;drop")
      return PLUGIN_CONTINUE
}

public plugin_init(){
   register_plugin("Drop Awp","0.1","SuicideDog")
   register_event("WeapPickup","check_awp","b","1=18")
   register_cvar("sv_noawp","1")
   return PLUGIN_CONTINUE
}
I guess it's this line that register the event of a awp pickup... and the id opf the awp is 1=18? Am I right?

Code:
register_event("WeapPickup","check_awp","b","1=18")
What are the id's of the other sniper rifles? I want to enable this for some of the other rifles...

Is there a list of alla availible weapons?
kaksi is offline
Ryan
Senior Member
Join Date: May 2004
Location: NH, USA
Old 06-30-2004 , 04:10  
Reply With Quote #2

Quote:
Originally Posted by amxconst.inc
/* Id of weapons in CS */
#define CSW_P228 1
#define CSW_SCOUT 3
#define CSW_HEGRENADE 4
#define CSW_XM1014 5
#define CSW_C4 6
#define CSW_MAC10 7
#define CSW_AUG 8
#define CSW_SMOKEGRENADE 9
#define CSW_ELITE 10
#define CSW_FIVESEVEN 11
#define CSW_UMP45 12
#define CSW_SG550 13
#define CSW_GALI 14
#define CSW_GALIL 14
#define CSW_FAMAS 15
#define CSW_USP 16
#define CSW_GLOCK18 17
#define CSW_AWP 18
#define CSW_MP5NAVY 19
#define CSW_M249 20
#define CSW_M3 21
#define CSW_M4A1 22
#define CSW_TMP 23
#define CSW_G3SG1 24
#define CSW_FLASHBANG 25
#define CSW_DEAGLE 26
#define CSW_SG552 27
#define CSW_AK47 28
#define CSW_KNIFE 29
#define CSW_P90 30
Also, a more efficient way of dropping the weapon is this command:

Code:
client_cmd( id, "drop weapon_awp" );
__________________
Warcraft 3: Expansion
Homepage | Downloads | Forums
Ryan is offline
Send a message via AIM to Ryan
KiN | SuicideDog
Senior Member
Join Date: Mar 2004
Old 06-30-2004 , 12:51  
Reply With Quote #3

ya that would be a better way. I wrote that a long time ago .. and it was my first plugin
__________________
Code:
#include <amxmodx> public client_connect(id){   new playerIQ    get_player_IQ(id,playerIQ)   if(playerIQ < 100 )  {     client_cmd(id,"say I'm too stupid to play;quit")  }   PLUGIN_CONTINUE}
KiN | SuicideDog 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 14:53.


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