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

what is this plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ahmad111
Member
Join Date: Jul 2019
Old 04-27-2020 , 19:09   what is this plugin
Reply With Quote #1

when you say/say team gg or bg
if player say gg the chat will be = Good game !
if player say bg the chat will be = Bad game !
Ahmad111 is offline
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 04-28-2020 , 04:26   Re: what is this plugin
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "AlferD"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /gg""gg")
    
register_clcmd("say /bg""bg")
    
    
register_clcmd("say_team /gg""gg")
    
register_clcmd("say_team /bg""bg")
}

public 
gg()
{
    
// client_cmd(id, "say Good Game !");
    
client_print(0print_chat"Good Game !");
}

public 
bg()
{
    
// client_cmd(id, "say Bad Game !");
    
client_print(0print_chat"Bad Game !");

alferd is offline
4ever16
Veteran Member
Join Date: Apr 2015
Old 04-28-2020 , 07:20   Re: what is this plugin
Reply With Quote #3

This is working if 1 player from T or CT write gg. Server will restart.

PHP Code:
#include <amxmodx>
#include <cstrike>

new const cmd[][] = { 
    
"say /gg""say gg""say .gg""say !gg" 
}  

public 
plugin_init() {
    for(new 
0sizeof cmdi++) 
        
register_clcmd(cmd[i], "team_command")
}

public 
team_command(id){
    if (
cs_get_user_team(id) == CS_TEAM_T)
    {
        
server_cmd"restart" )
    } 
    else if (
cs_get_user_team(id) == CS_TEAM_CT
    {
        
server_cmd"restart" )        
    }

This plugin executes a command if 5 people write .gg no mather which team. Server will restart.
Commands .gg .nogg .status

PHP Code:
#include <amxmodx>
#include <cstrike>

new bool:gReady[33] = false
new bool:gReStart false
new gReadyNum

public plugin_init()
{
    
// PLUGIN ORIGINAL CODED BY AssKicR
    // most work on this plugin was done by him.
    // Coding errors corrected by KristianI
    
register_plugin("Ready?","6.2","KristianI")
    
register_clcmd("say .gg","HandleReady")
    
register_clcmd("say .nogg","HandleStop")
    
register_clcmd("say .status","HandleStatus")
    
register_cvar("sv_minplayers","5")
}

public 
HandleReady(id)
{
    
    if(!
gReady[id]) {
        
gReady[id] = true
        gReadyNum 
+= 1
        HandleStatus
    
}else{
        
client_print(id,print_chat,"You are giving up already!")
    }
    
}


public 
HandleStop(id)
{
    
    if(
gReady[id]) {
        
gReady[id] = false
        gReadyNum 
-= 1
        client_print
(id,print_chat,"You are not giving up!")
        
HandleStatus
        
//client_print(0,print_chat,"%i/%i giving up!",gReadyNum,get_playersnum())
        
}else{
        
client_print(id,print_chat,"You are not giving up!")
    }
    
}

public 
HandleStatus()
{
    
    
// Print number of players ready to chat
    
client_print(0,print_chat,"%i/%i are giving up!",gReadyNum,get_cvar_num("sv_minplayers"))
    
    
// Checks the number of players ready compared to number of
    // players needed to start the game (sv_minplayers)
    
if (gReadyNum==get_cvar_num("sv_minplayers") && !gReStart) {
        
gReStart true
        goLIVE
        server_cmd
"restart" )
    }
}

public 
client_disconnect(id)
{
    if (
gReady[id]==true) {
        
gReady[id]=false
        gReadyNum 
-= 1
    
}
}

public 
goLIVE() {
    
    for (new 
playerID=0playerID<33playerID++) {
        
        
gReady[playerID]=false
        
    
}
    
    
gReadyNum 0
    gReStart 
false
    
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1030{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/ 

Last edited by 4ever16; 04-28-2020 at 07:29.
4ever16 is offline
Ahmad111
Member
Join Date: Jul 2019
Old 04-28-2020 , 07:50   Re: what is this plugin
Reply With Quote #4

[QUOTE=4ever16;2696677]This is working if 1 player from T or CT write gg. Server will restart.

this is not what im looking for
Ahmad111 is offline
Ahmad111
Member
Join Date: Jul 2019
Old 04-28-2020 , 07:51   Re: what is this plugin
Reply With Quote #5

Quote:
Originally Posted by alferd View Post
PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "AlferD"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /gg""gg")
    
register_clcmd("say /bg""bg")
    
    
register_clcmd("say_team /gg""gg")
    
register_clcmd("say_team /bg""bg")
}

public 
gg()
{
    
// client_cmd(id, "say Good Game !");
    
client_print(0print_chat"Good Game !");
}

public 
bg()
{
    
// client_cmd(id, "say Bad Game !");
    
client_print(0print_chat"Bad Game !");

the plugin work when you say /gg not when you say gg with out /

and the chat be like this
GOOD game !
i dont want the chat to be like this
its simple
just when you click y to say or u and type gg or /gg
and if my name p1 in game
it will be
p1 : Good game !
Ahmad111 is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 04-28-2020 , 08:19   Re: what is this plugin
Reply With Quote #6

Code:
#include <amxmodx>
#include <amxmisc>
#include <colorchat>
#include <cstrike>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() 
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_clcmd("say gg", "gg")
    register_clcmd("say bg", "bg")
    
    register_clcmd("say_team gg", "gg")
    register_clcmd("say_team bg", "bg")
}

public gg( id )
{
new name[ 32 ], text[ 150 ]; get_user_name( id, name, charsmax( name ) )
formatex( text, charsmax( txt ), "%s:^1 Good Game !", name )

if( cs_get_user_team( id ) == CS_TEAM_CT )
    ColorChat(0, BLUE, text )
else if( cs_get_user_team( id ) == CS_TEAM_T )
    ColorChat(0, RED, text )
else
    ColorChat(0, GREY, text )

    return PLUGIN_HANDLED
}

public bg( id )
{
new name[ 32 ], text[ 150 ]; get_user_name( id, name, charsmax( name ) )
formatex( text, charsmax( txt ), "%s:^1 Bad Game !", name )

if( cs_get_user_team( id ) == CS_TEAM_CT )
    ColorChat(0, BLUE, text )
else if( cs_get_user_team( id ) == CS_TEAM_T )
    ColorChat(0, RED, text )
else
    ColorChat(0, GREY, text )

    return PLUGIN_HANDLED
}
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)

Last edited by JocAnis; 04-28-2020 at 08:28.
JocAnis is offline
Ahmad111
Member
Join Date: Jul 2019
Old 04-28-2020 , 08:24   Re: what is this plugin
Reply With Quote #7

Quote:
Originally Posted by JocAnis View Post
if you are using minimum 1.8.3 amxmodx:
Code:
#include <amxmodx>
#include <amxmisc>
#include <colorchat>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() 
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_clcmd("say /gg", "gg")
    register_clcmd("say /bg", "bg")
    
    register_clcmd("say_team /gg", "gg")
    register_clcmd("say_team /bg", "bg")
}

public gg( id )
{
if( cs_get_user_team( id ) == CS_TEAM_CT )
    ColorChat(0, BLUE, "%n:^1 Good Game !", id )
else if( cs_get_user_team( id ) == CS_TEAM_T )
    ColorChat(0, RED, "%n:^1 Good Game !", id )
else
    ColorChat(0, GREY, "%n:^1 Good Game !", id )

    return PLUGIN_HANDLED
}

public bg( id )
{
    if( cs_get_user_team( id ) == CS_TEAM_CT )
    ColorChat(0, BLUE, "%n:^1 Bad Game !", id )
else if( cs_get_user_team( id ) == CS_TEAM_T )
    ColorChat(0, RED, "%n:^1 Bad Game !", id )
else
    ColorChat(0, GREY, "%n:^1 Bad Game !", id )

    return PLUGIN_HANDLED
}
again its the same by alfread
its just when wome one type gg
it will be
Good Game!
and this is not why i need
i need when player say gg
player : good game

Last edited by Ahmad111; 04-28-2020 at 08:26.
Ahmad111 is offline
Old 04-28-2020, 08:28
Ahmad111
This message has been deleted by Ahmad111.
JocAnis
Veteran Member
Join Date: Jun 2010
Old 04-28-2020 , 08:29   Re: what is this plugin
Reply With Quote #8

check now, i forgot about '/'
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
Ahmad111
Member
Join Date: Jul 2019
Old 04-28-2020 , 08:29   Re: what is this plugin
Reply With Quote #9

i edit alfread code

Quote:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "AlferD"


public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)

register_clcmd("say gg", "gg")


register_clcmd("say_team gg", "gg")

}

public gg(id)
{
// client_cmd(id, "say Good Game !");
client_cmd(id, "say Good Game !");

}
but when i say gg its lke this
player : gg
player : good game

so how i can remove the player : gg
so when he sya gg just (player : good game) not (player : gg)
like replace gg with good game
Ahmad111 is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 04-28-2020 , 08:43   Re: what is this plugin
Reply With Quote #10

Simple return PLUGIN_HANDLED inside public gg funcion
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
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:09.


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