This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Need HELP with AWP pick up Restrict plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
andrius2006x
Junior Member
Join Date: Oct 2007
Old 10-28-2007 , 08:42   Need HELP with AWP pick up Restrict plugin
Reply With Quote #1

Sory for my bad english.
I have made a plugin but it dont works It copile fine but not work.
So i think that anyone can help me

I want to write a plugin who will restrickt to pick up weapons what is on the ground only ADMINS can pick UP the weapons who are on the ground but other players cant pick up the AWP fromthe ground .

There is the code. Maybe the code is bad i dont know becouse I am a starting modder

If anyone can help me please help.
Thanks ..

There is the CODE.

Quote:

////////////////////////////////////////
// //
// AWP restriction plugin //
// //
// By Andriusxxx //
////////////////////////////////////////

#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
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#define ADMIN_LEVEL ADMIN_LEVEL_H
public plugin_modules()
{
require_module("fun")
require_module("cstrike")
}
public plugin_init(){
register_plugin("AWP tik V.I.P","1.0","Andriusxxx csZone.LT")
register_event("pasimti_ginkla","awp_tikrint" ,"b","1=18")
register_cvar("awp_only_for_admins", "1")
register_cvar("n_awp","1")
return PLUGIN_CONTINUE
}
public awp_tikrint()
{
if (!get_cvar_num("n_awp")) return PLUGIN_HANDLED

new id = read_data(0)
if(get_cvar_num("awp_only_for_admins") == 1 && access(id, ADMIN_LEVEL))
{
return PLUGIN_CONTINUE
}
client_cmd(id, "drop","weapon_awp")
client_print(id, print_center, "AWP is only for admins! Pick up another gun!")
return PLUGIN_CONTINUE
}
andrius2006x is offline
andrius2006x
Junior Member
Join Date: Oct 2007
Old 10-28-2007 , 08:43   Re: Need HELP with AWP pick up Restrict plugin
Reply With Quote #2

Please help me ;)
And thanks if anyone help ;)
andrius2006x is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 10-28-2007 , 08:52   Re: Need HELP with AWP pick up Restrict plugin
Reply With Quote #3

1st post - Today , 02:42 PM
2nd post - Today , 02:43 PM

lol! Don't bump you'r theards, wait until someone will response!
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 10-28-2007 , 16:25   Re: Need HELP with AWP pick up Restrict plugin
Reply With Quote #4

Also, there is no need to define the CSW_ values. They are already defined for you.

And, when is the event "pasimti_ginkla" called? And, what event is it?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
andrius2006x
Junior Member
Join Date: Oct 2007
Old 01-28-2008 , 09:29   Re: Need HELP with AWP pick up Restrict plugin
Reply With Quote #5

Are any plugin on this forum for amx restriction ?
I need plugin that only admins can have a weapon like AWP
Other players cant take this weapom from the ground only admins can buy ant pick up from the ground the some weapons./

Can anyone help me ?
andrius2006x is offline
Jheshka
Senior Member
Join Date: Dec 2005
Old 01-30-2008 , 00:02   Re: Need HELP with AWP pick up Restrict plugin
Reply With Quote #6

Allow me to translate...

He would like a plugin that restricts awp usage (By a cvar, on/off)
Which when turned on will not affect admins.

By restriction of awp usage he means buying, and picking up.
__________________
James
Jheshka is offline
[kirk]./musick`
Senior Member
Join Date: Jun 2007
Location: Tampa, Florida
Old 01-30-2008 , 07:55   Re: Need HELP with AWP pick up Restrict plugin
Reply With Quote #7

I didn't know "pasimti_ginkla" was a CS event.
__________________
[kirk]./musick` is offline
Send a message via AIM to [kirk]./musick`
[X]-RayCat
Senior Member
Join Date: Sep 2006
Old 01-30-2008 , 08:57   Re: Need HELP with AWP pick up Restrict plugin
Reply With Quote #8

PHP Code:
#include <amxmodx>
#include <amxmisc>
 
#define ADMIN_LEVEL ADMIN_LEVEL_H
 
new cv_awpforadmins
 
public plugin_init() {
    
register_plugin("PLUGIN""VERSION""AUTHOR");
    
register_event("CurWeapon""Event_CurWeapon""be")
    
cv_awpforadmins register_cvar("amx_awp_for_admins_only""1")
}
public 
Event_CurWeapon(id)

      new 
trash
      
new weapon get_user_weapon(id,trash,trash);
 
      new 
allowed
      
allowed get_pcvar_num(cv_awpforadmins);
 
      if(
allowed == && access(idADMIN_LEVEL))
      {
          return 
PLUGIN_CONTINUE;
      }
      else if (
weapon == CSW_AWP)
      {
          
client_cmd(id"drop");
      }
      return 
PLUGIN_HANDLED;
}
public 
client_command(id
{
      
//works only if awp is bought trought console :<
      
new arg[13];
      
read_argv(0arg 12)
 
      if (
equal("awp"arg )) 
      {
          
client_print(idprint_chat"[AMXX] You're not allowed to buy that weapon.");
          return 
PLUGIN_HANDLED;
      }
      return 
PLUGIN_CONTINUE;

Only works with pickup and console buy. Use restrict menu.
[X]-RayCat is offline
andrius2006x
Junior Member
Join Date: Oct 2007
Old 02-11-2008 , 12:40   Re: Need HELP with AWP pick up Restrict plugin
Reply With Quote #9

Quote:
Originally Posted by Jheshka View Post
Allow me to translate...

He would like a plugin that restricts awp usage (By a cvar, on/off)
Which when turned on will not affect admins.

By restriction of awp usage he means buying, and picking up.

Thanks you very much for helping too.
andrius2006x is offline
andrius2006x
Junior Member
Join Date: Oct 2007
Old 02-11-2008 , 12:41   Re: Need HELP with AWP pick up Restrict plugin
Reply With Quote #10

Thanks [X]-RayCat for helping....

And can you tell me what this event new trash
called for ?

andrius2006x 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 03:07.


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