Raised This Month: $32 Target: $400
 8% 

Solved [req] only CT open shove..


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Skanix
Junior Member
Join Date: Jan 2018
Location: Algeria
Old 03-12-2018 , 16:43   [req] only CT open shove..
Reply With Quote #1

Hello Guys
Can Anyone Help me whith This,i want When CT say /shove The shove mod wll Be on And when CT say Agine /shove Shove wll off

Sorry For My BAD English

Thank You
Attached Files
File Type: sma Get Plugin or Get Source (CT_open_Shove.sma - 381 views - 4.0 KB)

Last edited by Skanix; 03-15-2018 at 03:00.
Skanix is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 03-12-2018 , 18:07   Re: [req] only CT open shove..
Reply With Quote #2

My advice not to use this script its very bad coded
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 03-12-2018 at 18:07.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Skanix
Junior Member
Join Date: Jan 2018
Location: Algeria
Old 03-13-2018 , 03:58   Re: [req] only CT open shove..
Reply With Quote #3

Quote:
Originally Posted by Natsheh View Post
My advice not to use this script its very bad coded
why Natsheh ..,where is the problem ?
Skanix is offline
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 03-14-2018 , 08:59   Re: [req] only CT open shove..
Reply With Quote #4

Try :
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <colorchat>

#define PLUGIN "Shove Mod"
#define VERSION "1.2"
#define AUTHOR "Styles"

new cShovecCooldowncInUse
new gLastShove[32], bool:g_dontshove[33]

new const 
Prefix[] = "[Dz-Gamers]" 

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /shove""switchshove")
    
register_clcmd("say_team /shove""switchshove")
    
    
cShove register_cvar("shove_force""7")
    
cCooldown register_cvar("shove_cooldown""10")
    
cInUse register_cvar("shove_allow_inuse""1")
    
    
register_forward(FM_PlayerPreThink"Forward_PlayerPreThink")
}

public 
client_putinserver(id)
{
    
g_dontshove[id] = false
}

public 
Forward_PlayerPreThink(id)
{
    if(!
get_pcvar_num(cInUse))
        return 
PLUGIN_HANDLED
    
if(pevidpev_button ) & IN_USE && !(pevidpev_oldbuttons ) & IN_USE ) & !is_user_bot(id))
        
shovePlayer(id)
    
    return 
PLUGIN_CONTINUE
}

public 
switchshove(id)
{
    if(
g_dontshove[id] == true){
        
g_dontshove[id] = false
        ColorChat
(idGREEN"%s^1 You have successfully enabled shove^3!"Prefix)
    }
    else if(
g_dontshove[id] == false){
        
g_dontshove[id] = true
        ColorChat
(idGREEN"%s^1 You have successfully disabled shove^3 !"Prefix)
    }
    
}
   
public 
shovePlayer(id)
{
    if(!
is_user_alive(id) || g_dontshove[id]) 
        return 
PLUGIN_HANDLED
    
    
if(get_systime() - gLastShove[id] < get_pcvar_num(cCooldown))
    {
        
ColorChat(idGREEN"%s^1 Your muscles are too weak to shove the player^4.^1 Wait^3 %d^1 more seconds^4!"Prefix, (get_pcvar_num(cCooldown) - (get_systime() - gLastShove[id])))
        
//client_print(id, print_chat, "%s Your muscles are weak from shoving the player. You must wait to do it again. (%i)", Prefix, (get_pcvar_num(cCooldown) - (get_systime() - gLastShove[id])))
        
return PLUGIN_HANDLED
    
}
    
    new 
Index,BodypName[64], tName[64]
    
get_user_aiming(id,Index,Body,200)
    
    if(!
Index || !is_user_alive(Index) || g_dontshove[Index]) 
        return 
PLUGIN_HANDLED
    
    
new Float:size[3]
    
pev(idpev_sizesize)
    if(
size[2] < 72.0)
    {
        
ColorChat(idGREEN"%s^1 You can't shove somebody while you do this^4!"Prefix)
        
//client_print(id, print_chat, "%s You can't shove somebody while doing that action.", Prefix)
        
return PLUGIN_HANDLED
    
}
    
    
get_user_name(idpNamecharsmax(pName))
    
get_user_name(IndextNamecharsmax(tName))
    
    new 
Float:velocity[3], Float:shover[3], Float:shovee[3]
    
    
pev(idpev_originshover)
    
pev(Indexpev_originshovee)
    
    for(new 
Count;Count 3;Count++)
        
velocity[Count] = (shovee[Count] - shover[Count]) * get_pcvar_float(cShove)
    
    
set_pev(Indexpev_velocityvelocity)
    
    
//client_print(id, print_chat, "%s You have just shoved %s!", Prefix, tName)
    //client_print(Index, print_chat, "%s You have just been shoved by %s!", Prefix, pName)
    
    
gLastShove[id] = get_systime()
    
    
g_dontshove[id] = false
    
    
new players[32], numothers
    get_players
(playersnum"h")
    
    for(new 
inumi++)
    {
        
others players[i]
        
        if(
others == id)
            
ColorChat(othersGREEN"%s^1 You have just shoved^3 %s^4!"PrefixtName)
        else if(
others == Index)
            
ColorChat(othersGREEN"%s^1 You have been just shoved by^3 %s^4!"PrefixpName)
        else
            
ColorChat(othersGREEN"%s^3 %s^1 has just shoved^3 %s^4!"PrefixtNamepName)
        
    }
    
    return 
PLUGIN_HANDLED
    


public 
client_disconnect(id)
    
g_dontshove[id] = false  
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1036\\ f0\\ fs16 \n\\ par }
*/ 
instinctpt1 is offline
Skanix
Junior Member
Join Date: Jan 2018
Location: Algeria
Old 03-14-2018 , 12:04   Re: [req] only CT open shove..
Reply With Quote #5

Quote:
Originally Posted by instinctpt1 View Post
Try :
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <colorchat>

#define PLUGIN "Shove Mod"
#define VERSION "1.2"
#define AUTHOR "Styles"

new cShovecCooldowncInUse
new gLastShove[32], bool:g_dontshove[33]

new const 
Prefix[] = "[Dz-Gamers]" 

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /shove""switchshove")
    
register_clcmd("say_team /shove""switchshove")
    
    
cShove register_cvar("shove_force""7")
    
cCooldown register_cvar("shove_cooldown""10")
    
cInUse register_cvar("shove_allow_inuse""1")
    
    
register_forward(FM_PlayerPreThink"Forward_PlayerPreThink")
}

public 
client_putinserver(id)
{
    
g_dontshove[id] = false
}

public 
Forward_PlayerPreThink(id)
{
    if(!
get_pcvar_num(cInUse))
        return 
PLUGIN_HANDLED
    
if(pevidpev_button ) & IN_USE && !(pevidpev_oldbuttons ) & IN_USE ) & !is_user_bot(id))
        
shovePlayer(id)
    
    return 
PLUGIN_CONTINUE
}

public 
switchshove(id)
{
    if(
g_dontshove[id] == true){
        
g_dontshove[id] = false
        ColorChat
(idGREEN"%s^1 You have successfully enabled shove^3!"Prefix)
    }
    else if(
g_dontshove[id] == false){
        
g_dontshove[id] = true
        ColorChat
(idGREEN"%s^1 You have successfully disabled shove^3 !"Prefix)
    }
    
}
   
public 
shovePlayer(id)
{
    if(!
is_user_alive(id) || g_dontshove[id]) 
        return 
PLUGIN_HANDLED
    
    
if(get_systime() - gLastShove[id] < get_pcvar_num(cCooldown))
    {
        
ColorChat(idGREEN"%s^1 Your muscles are too weak to shove the player^4.^1 Wait^3 %d^1 more seconds^4!"Prefix, (get_pcvar_num(cCooldown) - (get_systime() - gLastShove[id])))
        
//client_print(id, print_chat, "%s Your muscles are weak from shoving the player. You must wait to do it again. (%i)", Prefix, (get_pcvar_num(cCooldown) - (get_systime() - gLastShove[id])))
        
return PLUGIN_HANDLED
    
}
    
    new 
Index,BodypName[64], tName[64]
    
get_user_aiming(id,Index,Body,200)
    
    if(!
Index || !is_user_alive(Index) || g_dontshove[Index]) 
        return 
PLUGIN_HANDLED
    
    
new Float:size[3]
    
pev(idpev_sizesize)
    if(
size[2] < 72.0)
    {
        
ColorChat(idGREEN"%s^1 You can't shove somebody while you do this^4!"Prefix)
        
//client_print(id, print_chat, "%s You can't shove somebody while doing that action.", Prefix)
        
return PLUGIN_HANDLED
    
}
    
    
get_user_name(idpNamecharsmax(pName))
    
get_user_name(IndextNamecharsmax(tName))
    
    new 
Float:velocity[3], Float:shover[3], Float:shovee[3]
    
    
pev(idpev_originshover)
    
pev(Indexpev_originshovee)
    
    for(new 
Count;Count 3;Count++)
        
velocity[Count] = (shovee[Count] - shover[Count]) * get_pcvar_float(cShove)
    
    
set_pev(Indexpev_velocityvelocity)
    
    
//client_print(id, print_chat, "%s You have just shoved %s!", Prefix, tName)
    //client_print(Index, print_chat, "%s You have just been shoved by %s!", Prefix, pName)
    
    
gLastShove[id] = get_systime()
    
    
g_dontshove[id] = false
    
    
new players[32], numothers
    get_players
(playersnum"h")
    
    for(new 
inumi++)
    {
        
others players[i]
        
        if(
others == id)
            
ColorChat(othersGREEN"%s^1 You have just shoved^3 %s^4!"PrefixtName)
        else if(
others == Index)
            
ColorChat(othersGREEN"%s^1 You have been just shoved by^3 %s^4!"PrefixpName)
        else
            
ColorChat(othersGREEN"%s^3 %s^1 has just shoved^3 %s^4!"PrefixtNamepName)
        
    }
    
    return 
PLUGIN_HANDLED
    


public 
client_disconnect(id)
    
g_dontshove[id] = false  
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1036\\ f0\\ fs16 \n\\ par }
*/ 

oh instinctpt1 Thank You Very Much ,But Still Terrorist can open Shove.
Skanix is offline
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 03-14-2018 , 13:33   Re: [req] only CT open shove..
Reply With Quote #6

Sry i didnt saw the full request xD My bad
PHP Code:
#include <amxmodx> 
#include <amxmisc> 
#include <fakemeta> 
#include <colorchat> 

#define PLUGIN "Shove Mod" 
#define VERSION "1.2" 
#define AUTHOR "Styles" 

new cShovecCooldowncInUse 
new gLastShove[32], bool:g_dontshove[33

new const 
Prefix[] = "[Dz-Gamers]"  

public plugin_init() 

    
register_plugin(PLUGINVERSIONAUTHOR
     
    
register_clcmd("say /shove""switchshove"
    
register_clcmd("say_team /shove""switchshove"
     
    
cShove register_cvar("shove_force""7"
    
cCooldown register_cvar("shove_cooldown""10"
    
cInUse register_cvar("shove_allow_inuse""1"
     
    
register_forward(FM_PlayerPreThink"Forward_PlayerPreThink"


public 
client_putinserver(id

    
g_dontshove[id] = false 


public 
Forward_PlayerPreThink(id

    if(!
get_pcvar_num(cInUse)) 
        return 
PLUGIN_HANDLED 
    
if(pevidpev_button ) & IN_USE && !(pevidpev_oldbuttons ) & IN_USE ) & !is_user_bot(id)) 
        
shovePlayer(id
     
    return 
PLUGIN_CONTINUE 


public 
switchshove(id

    if(
g_dontshove[id] == true){ 
        
g_dontshove[id] = false 
        ColorChat
(idGREEN"%s^1 You have successfully enabled shove^3!"Prefix
    } 
    else if(
g_dontshove[id] == false){ 
        
g_dontshove[id] = true 
        ColorChat
(idGREEN"%s^1 You have successfully disabled shove^3 !"Prefix
    } 
     

    
public 
shovePlayer(id
{
    if(
get_user_team(id) == 2){ 
        if(!
is_user_alive(id) || g_dontshove[id])  
            return 
PLUGIN_HANDLED 
     
        
if(get_systime() - gLastShove[id] < get_pcvar_num(cCooldown)) 
        { 
            
ColorChat(idGREEN"%s^1 Your muscles are too weak to shove the player^4.^1 Wait^3 %d^1 more seconds^4!"Prefix, (get_pcvar_num(cCooldown) - (get_systime() - gLastShove[id]))) 
            
//client_print(id, print_chat, "%s Your muscles are weak from shoving the player. You must wait to do it again. (%i)", Prefix, (get_pcvar_num(cCooldown) - (get_systime() - gLastShove[id]))) 
            
return PLUGIN_HANDLED 
        

     
        new 
Index,BodypName[64], tName[64
        
get_user_aiming(id,Index,Body,200
     
        if(!
Index || !is_user_alive(Index) || g_dontshove[Index])  
            return 
PLUGIN_HANDLED 
     
        
new Float:size[3
        
pev(idpev_sizesize
        if(
size[2] < 72.0
        { 
            
ColorChat(idGREEN"%s^1 You can't shove somebody while you do this^4!"Prefix
            
//client_print(id, print_chat, "%s You can't shove somebody while doing that action.", Prefix) 
            
return PLUGIN_HANDLED 
        

     
        
get_user_name(idpNamecharsmax(pName)) 
        
get_user_name(IndextNamecharsmax(tName)) 
     
        new 
Float:velocity[3], Float:shover[3], Float:shovee[3
     
        
pev(idpev_originshover
        
pev(Indexpev_originshovee
     
        for(new 
Count;Count 3;Count++) 
            
velocity[Count] = (shovee[Count] - shover[Count]) * get_pcvar_float(cShove
     
        
set_pev(Indexpev_velocityvelocity
     
        
//client_print(id, print_chat, "%s You have just shoved %s!", Prefix, tName) 
        //client_print(Index, print_chat, "%s You have just been shoved by %s!", Prefix, pName) 
     
        
gLastShove[id] = get_systime() 
     
        
g_dontshove[id] = false 
     
        
new players[32], numothers 
        get_players
(playersnum"h"
     
        for(new 
inumi++) 
        { 
            
others players[i
         
            if(
others == id
                
ColorChat(othersGREEN"%s^1 You have just shoved^3 %s^4!"PrefixtName
            else if(
others == Index
                
ColorChat(othersGREEN"%s^1 You have been just shoved by^3 %s^4!"PrefixpName
            else 
                
ColorChat(othersGREEN"%s^3 %s^1 has just shoved^3 %s^4!"PrefixtNamepName
         
        } 
     
    }
    
ColorChat(idGREEN"^4Only CT's Can use that command")
    return 
PLUGIN_HANDLED     
}  

public 
client_disconnect(id
    
g_dontshove[id] = false   
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE 
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1036\\ f0\\ fs16 \n\\ par } 
*/ 
instinctpt1 is offline
Skanix
Junior Member
Join Date: Jan 2018
Location: Algeria
Old 03-15-2018 , 03:00   Re: [req] only CT open shove..
Reply With Quote #7

Quote:
Originally Posted by instinctpt1 View Post
Sry i didnt saw the full request xD My bad
PHP Code:
#include <amxmodx> 
#include <amxmisc> 
#include <fakemeta> 
#include <colorchat> 

#define PLUGIN "Shove Mod" 
#define VERSION "1.2" 
#define AUTHOR "Styles" 

new cShovecCooldowncInUse 
new gLastShove[32], bool:g_dontshove[33

new const 
Prefix[] = "[Dz-Gamers]"  

public plugin_init() 

    
register_plugin(PLUGINVERSIONAUTHOR
     
    
register_clcmd("say /shove""switchshove"
    
register_clcmd("say_team /shove""switchshove"
     
    
cShove register_cvar("shove_force""7"
    
cCooldown register_cvar("shove_cooldown""10"
    
cInUse register_cvar("shove_allow_inuse""1"
     
    
register_forward(FM_PlayerPreThink"Forward_PlayerPreThink"


public 
client_putinserver(id

    
g_dontshove[id] = false 


public 
Forward_PlayerPreThink(id

    if(!
get_pcvar_num(cInUse)) 
        return 
PLUGIN_HANDLED 
    
if(pevidpev_button ) & IN_USE && !(pevidpev_oldbuttons ) & IN_USE ) & !is_user_bot(id)) 
        
shovePlayer(id
     
    return 
PLUGIN_CONTINUE 


public 
switchshove(id

    if(
g_dontshove[id] == true){ 
        
g_dontshove[id] = false 
        ColorChat
(idGREEN"%s^1 You have successfully enabled shove^3!"Prefix
    } 
    else if(
g_dontshove[id] == false){ 
        
g_dontshove[id] = true 
        ColorChat
(idGREEN"%s^1 You have successfully disabled shove^3 !"Prefix
    } 
     

    
public 
shovePlayer(id
{
    if(
get_user_team(id) == 2){ 
        if(!
is_user_alive(id) || g_dontshove[id])  
            return 
PLUGIN_HANDLED 
     
        
if(get_systime() - gLastShove[id] < get_pcvar_num(cCooldown)) 
        { 
            
ColorChat(idGREEN"%s^1 Your muscles are too weak to shove the player^4.^1 Wait^3 %d^1 more seconds^4!"Prefix, (get_pcvar_num(cCooldown) - (get_systime() - gLastShove[id]))) 
            
//client_print(id, print_chat, "%s Your muscles are weak from shoving the player. You must wait to do it again. (%i)", Prefix, (get_pcvar_num(cCooldown) - (get_systime() - gLastShove[id]))) 
            
return PLUGIN_HANDLED 
        

     
        new 
Index,BodypName[64], tName[64
        
get_user_aiming(id,Index,Body,200
     
        if(!
Index || !is_user_alive(Index) || g_dontshove[Index])  
            return 
PLUGIN_HANDLED 
     
        
new Float:size[3
        
pev(idpev_sizesize
        if(
size[2] < 72.0
        { 
            
ColorChat(idGREEN"%s^1 You can't shove somebody while you do this^4!"Prefix
            
//client_print(id, print_chat, "%s You can't shove somebody while doing that action.", Prefix) 
            
return PLUGIN_HANDLED 
        

     
        
get_user_name(idpNamecharsmax(pName)) 
        
get_user_name(IndextNamecharsmax(tName)) 
     
        new 
Float:velocity[3], Float:shover[3], Float:shovee[3
     
        
pev(idpev_originshover
        
pev(Indexpev_originshovee
     
        for(new 
Count;Count 3;Count++) 
            
velocity[Count] = (shovee[Count] - shover[Count]) * get_pcvar_float(cShove
     
        
set_pev(Indexpev_velocityvelocity
     
        
//client_print(id, print_chat, "%s You have just shoved %s!", Prefix, tName) 
        //client_print(Index, print_chat, "%s You have just been shoved by %s!", Prefix, pName) 
     
        
gLastShove[id] = get_systime() 
     
        
g_dontshove[id] = false 
     
        
new players[32], numothers 
        get_players
(playersnum"h"
     
        for(new 
inumi++) 
        { 
            
others players[i
         
            if(
others == id
                
ColorChat(othersGREEN"%s^1 You have just shoved^3 %s^4!"PrefixtName
            else if(
others == Index
                
ColorChat(othersGREEN"%s^1 You have been just shoved by^3 %s^4!"PrefixpName
            else 
                
ColorChat(othersGREEN"%s^3 %s^1 has just shoved^3 %s^4!"PrefixtNamepName
         
        } 
     
    }
    
ColorChat(idGREEN"^4Only CT's Can use that command")
    return 
PLUGIN_HANDLED     
}  

public 
client_disconnect(id
    
g_dontshove[id] = false   
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE 
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1036\\ f0\\ fs16 \n\\ par } 
*/ 
instinctpt1 Thank You Very Much Dude ♥♥♥
Skanix 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 15:19.


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