Raised This Month: $ Target: $400
 0% 

Constant Check?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dizzy
Veteran Member
Join Date: Jun 2004
Location: Massachusetts
Old 02-19-2006 , 21:05   Constant Check?
Reply With Quote #1

How would you make there be a constant check for something??

Like I don't want CT's to have shields sooo

I would

Code:
register_event("??????")

Not sure what event to do...

I can get the rest done though...
__________________
My Plugins

Purchase Mod - Stable
Type Sounds - Stable
Monster Spawner - Stable
Nade Giver - Maintenance
Dizzy is offline
Send a message via AIM to Dizzy
Jordan
Veteran Member
Join Date: Aug 2005
Old 02-19-2006 , 21:12  
Reply With Quote #2

Code:
register_event("CurWeapon" , "noshields" , "be");

I think that's the event you want.
Jordan is offline
Dizzy
Veteran Member
Join Date: Jun 2004
Location: Massachusetts
Old 02-19-2006 , 21:39  
Reply With Quote #3

Alright, now I get error 035: argument type mismatch (argument 1)

on line 25

Code:
#pragma tabsize 0 #include <amxmodx> #include <cstrike> public plugin_init() {     register_plugin("Drop Shields","0.1","Dizzy")     register_cvar("amx_dropshields","1")     register_event("CurWeapon","shield","be") } public shield(id) {     if(get_cvar_num("amx_dropshields")!=1)     {         return PLUGIN_HANDLED     }     if(cs_get_user_team(id) == CS_TEAM_T)     {         return PLUGIN_HANDLED     }       new weaponname[33]     get_user_weapons(weaponname, 32)     if(cs_get_user_team(id) == CS_TEAM_CT && containi(weaponname, "shield") > -1)     {         client_cmd(id,"drop weapon_shield")         return PLUGIN_HANDLED     }     return PLUGIN_HANDLED }
__________________
My Plugins

Purchase Mod - Stable
Type Sounds - Stable
Monster Spawner - Stable
Nade Giver - Maintenance
Dizzy is offline
Send a message via AIM to Dizzy
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 02-19-2006 , 22:02  
Reply With Quote #4

Code:
// [...]     new CsTeams:team = cs_get_user_team(id);     if(team == CS_TEAM_CT && cs_get_user_shield(id))     {         engclient_cmd(id,"weapon_shield","drop") // I think?         return PLUGIN_CONTINUE     } // [...]
Btw, there's no need to check if he's on the Terrorist team so you can get rid of this:
Code:
    if(cs_get_user_team(id) == CS_TEAM_T)     {         return PLUGIN_HANDLED     }
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 02-19-2006 , 22:03  
Reply With Quote #5

yeah, if a CT drops the shield and a T comes walking by spawn...
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 02-19-2006 , 22:04  
Reply With Quote #6

He never said that he did not want terrorists to have shields.

If you don't want either teams to have shields, restrict it!
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 02-19-2006 , 22:20  
Reply With Quote #7

A. didnt see CT on main post
B. didnt see && team==CS_TEAM_CT
C. Yo.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
Shinzon
Senior Member
Join Date: Feb 2005
Location: Hellfire
Old 02-20-2006 , 00:16  
Reply With Quote #8

Code:
#include <amxmodx> public check_shield(id) { if (get_cvar_num("sv_noshield")!=1) return PLUGIN_CONTINUE    new llama = read_data(0)           client_print(llama,print_center,"Shield dropped. Not allowed!")       client_cmd(llama,"weapon_shield;wait;wait;wait;drop")       return PLUGIN_CONTINUE } public plugin_init(){    register_plugin("Drop Shield","0.01","originally for AWP by SuicideDog")    register_event("WeapPickup","check_shield","b","1=xy")    register_cvar("sv_noshield","1")    return PLUGIN_CONTINUE }

ATTENTION!!

U have to replace:

register_event("WeapPickup","check_shield","b ","1=xy")

with the id for shield, which i dont know at time.
__________________
Shinzon

CS:1.6 [max-torgau.de] Fun Server 83.142.83.26:27016
CS:1.6 [max-torgau.de] DeathMatch 83.142.83.26:27017
CS:1.6 [max-torgau.de] .::N!CkYs fUn sErVeR wC3::. XP-SAVE 83.142.83.26:27035
nihil aliud est ebrietas quam voluntaria insania
Shinzon is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 02-20-2006 , 00:18  
Reply With Quote #9

or do it as v3x said...
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
Shinzon
Senior Member
Join Date: Feb 2005
Location: Hellfire
Old 02-20-2006 , 00:32  
Reply With Quote #10

Quote:
Originally Posted by v3x
If you don't want either teams to have shields, restrict it!
Hey...that's the easy way....
__________________
Shinzon

CS:1.6 [max-torgau.de] Fun Server 83.142.83.26:27016
CS:1.6 [max-torgau.de] DeathMatch 83.142.83.26:27017
CS:1.6 [max-torgau.de] .::N!CkYs fUn sErVeR wC3::. XP-SAVE 83.142.83.26:27035
nihil aliud est ebrietas quam voluntaria insania
Shinzon is offline
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 20:25.


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