Help Command [Not Simple One]
#1

Hey Guys, i need help for my Deathrun script.

I Want to make a cmd /help [info].
If player types /help it will send functions: bla bla bla
if you type /help server it will type about server, /help skins about skins.
Can you help me? Thanks, repping all comments
Reply
#2

PHP код:
CMD:help(playeridparams[])
{
    
SendClientMessage(playerid0xFF0000AA"blablabal");
    return 
1;

PHP код:
CMD:helpskins(playeridparams[])
{
    
SendClientMessage(playerid0xFF0000AA"blablabal");
    return 
1;

just multiple times!
Reply
#3

Yeah, but i want /help [cmd] so it'll be like /help server and it'll show dialog for server help
Reply
#4

Something like this or use dialog list on help cmd!
PHP код:
CMD:help(playeridparams[])
{
    if(!
sscanf(params,"s[40]"help))
    {
        if(
strcmp(help,"new"true) == 0)
        {
        }
        else if(
strcmp(help,"_"true) == 0)
        {
        }        
        
// And so on.
        
}
        else
        {
            
SendClientMessage(playerid, -1,"/help new, _, _, _, _");
        }
        return 
1;
    }

Reply
#5

y_commands has a nice in-built feature that does this.
Reply
#6

Can you make it for normal? without ZCMD and those,
Reply
#7

pawn Код:
CMD:help(playerid, params [])
{
 if(!strcmp(params,"skin",true))
{
 // do your stuff here
}
if(!strcmp(params,"server",true))
{
// do other stuff here
}
return 1;
Something like this. (I'm on my phone so it's hard to type)
Reply
#8

pawn Код:
if(strcmp("/help", cmdtext, true) == 0)
    {
        if(!sscanf(params,"s[40]", help))
        {
            if(strcmp(help,"new", true) == 0)
            {

            }
            else if(strcmp(help,"_", true) == 0)
            {

            }      
            // And so on.
        }
        else
        {
            SendClientMessage(playerid, -1,"/help new, _, _, _, _");
        }
        return 1;
    }
Not tested... So if it isn't working then look how to recode it to strcmp!
Reply
#9

Quote:
Originally Posted by Scrillex
Посмотреть сообщение
pawn Код:
if(strcmp("/help", cmdtext, true) == 0)
    {
        if(!sscanf(params,"s[40]", help))
        {
            if(strcmp(help,"new", true) == 0)
            {

            }
            else if(strcmp(help,"_", true) == 0)
            {

            }      
            // And so on.
        }
        else
        {
            SendClientMessage(playerid, -1,"/help new, _, _, _, _");
        }
        return 1;
    }
Not tested... So if itsn't working then look how to recode it to strcmp!
I think you forgot to add this: new help;
Reply
#10

Doesnt work, i dont have sscanf.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)