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

[SOLVED]Trying to make my first menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kaidenmikami
Junior Member
Join Date: Jun 2015
Old 06-27-2015 , 15:13   [SOLVED]Trying to make my first menu
Reply With Quote #1

It's solved now

Thanks to everyone who helped me.

My Code now:

PHP Code:
#include <sourcemod>

public Plugin:myinfo 
{
    
name "You Lose Menu",
    
author "Kaiden",
    
description "You Lose Menu",
    
version "1.0",
    
url "www.youlose.tk"
}

public 
OnPluginStart()
{
    
RegConsoleCmd("sm_menu"command_menu"Menu do Servidor");
    
RegConsoleCmd("sm_regras"command_regras"Menu de regras");
    
RegConsoleCmd("sm_comandos"command_comandos"Menu de comandos");
    
RegConsoleCmd("sm_admins"command_admins"Admins do servidor");
}
public 
OnClientPutInServer(client)
{
    
FakeClientCommand(client"sm_menu");
}
public 
Action:command_menu(clientargs)
{
    new 
Handle:menu CreateMenu(menuhandleMenuAction_Select);
    
SetMenuTitle(menu"You Lose Menu [Criado por Kaiden Mikami]");
    
AddMenuItem(menu"regra""Regras do servidor");
    
AddMenuItem(menu"cmds""Comandos do servidor");
    
AddMenuItem(menu"abner""Abner Sounds");
    
AddMenuItem(menu"quake""Quake Sounds");
    
AddMenuItem(menu"cea""Admins");
    
SetMenuExitButton(menutrue);
    
SetMenuPagination(menu6);
    
DisplayMenu(menuclient250);
}

public 
menuhandle(Handle:menuMenuAction:actionparam1param2)
{
    switch (
action)
    {
        case 
MenuAction_Select:
        {
            
//param1 is client, param2 is item

            
new String:item[64];
            
GetMenuItem(menuparam2itemsizeof(item));
        
            if(
StrEqual(item"regra"))
            {
                
ClientCommand(param1"sm_regras");
            }else if(
StrEqual(item"cmds"))
            {
                
ClientCommand(param1"sm_comandos");
            }else if(
StrEqual(item"abner"))
            {
                
ClientCommand(param1"abnersound");
            }else if(
StrEqual(item"quake"))
            {
                
ClientCommand(param1"sm_quake");
            }else if (
StrEqual(item"cea"))
            {
                
ClientCommand(param1"sm_admins");
            }
            
        }

    }
    return 
0;

public 
Action:command_regras(clientargs)
{
    new 
Handle:menur CreateMenu(menurhandle);
    
SetMenuTitle(menur"Regras do Servidor");
    
AddMenuItem(menur"1""Nao fazer Bunnyhop no servidor.");
    
AddMenuItem(menur"2""Nao usar binds de falas no chat repetidamente.");
    
AddMenuItem(menur"3""Nao ir B2 ou Meio em menos de 5x5.");
    
AddMenuItem(menur"4""Nao use cheaters.");
    
AddMenuItem(menur"5""Respeite os admins");
    
SetMenuExitButton(menurtrue);
    
SetMenuPagination(menur6);
    
DisplayMenu(menurclient250);
}
public 
menurhandle(Handle:menurMenuAction:actionparam1param2)
{
    switch (
action)
    {
        case 
MenuAction_DisplayItem:
        {
            
//param1 is client, param2 is item

            
new String:itemr[64];
            
GetMenuItem(menurparam2itemrsizeof(itemr));
            
PrintToChat(param1"[You Lose]RESPEITE AS REGRAS!");
        }

    }
    return 
0;
}  
public 
Action:command_comandos(clientargs)
{
    new 
Handle:menuc CreateMenu(menuhandle3MenuAction_Select);
    
SetMenuTitle(menuc"Comandos do Servidor");
    
AddMenuItem(menuc"top10""Veja o Top 10 do servidor.");
    
AddMenuItem(menuc"rank""Veja seu rank no servidor.");
    
PrintToChat(client"[You Lose] Selecione para executar o comando.");
    
SetMenuExitButton(menuctrue);
    
SetMenuPagination(menuc6);
    
DisplayMenu(menucclient250);
}

public 
menuhandle3(Handle:menucMenuAction:actionparam1param2)
{
    switch (
action)
    {
        case 
MenuAction_Select:
        {
            
//param1 is client, param2 is item

            
new String:itemc[64];
            
GetMenuItem(menucparam2itemcsizeof(itemc));

            if(
StrEqual(itemc"top10"))
            {
                
FakeClientCommand(param1"say_team top10");
            }else if(
StrEqual(itemc"rank"))
            {
                
FakeClientCommand(param1"say_team rank");
            }
        }

    }
    return 
0;

public 
Action:command_admins(clientargs)
{
    new 
Handle:menua CreateMenu(menuhandle123);
    
SetMenuTitle(menua"Admins do servidor");
    
AddMenuItem(menua"Kakashi""Kakashi - Dono");
    
AddMenuItem(menua"Renegado""Reneg@d0 *-* - Sub-Dono");
    
AddMenuItem(menua"Kaiden[eu]""Kaiden - Programador");
    
AddMenuItem(menua"Ohana""OHANA - Admin");
    
AddMenuItem(menua"Magneto""+++++MAGNETO+++++");
    
SetMenuExitButton(menuatrue);
    
SetMenuPagination(menua6);
    
DisplayMenu(menuaclient250);
}
public 
menuhandle123(Handle:menuaMenuAction:actionparam1param2)
{
    switch (
action)
    {

        case 
MenuAction_DisplayItem:
        {
            
//param1 is client, param2 is item

            
new String:itema[64];
            
GetMenuItem(menuaparam2itemasizeof(itema));
            
PrintToChat(param1"[You Lose]Veja seu console");
            
PrintCenterText(param1"Veja seu console");
            
FakeClientCommand(param1"clear");
            
PrintToChat(param1"[You Lose] Quer ser Admin tambem ? Acesse www.youlose.tk e confira!");

        }

    }
    return 
0;

Sorry for not keeping my old code, i lost it.

Last edited by kaidenmikami; 07-01-2015 at 20:25. Reason: Solved.
kaidenmikami is offline
DJ Data
SourceMod Donor
Join Date: Dec 2012
Location: Switzerland
Old 06-27-2015 , 20:10   Re: Trying to make my first menu
Reply With Quote #2

Here, use this as a template:

PHP Code:
MyFunction(client)
{
    new 
Handle:menu CreateMenu(menuhandleMenuAction_Select MenuAction_End MenuAction_DisplayItem);
    
SetMenuTitle(menu"Menu Display Name");


    
DisplayMenu(menuclientMENU_TIME_FOREVER);
}

public 
menuhandle(Handle:menuMenuAction:actionparam1param2)
{
    switch (
action)
    {
        case 
MenuAction_Select:
        {
            
//param1 is client, param2 is item

            
new String:item[64];
            
GetMenuItem(menuparam2itemsizeof(item));

        }

        case 
MenuAction_End:
        {
            
//param1 is MenuEnd reason, if canceled param2 is MenuCancel reason
            
CloseHandle(menu);

        }

        case 
MenuAction_DisplayItem:
        {
            
//param1 is client, param2 is item

            
new String:item[64];
            
GetMenuItem(menuparam2itemsizeof(item));

        }

    }
    return 
0;

__________________
SourcePawn Coding Level: Novice

Last edited by DJ Data; 06-27-2015 at 20:11.
DJ Data is offline
kaidenmikami
Junior Member
Join Date: Jun 2015
Old 06-30-2015 , 19:38   Re: Trying to make my first menu
Reply With Quote #3

Still giving errors... tried to make only the first action to see if it'll work but, everytime is giving errors:


Quote:
//// temp519.sp
//
// G:\Programas\Pawn Studio\temp519.sp(16) : error 100: function prototypes do not match
// G:\Programas\Pawn Studio\temp519.sp(22) : warning 217: loose indentation
// G:\Programas\Pawn Studio\temp519.sp(27) : warning 217: loose indentation
// G:\Programas\Pawn Studio\temp519.sp(39) : warning 217: loose indentation
// G:\Programas\Pawn Studio\temp519.sp(41) : error 017: undefined symbol "Item"
// G:\Programas\Pawn Studio\temp519.sp(43) : error 017: undefined symbol "client"
// G:\Programas\Pawn Studio\temp519.sp(44) : warning 217: loose indentation
// G:\Programas\Pawn Studio\temp519.sp(44) : error 017: undefined symbol "Item"
// G:\Programas\Pawn Studio\temp519.sp(44) : error 036: empty statement
// G:\Programas\Pawn Studio\temp519.sp(45) : warning 217: loose indentation
// G:\Programas\Pawn Studio\temp519.sp(46) : error 017: undefined symbol "client"
// G:\Programas\Pawn Studio\temp519.sp(51) : error 002: only a single statement (or expression) can follow each "case"
// G:\Programas\Pawn Studio\temp519.sp(51) : warning 215: expression has no effect

Last edited by kaidenmikami; 06-30-2015 at 19:40.
kaidenmikami is offline
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 06-30-2015 , 20:40   Re: Trying to make my first menu
Reply With Quote #4

Paste your full code and we can help you resolve the error better. Most of those are simple fixes. Others we need context to help you.
__________________
ThatOneGuy is offline
kaidenmikami
Junior Member
Join Date: Jun 2015
Old 07-01-2015 , 13:45   Re: Trying to make my first menu
Reply With Quote #5

Here it is the code now

PHP Code:
#include <sourcemod>

public Plugin:myinfo 
{
    
name "You Lose Menu",
    
author "Kaiden",
    
description "You Lose Menu",
    
version "1.0",
    
url "<- URL ->"
}

public 
OnPluginStart()
{
    
RegConsoleCmd("sm_menu"command_menu"Menu do Servidor")
    
RegConsoleCmd("sm_regras"command_regras"Menu de regras");
    
RegConsoleCmd("sm_comandos"command_comandos"Menu de comandos");
    
RegConsoleCmd("sm_admins"admins"Admins do servidor");
}
public 
Action:command_menu(client)
{
    new 
Handle:menu CreateMenu(menuhandleMenuAction_Select);
    
SetMenuTitle(menu"You Lose Menu");
    
AddMenuItem(menu"regra""Regras do servidor");
    
AddMenuItem(menu"cmds""Comandos do servidor");
    
AddMenuItem(menu"abner""Abner Sounds");
    
AddMenuItem(menu"quake""Quake Sounds");
    
AddMenuItem(menu"cea""Admins");
    
SetMenuExitButton(menutrue);
    
SetMenuPagination(menu6);
    
DisplayMenu(menuclient250);
}

public 
menuhandle(Handle:menuMenuAction:actionparam1param2)
{
    switch (
action)
    {
        case 
MenuAction_Select:
        {
            
//param1 is client, param2 is item

            
new String:item[64];
            
GetMenuItem(menuparam2itemsizeof(item));
        
            if(
StrEqual(item"regra"))
            {
                
FakeClientCommand(client"sm_regras");
            }else if(
StrEqual(item"cmds"))
            {
                
FakeClientCommand(client"sm_comandos");
            }else if(
StrEqual(item"abner"))
            {
                
FakeClientCommand(client"abnersound");
            }else if(
StrEqual(item"quake"))
            {
                
FakeClientCommand(client"quake");
            }
            
        }

    }
    return 
0;

public 
Action:command_regras(client)
{
    new 
Handle:menur CreateMenu(menurhandle);
    
SetMenuTitle(menur"Regras do Servidor");
    
DrawPanelText(menur"1. Nao fazer Bunnyhop no servidor.");
    
DrawPanelText(menur"2. Nao usar binds de falas no chat repetidamente.");
    
DrawPanelText(menur"3. Nao ir B2 ou Meio em menos de 5x5.");
    
DrawPanelText(menur"4. Nao use cheaters, será banido permanentemente.");
    
DrawPanelText(menur"5. Se Divirta :D");
    
SetMenuExitButton(menurtrue);
    
SetMenuPagination(menur6);
    
DisplayMenu(menurclient250);
}
public 
menurhandle(Handle:menurMenuAction:actionparam1param2)
{
    switch (
action)
    {

        case 
MenuAction_DisplayItem:
        {
            
//param1 is client, param2 is item

            
new String:itemr[64];
            
GetMenuItem(menurparam2itemrsizeof(itemr));
            
PrintToChat(client"[You Lose]Veja seu console");
            
ClientCommand(client"clear");
            
ClientCommand(client"echo [You Lose] Se voce for pego fazendo bunnyhop, voce sera avisado apenas uma vez, a proxima sera banimento permanente");
            
ClientCommand(client"echo [You Lose] Se usar binds de falar repetidas, sera silenciado");
            
ClientCommand(client"echo [You Lose] Se ir B2 ou Meio em menos de 5x5, ira ser morto e/ou kikado por um admin, se isso acontecer novamente sera banido por 1 hora");
            
ClientCommand(client"echo [You Lose] Se usar qualquer tipo de cheat ou hack... voce ja sabe qual sera seu punimento.");

        }

    }
    return 
0;
}  
public 
Action:command_comandos(client)
{
    new 
Handle:menuc CreateMenu(menuhandle3MenuAction_Select);
    
SetMenuTitle(menuc"Comandos do Servidor");
    
AddMenuItem(menuc"top10""Veja o Top 10 do servidor.");
    
AddMenuItem(menuc"rank""Veja seu rank no servidor.");
    
DrawPanelText(menuc"Selecione para executar o comando.");
    
SetMenuExitButton(menuctrue);
    
SetMenuPagination(menuc6);
    
DisplayMenu(menucclient250);
}

public 
menuhandle3(Handle:menucMenuAction:actionparam1param2)
{
    switch (
action)
    {
        case 
MenuAction_Select:
        {
            
//param1 is client, param2 is item

            
new String:itemc[64];
            
GetMenuItem(menucparam2itemcsizeof(itemc));

            if(
StrEqual(itemc"top10"))
            {
                
FakeClientCommand(client"say_team top10");
            }else if(
StrEqual(itemc"rank"))
            {
                
FakeClientCommand(client"say_team rank");
        }

    }
    return 
0;

public 
Action:admins(client)
{
    new 
Handle:menua CreateMenu(menuhandle123);
    
SetMenuTitle(menua"Admins do servidor");
    
DrawPanelText(menua"Kakashi - Dono");
    
DrawPanelText(menua"Reneg@d0 *-* - Sub-Dono");
    
DrawPanelText(menua"Kaiden - Programador");
    
DrawPanelText(menua"OHANA - Admin");
    
SetMenuExitButton(menuatrue);
    
SetMenuPagination(menua6);
    
DisplayMenu(menuaclient250);
}
public 
menuhandle123(Handle:menuaMenuAction:actionparam1param2)
{
    switch (
action)
    {

        case 
MenuAction_DisplayItem:
        {
            
//param1 is client, param2 is item

            
new String:itema[64];
            
GetMenuItem(menuaparam2itemasizeof(itema));
            
PrintToChat(client"[You Lose]Veja seu console");
            
ClientCommand(client"clear");
            
ClientCommand(client"echo [You Lose] Quer ser Admin tambem ? Acesse www.youlose.tk e confira!");

        }

    }
    return 
0;

Errors:
Code:
//// temp666.sp
// 
// G:\Programas\Pawn Studio\temp666.sp(16) : error 100: function prototypes do not match
// G:\Programas\Pawn Studio\temp666.sp(17) : error 100: function prototypes do not match
// G:\Programas\Pawn Studio\temp666.sp(18) : error 100: function prototypes do not match
// G:\Programas\Pawn Studio\temp666.sp(19) : error 100: function prototypes do not match
// G:\Programas\Pawn Studio\temp666.sp(25) : warning 217: loose indentation
// G:\Programas\Pawn Studio\temp666.sp(32) : warning 217: loose indentation
// G:\Programas\Pawn Studio\temp666.sp(46) : warning 217: loose indentation
// G:\Programas\Pawn Studio\temp666.sp(48) : error 017: undefined symbol "client"
// G:\Programas\Pawn Studio\temp666.sp(51) : error 017: undefined symbol "client"
// G:\Programas\Pawn Studio\temp666.sp(54) : error 017: undefined symbol "client"
// G:\Programas\Pawn Studio\temp666.sp(57) : error 017: undefined symbol "client"
// G:\Programas\Pawn Studio\temp666.sp(69) : warning 217: loose indentation
// G:\Programas\Pawn Studio\temp666.sp(76) : warning 217: loose indentation
// G:\Programas\Pawn Studio\temp666.sp(89) : warning 217: loose indentation
// G:\Programas\Pawn Studio\temp666.sp(89) : error 017: undefined symbol "client"
// G:\Programas\Pawn Studio\temp666.sp(90) : error 017: undefined symbol "client"
// G:\Programas\Pawn Studio\temp666.sp(91) : error 017: undefined symbol "client"
// G:\Programas\Pawn Studio\temp666.sp(92) : error 017: undefined symbol "client"
// G:\Programas\Pawn Studio\temp666.sp(93) : error 017: undefined symbol "client"
// G:\Programas\Pawn Studio\temp666.sp(94) : error 017: undefined symbol "client"
// G:\Programas\Pawn Studio\temp666.sp(105) : warning 217: loose indentation
// G:\Programas\Pawn Studio\temp666.sp(110) : warning 217: loose indentation
// G:\Programas\Pawn Studio\temp666.sp(124) : warning 217: loose indentation
// G:\Programas\Pawn Studio\temp666.sp(126) : error 017: undefined symbol "client"
// G:\Programas\Pawn Studio\temp666.sp(129) : error 017: undefined symbol "client"
// G:\Programas\Pawn Studio\temp666.sp(133) : error 002: only a single statement (or expression) can follow each "case"
// G:\Programas\Pawn Studio\temp666.sp(133) : warning 215: expression has no effect
// G:\Programas\Pawn Studio\temp666.sp(158) : warning 217: loose indentation
// G:\Programas\Pawn Studio\temp666.sp(158) : error 017: undefined symbol "client"
// G:\Programas\Pawn Studio\temp666.sp(159) : error 017: undefined symbol "client"
// G:\Programas\Pawn Studio\temp666.sp(160) : error 017: undefined symbol "client"
// 
// 20 Errors.
//
// Compilation Time: 0,34 sec
// ----------------------------------------

Last edited by kaidenmikami; 07-01-2015 at 13:46.
kaidenmikami is offline
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 07-01-2015 , 15:43   Re: Trying to make my first menu
Reply With Quote #6

I'll explain all of your errors when I get home today.
__________________
ThatOneGuy is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 07-01-2015 , 16:22   Re: Trying to make my first menu
Reply With Quote #7

Quickly glanced at it, you're missing a semicolon at the end of this:

PHP Code:
    RegConsoleCmd("sm_menu"command_menu"Menu do Servidor"
In your menuhandle functions (all 3 of them), you wrote:

PHP Code:
            //param1 is client, param2 is item 
yet in your code you used:

PHP Code:
                FakeClientCommand(client"sm_regras"); 
You may want to replace all the "client" with "param1" to fix that. (I'm assuming param1 is an integer.)

You also are missing a brace here:

PHP Code:
            }else if(StrEqual(itemc"rank"))
            {
                
FakeClientCommand(client"say_team rank");
            } 
This is about at line #127-128 under menuhandle3() inside the case statement.

Loose indentation is if you don't properly indent your code, but brace errors can sometimes cause loose indentation warnings to come up. Fix the errors first and the loose indentation warnings might disappear with them.

I didn't check every single problem but I quickly glanced at it and noticed these first.

Last edited by Potato Uno; 07-01-2015 at 16:29.
Potato Uno is offline
kaidenmikami
Junior Member
Join Date: Jun 2015
Old 07-01-2015 , 16:47   Re: Trying to make my first menu
Reply With Quote #8

Thanks! the errors are gone but the Loose Indentation Warning still there, for me, those errors are nonsense, i don't understand, it's all on random lines....

Code:
PHP Code:
#include <sourcemod>

public Plugin:myinfo 
{
    
name "You Lose Menu",
    
author "Kaiden",
    
description "You Lose Menu",
    
version "1.0",
    
url "<- URL ->"
}

public 
OnPluginStart()
{
    
RegConsoleCmd("sm_menu"command_menu"Menu do Servidor");
    
RegConsoleCmd("sm_regras"command_regras"Menu de regras");
    
RegConsoleCmd("sm_comandos"command_comandos"Menu de comandos");
    
RegConsoleCmd("sm_admins"command_admins"Admins do servidor");
}
public 
Action:command_menu(clientargs)
{
    new 
Handle:menu CreateMenu(menuhandleMenuAction_Select);
    
SetMenuTitle(menu"You Lose Menu");
    
AddMenuItem(menu"regra""Regras do servidor");
    
AddMenuItem(menu"cmds""Comandos do servidor");
    
AddMenuItem(menu"abner""Abner Sounds");
    
AddMenuItem(menu"quake""Quake Sounds");
    
AddMenuItem(menu"cea""Admins");
    
SetMenuExitButton(menutrue);
    
SetMenuPagination(menu6);
    
DisplayMenu(menuclient250);
}

public 
menuhandle(Handle:menuMenuAction:actionparam1param2)
{
    switch (
action)
    {
        case 
MenuAction_Select:
        {
            
//param1 is client, param2 is item

            
new String:item[64];
            
GetMenuItem(menuparam2itemsizeof(item));
        
            if(
StrEqual(item"regra"))
            {
                
FakeClientCommand(param1"sm_regras");
            }else if(
StrEqual(item"cmds"))
            {
                
FakeClientCommand(param1"sm_comandos");
            }else if(
StrEqual(item"abner"))
            {
                
FakeClientCommand(param1"abnersound");
            }else if(
StrEqual(item"quake"))
            {
                
FakeClientCommand(param1"quake");
            }
            
        }

    }
    return 
0;

public 
Action:command_regras(clientargs)
{
    new 
Handle:menur CreateMenu(menurhandle);
    
SetMenuTitle(menur"Regras do Servidor");
    
DrawPanelText(menur"1. Nao fazer Bunnyhop no servidor.");
    
DrawPanelText(menur"2. Nao usar binds de falas no chat repetidamente.");
    
DrawPanelText(menur"3. Nao ir B2 ou Meio em menos de 5x5.");
    
DrawPanelText(menur"4. Nao use cheaters, será banido permanentemente.");
    
DrawPanelText(menur"5. Se Divirta :D");
    
SetMenuExitButton(menurtrue);
    
SetMenuPagination(menur6);
    
DisplayMenu(menurclient250);
}
public 
menurhandle(Handle:menurMenuAction:actionparam1param2)
{
    switch (
action)
    {

        case 
MenuAction_DisplayItem:
        {
            
//param1 is client, param2 is item

            
new String:itemr[64];
            
GetMenuItem(menurparam2itemrsizeof(itemr));
            
PrintToChat(param1"[You Lose]Veja seu console");
            
ClientCommand(param1"clear");
            
ClientCommand(param1"echo [You Lose] Se voce for pego fazendo bunnyhop, voce sera avisado apenas uma vez, a proxima sera banimento permanente");
            
ClientCommand(param1"echo [You Lose] Se usar binds de falar repetidas, sera silenciado");
            
ClientCommand(param1"echo [You Lose] Se ir B2 ou Meio em menos de 5x5, ira ser morto e/ou kikado por um admin, se isso acontecer novamente sera banido por 1 hora");
            
ClientCommand(param1"echo [You Lose] Se usar qualquer tipo de cheat ou hack... voce ja sabe qual sera seu punimento.");

        }

    }
    return 
0;
}  
public 
Action:command_comandos(clientargs)
{
    new 
Handle:menuc CreateMenu(menuhandle3MenuAction_Select);
    
SetMenuTitle(menuc"Comandos do Servidor");
    
AddMenuItem(menuc"top10""Veja o Top 10 do servidor.");
    
AddMenuItem(menuc"rank""Veja seu rank no servidor.");
    
DrawPanelText(menuc"Selecione para executar o comando.");
    
SetMenuExitButton(menuctrue);
    
SetMenuPagination(menuc6);
    
DisplayMenu(menucclient250);
}

public 
menuhandle3(Handle:menucMenuAction:actionparam1param2)
{
    switch (
action)
    {
        case 
MenuAction_Select:
        {
            
//param1 is client, param2 is item

            
new String:itemc[64];
            
GetMenuItem(menucparam2itemcsizeof(itemc));

            if(
StrEqual(itemc"top10"))
            {
                
FakeClientCommand(param1"say_team top10");
            }else if(
StrEqual(itemc"rank"))
            {
                
FakeClientCommand(param1"say_team rank");
            }
        }

    }
    return 
0;

public 
Action:command_admins(clientargs)
{
    new 
Handle:menua CreateMenu(menuhandle123);
    
SetMenuTitle(menua"Admins do servidor");
    
DrawPanelText(menua"Kakashi - Dono");
    
DrawPanelText(menua"Reneg@d0 *-* - Sub-Dono");
    
DrawPanelText(menua"Kaiden - Programador");
    
DrawPanelText(menua"OHANA - Admin");
    
SetMenuExitButton(menuatrue);
    
SetMenuPagination(menua6);
    
DisplayMenu(menuaclient250);
}
public 
menuhandle123(Handle:menuaMenuAction:actionparam1param2)
{
    switch (
action)
    {

        case 
MenuAction_DisplayItem:
        {
            
//param1 is client, param2 is item

            
new String:itema[64];
            
GetMenuItem(menuaparam2itemasizeof(itema));
            
PrintToChat(param1"[You Lose]Veja seu console");
            
ClientCommand(param1"clear");
            
ClientCommand(param1"echo [You Lose] Quer ser Admin tambem ? Acesse www.youlose.tk e confira!");

        }

    }
    return 
0;

Warnings:
Code:
//// temp666.sp
// 
// G:\Programas\Pawn Studio\temp666.sp(23) : warning 217: loose indentation
// G:\Programas\Pawn Studio\temp666.sp(30) : warning 217: loose indentation
// G:\Programas\Pawn Studio\temp666.sp(44) : warning 217: loose indentation
// G:\Programas\Pawn Studio\temp666.sp(67) : warning 217: loose indentation
// G:\Programas\Pawn Studio\temp666.sp(74) : warning 217: loose indentation
// G:\Programas\Pawn Studio\temp666.sp(87) : warning 217: loose indentation
// G:\Programas\Pawn Studio\temp666.sp(103) : warning 217: loose indentation
// G:\Programas\Pawn Studio\temp666.sp(108) : warning 217: loose indentation
// G:\Programas\Pawn Studio\temp666.sp(122) : warning 217: loose indentation
// G:\Programas\Pawn Studio\temp666.sp(157) : warning 217: loose indentation
kaidenmikami is offline
Kailo
Senior Member
Join Date: Sep 2014
Location: Moscow, Russia
Old 07-01-2015 , 17:10   Re: Trying to make my first menu
Reply With Quote #9

loose indentation usually happens when you use in plugin four spaces and tabs for indent, need replace tabs to spaces or spaces to tabs.

Last edited by Kailo; 07-01-2015 at 17:11.
Kailo is offline
kaidenmikami
Junior Member
Join Date: Jun 2015
Old 07-01-2015 , 17:51   Re: Trying to make my first menu
Reply With Quote #10

Oh God! No errors, it's a miracle, thanks everyone, i'm just tweaking the plugin a bit, to make it work proprely, soon i gonna post the Fixes and the plugin it self here.
kaidenmikami 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 17:43.


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