Raised This Month: $ Target: $400
 0% 

[Req] [2] Blind Shooting, Spy plugin. [Completed]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DaxProxy
Senior Member
Join Date: Sep 2007
Old 02-10-2008 , 04:53   [Req] [2] Blind Shooting, Spy plugin. [Completed]
Reply With Quote #1

Blind Shooting
Everytime you shoot with weapon, you lose your sight for few seconds, depending on weapon class.

Pistols - 0.2 Sec
SMG's - 0.5 Sec
Rifiles - 0.75 Sec
MachineGun - 0.3 Sec
Snipers - 1 Sec

If you shoot rapidly then every time you fire, your "blind meter" will reset...if i shoot 30 Rounds from M4A1 with 1 pull of trigger...then after i finish shooting, i must be 0.75 Sec blind...i think that would be fun little plugin to play sometimes in my server.



Spy on enemy
Now lets amagine that you are on 1o1 and you dont know how much HP your enemy has but you would like to know, then you simply must execute say command which cost's you 1000$ or well...depending on what you execute.

Lets say that your enemy's name is "enemy" then you should do next:

/spy enemy
This should report you enemy's HP/AP/Weapon (Primary only)/Rounds, if enemy doesn't have any Primary weapon(s) then this just reports you HP and AP.
Cost: 1000$

/mark enemy
Using this say command you would give glow to your enemy with this command...i dont know if this is possiple to /mark this enemy invidually...but if not then this would be seen for everybody or you could only execute this on 1o1 situation, developer's choice.
Cost: 2000$

/trail enemy
I saw this trail plugin which was fun...i dont know if it can be included to this script but /trail would put a trail behind your "victim" which you can see...
Cost: 3500$

Could be more of them (For spy plugin) but i think that even first 1 would be "OK".

Last edited by DaxProxy; 02-16-2008 at 07:23.
DaxProxy is offline
oRNY
Member
Join Date: Feb 2008
Location: Israel
Old 02-10-2008 , 12:19   Re: [Req] [2] Few easyly made plugins - Look For Sure!
Reply With Quote #2

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


Last edited by oRNY; 02-11-2008 at 10:57. Reason: Added "Spy on enemy"
oRNY is offline
siboxxx
New Member
Join Date: Feb 2008
Old 02-11-2008 , 10:38   Re: [Req] [2] Few easyly made plugins - Look For Sure!
Reply With Quote #3

nice oRNY btw can you add when the player write /spy name to show a little menu and you have to choose between Yes or No and above that to say Are you sure? or smth(about the 1000$) i think i can do that
siboxxx is offline
stask0
Senior Member
Join Date: Aug 2007
Old 02-11-2008 , 10:40   Re: [Req] [2] Few easyly made plugins - Look For Sure!
Reply With Quote #4

why both plugins are called "Blind shooting" ?
__________________
+ karma if i helped
stask0 is offline
oRNY
Member
Join Date: Feb 2008
Location: Israel
Old 02-11-2008 , 10:56   Re: [Req] [2] Few easyly made plugins - Look For Sure!
Reply With Quote #5

@siboxxx: Yeah sure I can do that but it will ruin the plugin, it should be as simple as possible.
@stask0:heh lazy me
oRNY is offline
DaxProxy
Senior Member
Join Date: Sep 2007
Old 02-16-2008 , 06:21   Re: [Req] [2] Few easyly made plugins - Look For Sure!
Reply With Quote #6

oRNY, thaanks alot +karma.

Last edited by DaxProxy; 02-16-2008 at 06:26.
DaxProxy is offline
stask0
Senior Member
Join Date: Aug 2007
Old 03-05-2008 , 15:32   Re: [Req] [2] Blind Shooting, Spy plugin. [Completed]
Reply With Quote #7

cant compile the spy on enemy plugin.. it says:
undefinded symbol "get_pcvar_num" - line 33
number of arguments does not match definition - line 60
number of arguments does not match definition - line 60
symbol is assigned a value that is never used: "g_on" - line 88

:d
__________________
+ karma if i helped
stask0 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-05-2008 , 15:50   Re: [Req] [2] Blind Shooting, Spy plugin. [Completed]
Reply With Quote #8

upgrade your amxx
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
stask0
Senior Member
Join Date: Aug 2007
Old 03-05-2008 , 17:00   Re: [Req] [2] Blind Shooting, Spy plugin. [Completed]
Reply With Quote #9

upgrade to wich version?
__________________
+ karma if i helped
stask0 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-05-2008 , 17:01   Re: [Req] [2] Blind Shooting, Spy plugin. [Completed]
Reply With Quote #10

well if any upgrading will be done, why not use the latest version?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 20:33.


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