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

Please help me


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ykaru
Member
Join Date: Aug 2019
Old 12-27-2019 , 11:15   Please help me
Reply With Quote #1

Hi, i have this plugin and when im trying to compile it i get this erros:
PHP Code:
binduri.sma(27) : warning 217loose indentation
binduri
.sma(87) : warning 217loose indentation
binduri
.sma(90) : error 035argument type mismatch (argument 1)
binduri.sma(92) : error 035argument type mismatch (argument 4)
binduri.sma(93) : error 035argument type mismatch (argument 1
This is the plugin :

PHP Code:
#include <amxmodx>

#define PLUGIN "Bind-uri server"
#define VERSION "1.0"
#define AUTHOR "DaNNNNN-One"

new Binds[][] = 
{
"bind f +rope",
"bind c +grab",
"bind v +hook"
}, 
Menu;

public 
plugin_init()
{
register_plugin(PLUGINVERSIONAUTHOR)
register_clcmd "say /binduri""OpenMenu", -);
register_clcmd "say_team /binduri""OpenMenu", -);
}

public 
client_putinserver id )
{
if ( !
is_user_connected id ) || is_user_bot id ) )
    return 
PLUGIN_HANDLED;
    
    
set_task 3.0"OpenMenu"id );
    return 
PLUGIN_HANDLED;
}

public 
OpenMenu id )
{    
    
Menu menu_create("\yVrei sa-ti fie setate bind-urile server-ului?\r""CMD_SetBinds")
    
    
menu_additem(Menu"\yDa""1"0)
    
menu_additem(Menu"\yNu""2"0)
    
menu_additem(Menu"\yAjutor""3");
    
    
menu_setprop(MenuMPROP_EXITMEXIT_NEVER)
    
menu_display(idMenu0);
}

public 
CMD_SetBinds(idmenuitem) {
    if(
item == MENU_EXIT || !is_user_connected(id)) 
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    new 
Data[6], Name[64], AccessCallBack;
    
menu_item_getinfo(menuitemAccessData,5Name63CallBack);
    new 
Key str_to_num(Data);
    
    switch(
Key
    {    
        case 
1
        {
            for(new 
0sizeof (Binds); i++)
                
client_cmd(id"%s"Binds)
            
            
ColorChat id"!tBind-urile standard ti-au fost aplicate cu succes !" )
            
ColorChat id"!tPentru a folosi rope, apasati pe tasta F, pentru hook, apasati tasta V, iar pentru grab, tasta C" )
        }
        case 
2
        {
            
ColorChat id"!tBind-urile standard, nu au fost aplicate cu succes" );    
        }
        case 
3:
        {
            
show_motd id"addons/amxmodx/configs/motdbind.html""Bind-uri Server" );
        }
    }
    return 
PLUGIN_HANDLED
}

stock ColorChat(const id, const input[], any:...)
{
    new 
count 1players[32]
    static 
msg[320]
    
vformat(msg190input3)
    
    
replace_all(msg190"!g""^4")
    
replace_all(msg190"!n""^1")
    
replace_all(msg190"!t""^3")
    
replace_all(msg190"!t2""^0")
    
    if (
idplayers[0] = id; else get_players(playerscount"ch")
{
    for (new 
0counti++)
    {
        if (
is_user_connected(players) )
        {
            
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players)
            
write_byte(players)
            
write_string(msg)
            
message_end()
        }
    }
}


Last edited by Ykaru; 12-27-2019 at 11:16.
Ykaru is offline
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 12-27-2019 , 14:21   Re: Please help me
Reply With Quote #2

Code:
#include <amxmodx>

#define PLUGIN "Bind-uri server"
#define VERSION "1.0"
#define AUTHOR "DaNNNNN-One"

new Binds[][] = 
{
"bind f +rope",
"bind c +grab",
"bind v +hook"
}, 
Menu;

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd ( "say /binduri", "OpenMenu", -1 );
register_clcmd ( "say_team /binduri", "OpenMenu", -1 );
}

public client_putinserver ( id )
{
    if ( !is_user_connected ( id ) || is_user_bot ( id ) )
        return PLUGIN_HANDLED;
    
    set_task ( 3.0, "OpenMenu", id );
    return PLUGIN_HANDLED;
}

public OpenMenu ( id )
{    
    Menu = menu_create("\yVrei sa-ti fie setate bind-urile server-ului?\r", "CMD_SetBinds")
    
    menu_additem(Menu, "\yDa", "1", 0)
    menu_additem(Menu, "\yNu", "2", 0)
    menu_additem(Menu, "\yAjutor", "3", 0 );
    
    menu_setprop(Menu, MPROP_EXIT, MEXIT_NEVER)
    menu_display(id, Menu, 0);
}

public CMD_SetBinds(id, menu, item) {
    if(item == MENU_EXIT || !is_user_connected(id)) 
    {
        menu_destroy(menu);
        return PLUGIN_HANDLED;
    }
    new Data[6], Name[64], Access, CallBack;
    menu_item_getinfo(menu, item, Access, Data,5, Name, 63, CallBack);
    new Key = str_to_num(Data);
    
    switch(Key) 
    {    
        case 1: 
        {
            for(new i = 0; i < sizeof (Binds); i++)
                client_cmd(id, "%s", Binds)
            
            ColorChat ( id, "!tBind-urile standard ti-au fost aplicate cu succes !" )
            ColorChat ( id, "!tPentru a folosi rope, apasati pe tasta F, pentru hook, apasati tasta V, iar pentru grab, tasta C" )
        }
        case 2: 
        {
            ColorChat ( id, "!tBind-urile standard, nu au fost aplicate cu succes" );    
        }
        case 3:
        {
            show_motd ( id, "addons/amxmodx/configs/motdbind.html", "Bind-uri Server" );
        }
    }
    return PLUGIN_HANDLED
}

stock ColorChat(const id, const input[], any:...)
{
    new count = 1, players[32]
    static msg[320]
    vformat(msg, 190, input, 3)
    
    replace_all(msg, 190, "!g", "^4")
    replace_all(msg, 190, "!n", "^1")
    replace_all(msg, 190, "!t", "^3")
    replace_all(msg, 190, "!t2", "^0")
    
    if (id) players[0] = id; else get_players(players, count, "ch")
    {
        for (new i = 0; i < count; i++)
        {
            if (is_user_connected(players[i]) )
            {
                message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
                write_byte(players[i])
                write_string(msg)
                message_end()
            }
        }
    }
}
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-27-2019 , 14:24   Re: Please help me
Reply With Quote #3

@Raizo, this is the scripting help section so if you're not going to help the person learn something, you should at least explain what you did.
__________________
fysiks is offline
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 12-30-2019 , 08:25   Re: Please help me
Reply With Quote #4

PHP Code:
stock ColorChat(const id, const input[], any:...)
{
    new 
count 1players[32]
    static 
msg[320]
    
vformat(msg190input3)
    
    
replace_all(msg190"!g""^4")
    
replace_all(msg190"!n""^1")
    
replace_all(msg190"!t""^3")
    
replace_all(msg190"!t2""^0")
    
    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()
        }
    }
}

You "players" array must be indexed, that's why you created this loop:
PHP Code:
for (new 0counti++) 
Use this for players -> players[i]
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]
Shadows Adi 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 02:41.


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