AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Fix Plugin (https://forums.alliedmods.net/showthread.php?t=171202)

Mix97 11-03-2011 05:06

Fix Plugin
 
I puted IP and name of server when i compiled but it still dosent work pls help

Quote:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <colorchat>

#define PLUGIN "[xREDIRECT]"
#define VERSION "1.0"
#define AUTHOR "Mix97"

new nick[33]

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

register_clcmd("say /server", "ConnectServer")

register_clcmd("say_team /server", "ConnectServer")

// Add your code here...
}

public ConnectServer(id)
{
new menu = menu_create("Choose Server", "ConnectServer1")
menu_additem(menu, "Name Of Server", "1", 0)
menu_additem(menu, "Name Of Server", "2", 0)
menu_additem(menu, "Name Of Server", "3", 0)
menu_additem(menu, "Name Of Server", "4", 0)
menu_additem(menu, "Name Of Server", "5", 0)
menu_additem(menu, "Name Of Server", "6", 0)
}


public ConnectServer1(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)

}
menu_display(id, menu)
switch(item)
{
case 0:
{
console_print(id, "connect IP")
ColorChat(0, GREEN, "[xREDIRECT] ^1%s connected to Name Of Server.", nick)
}

case 1:
{
console_print(id, "connect IP")
ColorChat(0, GREEN, "[xREDIRECT] ^1%s connected to Name Of Server.", nick)
}

case 2:
{
console_print(id, "connect IP")
ColorChat(0, GREEN, "[xREDIRECT] ^1%s connected to Name Of Server.", nick)
}

case 3:
{
console_print(id, "connect IP")
ColorChat(0, GREEN, "[xREDIRECT] ^1%s connected to Name Of Server.", nick)
}

case 4:
{
console_print(id, "connect IP")
ColorChat(0, GREEN, "[xREDIRECT] ^1%s connected to Name Of Server.", nick)
}

case 5:
{
console_print(id, "connect IP")
ColorChat(0, GREEN, "[xREDIRECT] ^1%s connected to Name Of Server.", nick)
}
}
}




kiki33hun 11-03-2011 05:17

Re: Fix Plugin
 
console_print(id, "connect IP") change to client_cmd(id, "connect IP")

Mix97 11-03-2011 05:19

Re: Fix Plugin
 
il try thanks...

ConnorMcLeod 11-03-2011 06:30

Re: Fix Plugin
 
Put an explicit title please.

AlgoChikitito 11-03-2011 09:13

Re: Fix Plugin
 
PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <colorchat>

#define PLUGIN "[xREDIRECT]"
#define VERSION "1.0"
#define AUTHOR "Mix97"

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
register_clcmd("say /server""ConnectServer")

    
register_clcmd("say_team /server""ConnectServer")

}

public 
ConnectServer(id)
{
    new 
menu menu_create("Choose Server""ConnectServer1")
    
menu_additem(menu"Name Of Server""1"0)
    
menu_additem(menu"Name Of Server""2"0)
    
menu_additem(menu"Name Of Server""3"0)
    
menu_additem(menu"Name Of Server""4"0)
    
menu_additem(menu"Name Of Server""5"0)
    
menu_additem(menu"Name Of Server""6"0)
}


public 
ConnectServer1(idmenuitem
{
    new 
nick[33]
    
get_user_name id nick 32 )
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu)
    }
    
menu_display(idmenu)
    switch(
item)
    {
        case 
1:
        {
            
client_cmd(id"connect IP")
            
ColorChat(0GREEN"[xREDIRECT] ^1%s connected to Name Of Server."nick)
        }
        case 
2:
        {
            
client_cmd(id"connect IP")
            
ColorChat(0GREEN"[xREDIRECT] ^1%s connected to Name Of Server."nick)
        }
        case 
3:
        {
            
client_cmd(id"connect IP")
            
ColorChat(0GREEN"[xREDIRECT] ^1%s connected to Name Of Server."nick)
        }
        case 
4:
        {
            
client_cmd(id"connect IP")
            
ColorChat(0GREEN"[xREDIRECT] ^1%s connected to Name Of Server."nick)
        }
        case 
5:
        {
            
client_cmd(id"connect IP")
            
ColorChat(0GREEN"[xREDIRECT] ^1%s connected to Name Of Server."nick)
        }
        case 
6:
        {
            
client_cmd(id"connect IP")
            
ColorChat(0GREEN"[xREDIRECT] ^1%s connected to Name Of Server."nick)
        }
    }
    return 
PLUGIN_HANDLED



MyPc 11-03-2011 09:41

Re: Fix Plugin
 
no "menu_display" how do you expect the menu to show up ?

sake 11-03-2011 18:51

Re: Fix Plugin
 
Quote:

#define PLUGIN "[xREDIRECT]"
#define VERSION "1.0"
#define AUTHOR "Mix97"

I don't think xOR will like this.

joshknifer 11-03-2011 19:00

Re: Fix Plugin
 
Quote:

Originally Posted by sake (Post 1589459)
I don't think xOR will like this.

Mix97 has already had one account banned for posting plugins that werent his..lol

MyPc 11-04-2011 01:04

Re: Fix Plugin
 
Quote:

Originally Posted by sake (Post 1589459)
I don't think xOR will like this.

Quote:

Originally Posted by joshknifer (Post 1589465)
Mix97 has already had one account banned for posting plugins that werent his..lol

I saw the xREDIRECT code and its not like this code.
This code look very simple nothing special in this code.
XREDIRECT have much more advanced stuff ..

sake 11-04-2011 04:52

Re: Fix Plugin
 
He should get another name for it.


All times are GMT -4. The time now is 14:24.

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