Raised This Month: $48 Target: $400
 12% 

Ayuda "/Say"


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Leesduk
Junior Member
Join Date: Sep 2018
Old 09-13-2018 , 13:17   Ayuda "/Say"
Reply With Quote #1

Hola


¿Como estan?, Estoy de nuevo por AlliedModders, porque tengo una pregunta.

Tengo un plugin, Es el "Admin Models Menu" La cuestion es que en *Say tienes que escribir algo para que aparezca el menu de los models, En mi caso lo que quiero es que sea como otros plugins.
Que al momento de escribir en *Say (en mi caso es esto /200769) Luego de escribirlo no sea visible para las demas pesonas que estan en mi servidor, Como cuando escibes /rs que no es visible para nadie y automaticamente Te resetea los Frags.

Dejo el codigo aqui debajo.

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


#define PLUGIN "Admin Model Menu"
#define VERSION "1.0"
#define AUTHOR "Dimision"
#define ADMIN_LEVEL_Q    ADMIN_LEVEL_C

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /200769""admin")
}

public 
plugin_precache() 
{
        
precache_model("models/player/Asasin/Asasin.mdl")
        
precache_model("models/player/Death/Death.mdl")
        
precache_model("models/player/Dobby/Dobby.mdl")
        
precache_model("models/player/Sonic/Sonic.mdl")
        
precache_model("models/player/Skeleton/Skeleton.mdl")
        
precache_model("models/player/Joker/Joker.mdl")
        
precache_model("models/player/Iron/Iron.mdl")
}
        
public 
admin(id)
{
    if (
get_user_flags(id) & ADMIN_LEVEL_A)
        {
            
model_menu(id)
        }
        else
        {
               
ChatColor(id"!g>> !nEstos modelos son solo para !gAdmins !n!")
        }
    
}
public 
model_menu(id)
{
    new 
menu menu_create("\r[\wAdmin Models\r]\r""menu_wybierz")
    
    
menu_additem(menu"\wNeo""1"0)
    
menu_additem(menu"\wDeadPool""2"0)
    
menu_additem(menu"\wHitler""3"0)
    
menu_additem(menu"\wSanta""4"0)
    
menu_additem(menu"\wSkeleton""5"0)
    
menu_additem(menu"\wEva""6"0)
    
menu_additem(menu"\wMafia""7"0)

    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL)
    
    
menu_display(idmenu0)
}

public 
menu_wybierz(idmenuitem)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    new 
data[6], iName[64]
    new 
accescallback
    menu_item_getinfo
(menuitemaccesdata,5iName63callback)
    
    new 
key str_to_num(data)
    
    switch(
key)
    { 
       case 
cs_set_user_model(id"Asasin")
       case 
cs_set_user_model(id"Death")
       case 
cs_set_user_model(id"Dobby")
       case 
cs_set_user_model(id"Sonic")
       case 
cs_set_user_model(id"Skeleton")
       case 
cs_set_user_model(id"Joker")
       case 
cs_set_user_model(id"Iron")
    }
    
menu_destroy(menu)
    return 
PLUGIN_HANDLED
}  
stock ChatColor(const id, const input[], any:...) {
    new 
count 1players[32];
    static 
msg[191];
    
vformat(msg190input3);
    
    
replace_all(msg190"!g""^4"); // verde
    
replace_all(msg190"!n""^1"); // galben/alb/negru
    
replace_all(msg190"!t""^3"); // rosu/albastru/gri
    
replace_all(msg190"!t2""^0"); // rosu2/albastru2/gri2
    
    
if (idplayers[0] = id; else get_players(playerscount"ch");
    {
        for (new 
0counti++)
            {
            if (
is_user_connected(players[i]))
                {
                
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i]);
                
write_byte(players[i]);
                
write_string(msg);
                
message_end();
            }
        }
    }

Leesduk is offline
Mr Misw
Junior Member
Join Date: Aug 2018
Location: India
Old 09-13-2018 , 13:27   Re: Ayuda "/Say"
Reply With Quote #2

PHP Code:
public admin(id

    if (
get_user_flags(id) & ADMIN_LEVEL_A
        { 
            
model_menu(id
        } 
        else 
        { 
               
ChatColor(id"!g>> !nEstos modelos son solo para !gAdmins !n!"
        } 
    return 
PLUGIN_HANDLED;
     

__________________
I Love To Play Currently Playing With LIFE
Manager Of == >ExZ GaMING PuBliC ZonE
Facebook ==> Here
Mr Misw is online now
Leesduk
Junior Member
Join Date: Sep 2018
Old 09-13-2018 , 13:31   Re: Ayuda "/Say"
Reply With Quote #3

Quote:
Originally Posted by Mr Misw View Post
PHP Code:
public admin(id

    if (
get_user_flags(id) & ADMIN_LEVEL_A
        { 
            
model_menu(id
        } 
        else 
        { 
               
ChatColor(id"!g>> !nEstos modelos son solo para !gAdmins !n!"
        } 
    return 
PLUGIN_HANDLED;
     


Si agrego esa linea entonces el "/200769" No sera visible?
Leesduk is offline
Mr Misw
Junior Member
Join Date: Aug 2018
Location: India
Old 09-13-2018 , 13:44   Re: Ayuda "/Say"
Reply With Quote #4

Try And See
__________________
I Love To Play Currently Playing With LIFE
Manager Of == >ExZ GaMING PuBliC ZonE
Facebook ==> Here
Mr Misw is online now
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 09-13-2018 , 13:47   Re: Ayuda "/Say"
Reply With Quote #5

The language in this forum is English.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Leesduk
Junior Member
Join Date: Sep 2018
Old 09-13-2018 , 13:53   Re: Ayuda "/Say"
Reply With Quote #6

Ya agregue la linea pero el comando "/200769" se sigue viendo una vez que lo escribo, aparece en say

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


#define PLUGIN "Admin Model Menu"
#define VERSION "1.0"
#define AUTHOR "Dimision"
#define ADMIN_LEVEL_Q    ADMIN_LEVEL_C

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /200769""admin")
}

public 
plugin_precache() 
{
        
precache_model("models/player/Asasin/Asasin.mdl")
        
precache_model("models/player/Death/Death.mdl")
        
precache_model("models/player/Dobby/Dobby.mdl")
        
precache_model("models/player/Sonic/Sonic.mdl")
        
precache_model("models/player/Skeleton/Skeleton.mdl")
        
precache_model("models/player/Joker/Joker.mdl")
        
precache_model("models/player/Iron/Iron.mdl")
}
        
public 
admin(id)  
{  
    if (
get_user_flags(id) & ADMIN_LEVEL_A)  
        {  
            
model_menu(id)  
        }  
        else  
        {  
               
ChatColor(id"!g>> !nEstos modelos son solo para !gAdmins !n!")  
        }  
    return 
PLUGIN_HANDLED
      
}
    
}
public 
model_menu(id)
{
    new 
menu menu_create("\r[\wAdmin Models\r]\r""menu_wybierz")
    
    
menu_additem(menu"\wNeo""1"0)
    
menu_additem(menu"\wDeadPool""2"0)
    
menu_additem(menu"\wHitler""3"0)
    
menu_additem(menu"\wSanta""4"0)
    
menu_additem(menu"\wSkeleton""5"0)
    
menu_additem(menu"\wEva""6"0)
    
menu_additem(menu"\wMafia""7"0)

    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL)
    
    
menu_display(idmenu0)
}

public 
menu_wybierz(idmenuitem)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    new 
data[6], iName[64]
    new 
accescallback
    menu_item_getinfo
(menuitemaccesdata,5iName63callback)
    
    new 
key str_to_num(data)
    
    switch(
key)
    { 
       case 
cs_set_user_model(id"Asasin")
       case 
cs_set_user_model(id"Death")
       case 
cs_set_user_model(id"Dobby")
       case 
cs_set_user_model(id"Sonic")
       case 
cs_set_user_model(id"Skeleton")
       case 
cs_set_user_model(id"Joker")
       case 
cs_set_user_model(id"Iron")
    }
    
menu_destroy(menu)
    return 
PLUGIN_HANDLED
}  
stock ChatColor(const id, const input[], any:...) {
    new 
count 1players[32];
    static 
msg[191];
    
vformat(msg190input3);
    
    
replace_all(msg190"!g""^4"); // verde
    
replace_all(msg190"!n""^1"); // galben/alb/negru
    
replace_all(msg190"!t""^3"); // rosu/albastru/gri
    
replace_all(msg190"!t2""^0"); // rosu2/albastru2/gri2
    
    
if (idplayers[0] = id; else get_players(playerscount"ch");
    {
        for (new 
0counti++)
            {
            if (
is_user_connected(players[i]))
                {
                
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i]);
                
write_byte(players[i]);
                
write_string(msg);
                
message_end();
            }
        }
    }

Quedo algo asi, dime si algo esta mal ya que mucho de esto no entieno
Leesduk is offline
Leesduk
Junior Member
Join Date: Sep 2018
Old 09-13-2018 , 15:34   Re: Ayuda "/Say"
Reply With Quote #7

Quote:
Originally Posted by OciXCrom View Post
The language in this forum is English.

Oh excuse me, I did not know, in any case could someone help me?
Since I can not do that when writing in * Say * The command * / 200769 * To open the plugin menu, do not see it in say

Example * / 200769 * That's what I want not to be seen in the Say once I send it
Leesduk is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 09-13-2018 , 16:14   Re: Ayuda "/Say"
Reply With Quote #8

Put return PLUGIN_HANDLED in the end of the command'a function.
__________________

Last edited by OciXCrom; 09-13-2018 at 16:15.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Leesduk
Junior Member
Join Date: Sep 2018
Old 09-13-2018 , 20:02   Re: Ayuda "/Say"
Reply With Quote #9

Hello again.

I already put that line after the command, but nothing, remains the same

When writing in * say, the command continues to appear

Would you be so kind to correct it for me?

Since I still can not do it
Leesduk is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 09-14-2018 , 08:05   Re: Ayuda "/Say"
Reply With Quote #10

There's nothing to correct in the code. Did you compile and replace the plugin? If yes, you have some other plugin that is preventing that.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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 11:39.


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