SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 17/05/2018, 03:55 PM   #1
Verc
Little Clucker
 
Join Date: Apr 2018
Posts: 28
Reputation: 0
Default acmds format not showing right

I am currently using SmartCMD(http://forum.sa-mp.com/showthread.php?p=3786819) which is a great command processor for me and it suits my needs,however I tried to list all admin commands and it's not showing right.
I can't get screenshoots now because my VPS is currently down atm.

PHP Code:
CMD<ACMD1>:admincommands(cmdidplayeridparams[])
{
    static 
str[6][256], bool:formatted false;
    new 
str_show[256];
    if(!
formatted)
    {
        for(new 
06i++)
            
format(str[i], 256""ORANGE"Level %d\n{FFFFFF}"1);

        new 
altlist[8], cmd[28], lvll;
        for(new 
0GetTotalCommandCount(); ji++)
        {
            if(
== cmdid || IsCommandAlternate(i)) continue;

            if((
lvl GetCommandLevel(i)))
            {
                
GetCommandName(icmd);
                
strcat(str[lvl 1], "/");
                
strcat(str[lvl 1], cmd);
                for(
GetAlternateCommands(ialtlist); ll--)
                {
                    
strcat(str[lvl 1], ", ");
                    
GetCommandName(altlist[l], "/");
                    
GetCommandName(altlist[l], cmd);
                    
strcat(str[lvl 1], cmd);
                }
                
strcat(str[lvl 1], "\n");
            }
        }
        
formatted true;
    }

    for(new 
0g_Player[playerid][admin]; i++)
    {
        
strcat(str_showstr[i]);
    }

    
Dialog_Show(playerid""DIALOG_STYLE_MSGBOX"Admin Commands"str_showCLOSE"");
    return 
cmdret:1;

It went over the screen.
Verc is offline   Reply With Quote
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Format is showing wrong! Fratello Scripting Help 6 14/12/2016 07:29 PM
Showing Proxy in format.. FinStar Scripting Help 8 08/03/2016 01:46 PM
/acmds help. Glossy42O Scripting Help 5 08/01/2015 01:19 PM


All times are GMT. The time now is 12:32 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.