Raised This Month: $ Target: $400
 0% 

Awp drop script...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
organizedKaoS
Senior Member
Join Date: Feb 2006
Old 04-03-2006 , 19:51   Awp drop script...
Reply With Quote #1

Im trying to write a script that will drop the awp from a player when they pick it up or if they already have it. Heres what I have so far....
Code:
#include <amxmodx> #include <amxmisc> #include <engine> public plugin_init()     {     register_plugin("Awp Drop", "1.0", "KaoS")     register_event("WeapPickup", "awpDrop", "be", "1=18")     register_event("CurWeapon", "AwpDrop", "be", "1=1")     new map[32]     get_mapname(map, 31)     if(containi(map, "awp_") > -1)         {         pause("a")     } } public awpDrop(id)     {     engclient_cmd(id, "drop") } public AwpDrop(id)     {     new wpID = read_data(2)         if(wpID == CSW_AWP)         engclient_cmd(id, "drop") }
If anybody can help me thanks.
organizedKaoS is offline
p3tsin
Senior Member
Join Date: Sep 2005
Location: Finland
Old 04-04-2006 , 04:34  
Reply With Quote #2

and that doesnt work?
u might want to make sure its the awp that gets dropped (just in case)
Code:
engclient_cmd(id, "drop", "weapon_awp")

and u may also make the event get called only when changing to awp (or shooting with it for that matter..)
Code:
register_event("CurWeapon", "AwpDrop", "be", "1=1", "2=18")

EDIT: its maybe appropriate to remove the awp too after dropping it, take a look at this stock function http://forums.alliedmods.net/showthread.php?t=26300
__________________
plop
p3tsin is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 04-05-2006 , 02:47  
Reply With Quote #3

Additionally i'd say: never do that
Code:
engclient_cmd(id, "drop")
This is a bad way which sometimes may even crash the server.
It's necessary to specify weapon to drop as p3tsin said.
VEN is offline
organizedKaoS
Senior Member
Join Date: Feb 2006
Old 04-05-2006 , 03:15  
Reply With Quote #4

Thanks guys...script solved
organizedKaoS is offline
hip_hop_x
Senior Member
Join Date: Apr 2006
Old 04-14-2006 , 16:48   Thx
Reply With Quote #5

Thx for this code:
Code:
engclient_cmd(id, "drop", "weapon_awp")
Rezolved a part of my plugin.
hip_hop_x is offline
Send a message via MSN to hip_hop_x Send a message via Yahoo to hip_hop_x
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 16:30.


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