Raised This Month: $ Target: $400
 0% 

Blind Shooting & Spy option


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Gameplay       
DaxProxy
Senior Member
Join Date: Sep 2007
Old 02-16-2008 , 08:16   Blind Shooting & Spy option
Reply With Quote #1

Blind Shooting
Fast review, when you shoot or stab, your screen will be faded and you really have to shoot only when you are 100% sure in the hit. Fade time is different, depending when it's Primary, Secondary or Knife (weapon). Really fun to put "on" sometimes, people really like it in my server...some are deperatly (Probably wrong spelling) requesting for this mod...put some ppl kind of hate it.

Spy option
You can order intel for 1000$ (Changeable). It means that you can see enemy's HP/AP/Weapon. (Displayed by text message). This is good when you are playing 1o1 and want to know what you are up against. I added this to my own server and people really like it...this won't mess up your ordionary gameplay, just little modification...i recommend it.

All this is made by oRNY for me, i decided to make it public in here, i dont know if this is against the rules, ideas were from me and code is from oRNY, so give +karma to oRNY, if this topic is against the rules, PM me.

Quote:
Originally Posted by oRNY View Post
Blind Shooting:
PHP Code:
/* Plugin generated by AMXX-Studio */
 
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta>
 
#define PLUGIN "Blind Shooting"
#define VERSION "1.0"
#define AUTHOR "oRNY"
 
#define W_NONE 0
#define W_PRIMARY 1
#define W_SECONDARY 2
#define W_KNIFE 3
#define W_GRENADE 4
#define W_BOMB 5
 
new const blindfor[6]={0,750,200,0,200,200}
new 
g_on //a cvar pointer
 
public plugin_init()
{
    
//Register the plugin
    
register_plugin(PLUGINVERSIONAUTHOR)
 
    
//Register the cvar that determines if the plugin is enabled or not
    
g_on=register_cvar("amx_blind","1")
}
public 
client_PreThink(id)
{
    
//Check if the player is alive,not a spectator and thye mod is enabled
    
if ( !(get_pcvar_num(g_on))||(get_user_team(id)==3)||!(is_user_alive(id)) )
        return 
FMRES_IGNORED
 
    
//Get his button
    
new button=get_user_button(id)
 
    
//If he is firing
    
if ( (button&1) )
    {
        
blind(id,blindfortypeof(get_user_weapon(id)) ])
    }
 
    return 
FMRES_HANDLED
}
public 
blind(id,dur)
{
    
//Send the blinding message
    
message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id);
    
write_short(dur); // duration, ~0 is max
    
write_short(dur); // hold time, ~0 is max
    
write_short(1<<12); // flags, no idea wtf 1<<12 is
    
write_byte(255); // red
    
write_byte(255); // green
    
write_byte(255); // blue
    
write_byte(255); // alpha
    
message_end();
}
public 
typeof(wp//Returns the weapon type of the weapon id recieved
{
 
    switch (
wp)
    {
        
//If it's a primary weapon
        
case CSW_SCOUT,CSW_XM1014,CSW_MAC10,CSW_AUG,CSW_UMP45,CSW_SG550,CSW_GALIL,CSW_FAMAS,CSW_AWP,CSW_MP5NAVY,CSW_M249,CSW_M3,CSW_M4A1,CSW_TMP,CSW_G3SG1,CSW_SG552,CSW_AK47,CSW_P90:
        {
            return 
W_PRIMARY
        
}
        
//If it's a secondery weapon
        
case CSW_P228,CSW_ELITE,CSW_FIVESEVEN,CSW_USP,CSW_GLOCK18,CSW_DEAGLE:
        {  
            return 
W_SECONDARY
        
}
        
//If it's a knife
        
case CSW_KNIFE:
        {
            return 
W_KNIFE
        
}
        
//If it's a granade
        
case CSW_HEGRENADE,CSW_SMOKEGRENADE,CSW_FLASHBANG:
        {
            return 
W_GRENADE
        
}
        
//If it's a bomb
        
case CSW_C4:
        {
            return 
W_BOMB
        
}
        
//If it's none of the item's above
        
default:
        {
            return 
W_NONE
        
}
    }
    return 
PLUGIN_HANDLED

I've done that you are blinded for 0.75 seconds for using primary weapons and 0.2 for using secondery weapons/granades/bombs.

Spy on enemy:
PHP Code:
/* Plugin generated by AMXX-Studio */
 
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
 
#define PLUGIN "Spy on enemy"
#define VERSION "1.0"
#define AUTHOR "oRNY"
#define COST 1000
 
new W_NAMES[31][18] = {"","p228","","Scout","HE Grenade","xm1014","C4","mac10","aug","Smoke Grenade","Elite","Fiveseven","ump45","sg550","Galil","Famas","Usp","Glock18","Awp","Mp5","m249","m3","m4a1","tmp","g3sg1","Flashbang","Desert eagle","sg552","AK47","Knife","p90"}
new 
g_on //a cvar pointer
 
public plugin_init()
{
    
//Register the plugin
    
register_plugin(PLUGINVERSIONAUTHOR)
 
    
//Register the cvar that determines if the plugin is enabled or not
    
g_on=register_cvar("amx_spy","1")
 
    
//Register the commands
    
register_clcmd("say","spy")
    
register_clcmd("say_team","spy")
}
public 
spy(id)
{
    new 
player_name[64]
    
read_argv(1,player_name,63)
 
    
//If he didn't give a name or the plugin is disabled
    
if ( !(get_pcvar_num(g_on))||!(equali("/spy",player_name,4)) )
        return 
PLUGIN_HANDLED
 
    
//Adjust the message
    
set_hudmessage(25500, -1.00.1)
 
    
//Check if there is such a player
 
    
new data[2][64]
    
ExplodeString(data,2,63,player_name,' ')
    
player_name=data[1]
 
    new 
player_id=get_user_index(player_name)
 
    if ( (
player_id<1) )
    {
        
//Inform the user
        
show_hudmessage(id,"Player ^"%s^" was not found (this is case-sensitive)",player_name)
 
        
//Exit the function
        
return PLUGIN_HANDLED
    
}
 
    
//Get the other players details
    
new player_armor=get_user_armor(player_id)
    new 
player_health=get_user_health(player_id)
    new 
player_weapon[18]
    
player_weapon=W_NAMESget_user_weapon(player_id) ]
 
    
//See if he can afford it
    
if ( !(cs_get_user_money(id)>=COST) )
    {
        
//Inform the user
        
show_hudmessage(id,"You cant sfford to spy (%i$)",COST)
 
        
//Exit the function
        
return PLUGIN_HANDLED
    
}
    
//Remove the cost from from his money
    
cs_set_user_money(id,cs_get_user_money(id)-COST,1)
 
    
//Show this information to the player who typed "/spy"
    
show_hudmessage(id,"Spying on %s:^nHealth: %i^nArmor: %i^nWeapon: %s",player_name,player_health,player_armor,player_weapon)
 
    
//Exit the function
    
return PLUGIN_CONTINUE
 
}
stock ExplodeString(p_szOutput[][], p_nMaxp_nSizep_szInput[], p_szDelimiter//Splits a string with the given delimeter
{
    new 
nIdx 0strlen(p_szInput)
    new 
nLen = (copycp_szOutput[nIdx], p_nSizep_szInputp_szDelimiter ))
    while( (
nLen l) && (++nIdx p_nMax) )
        
nLen += (copycp_szOutput[nIdx], p_nSizep_szInput[nLen], p_szDelimiter ))
    return

Attached Files
File Type: sma Get Plugin or Get Source (blind_shooting.sma - 1073 views - 2.5 KB)
File Type: sma Get Plugin or Get Source (spy_on_enemy.sma - 1048 views - 2.7 KB)

Last edited by Zenith77; 02-17-2008 at 11:59. Reason: Do not upload .amxx's
DaxProxy is offline
Old 02-16-2008, 09:56
lIl_sAiNt
This message has been deleted by Zenith77. Reason: No .amxx
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 02-16-2008 , 10:20   Re: #Blind Shooting# #Spy option#
Reply With Quote #2

lIl_sAiNt: Please don't upload .amxx files. Only Mods are allowed to do so.

DaxProxy: Your code is not that hard to fix to make it 1.76 compatible. I have done so for you. You will need to attach the plugin to your main post if you want this to be approved though.

Can you support this DaxProxy? If not, you shouldn't be releasing it. oRNY should be
Attached Files
File Type: sma Get Plugin or Get Source (blind_shooting.sma - 1007 views - 2.5 KB)
File Type: sma Get Plugin or Get Source (spy_on_enemy.sma - 1015 views - 2.7 KB)
__________________
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
DaxProxy
Senior Member
Join Date: Sep 2007
Old 02-16-2008 , 12:53   Re: #Blind Shooting# #Spy option#
Reply With Quote #3

Well, attached...ill send PM to oRNY, if he dont like that topic, ill delete it .
DaxProxy is offline
lIl_sAiNt
BANNED
Join Date: Nov 2007
Location: krypton
Old 02-16-2008 , 20:26   Re: Blind Shooting & Spy option
Reply With Quote #4

sorry buddy,i thought the compiler is broken so thats why...
-i was just trying to help,
lIl_sAiNt is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 02-17-2008 , 11:58   Re: Blind Shooting & Spy option
Reply With Quote #5

I'm unapproving this because since you didn't code it I feel you most likely won't be able to support it, maintain it, etc.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
DaxProxy
Senior Member
Join Date: Sep 2007
Old 04-15-2008 , 11:24   Re: Blind Shooting & Spy option
Reply With Quote #6

Well, they screwed up my serv. anyways no talking etc...well its because programmer didnt test em but i hope it helps some people who are trieing to do something like that.
DaxProxy 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:33.


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